Provides Internet service management for a network.
Note: Use SRC commands to control the inetd daemon from the command line. Use the rc.tcpip file to start the daemon with each system restart.
/usr/sbin/inetd [ -d ] [ -t SecondsToWait ] [ ConfigurationFile ]
The /usr/sbin/inetd daemon provides Internet service management for a network. This daemon reduces system load by invoking other daemons only when they are needed and by providing several simple Internet services internally without invoking other daemons.
The inetd daemon starts by default each time you start your system. When the daemon starts, it reads its configuration information from the file specified in the ConfigurationFile parameter. If the parameter is not specified, the inetd daemon reads its configuration information from the /etc/inetd.conf file.
Once started, the inetd daemon listens for connections on certain Internet sockets in the /etc/inetd.conf. The /etc/inetd.conf file describes to the inetd daemon how Internet service requests on Internet sockets should be handled. When the inetd daemon receives a request on one of these sockets, it determines which service corresponds to that socket and then either handles the service request itself or invokes the appropriate server.
Subservers of the inetd Daemon
The inetd daemon (a subsystem) controls the following daemons (subservers):
The ftpd, rlogind, rexecd, rshd, talkd, telnetd, and uucpd daemons are started by default. The tftpd, fingerd, and comsat daemons are not started by default unless they are uncommented in the /etc/inetd.conf file.
The /etc/inetd.conf file can be updated by using the System Management Interface Tool (SMIT), the System Resource Controller (SRC), or by editing the /etc/inetd.conf.
If you change the /etc/inetd.conf, using SMIT, then the inetd daemon will be refreshed automatically and will read the new /etc/inetd.conf file. If you change the file using your favorite editor, run the refresh -s inetd or kill -1 InetdPID command to inform the inetd daemon of the changes to its configuration file.
The entries in the /etc/inetd.conf file include the following information:
Item | Description |
---|---|
Service Name | Specifies the name of a valid Internet service. |
Socket Type | Specifies the type of Internet socket used for the Internet
service. (Only stream and datagram sockets are implemented.) Valid
values are: stream dgram sunrpc_udp sunrpc_tcp |
Protocol | Specifies the Internet Protocol used for the Internet service.
Valid values are: tcp tcp6 udp udp6 |
Wait/Nowait | Specifies whether the inetd daemon should wait for the service to complete before continuing to listen for this type of service request. |
Wait/Nowait | Specifies whether the inetd daemon should wait for the service to complete before continuing to listen for this type of service request. SRC works like wait, but instead of forking and waiting for the child to die, it does a startsrc on the subsystem and store information about the starting of the service. When the service is removed from the inetd.conf file and inetd is restarted, the service has a stopsrc issued to the service to stop it. |
User | Specifies the user name that inetd should use to start the subserver. |
Path | Specifies the fully qualified path name that inetd should execute to provide the service. For services that inetd provides internally, this entry should be internal. |
Command | Specifies the name of the service to start and its parameters. This field is empty for internal services. |
The inetd daemon can be run with or without the SRC. In addition, the inetd daemon can be controlled by issuing signals using the kill command.
Item | Description |
---|---|
-d | Sends debugging messages to the syslogd daemon. |
-t SecondsToWait | Specifies the number of seconds to wait in the select() system call before looping. The SecondsToWait can be a number from 1 to 999999. Without this flag the inetd daemon will block until one of the active services is requested by a network connection. This flag should only be used when a machine is servicing many wait services like tftp and is not being used for other services. Since timing out the select() system call will cause the inetd daemon to use more CPU cycles, this flag is not recomended for most situations. |
The Internet service requests that are supported internally by the inetd daemon are generally used for debugging. They include the following internal services:
Item | Description |
---|---|
ECHO | Returns data packets to a client host. |
DISCARD | Discards received data packets. |
CHARGEN | Discards received data packets and sends predefined or random data. |
DAYTIME | Sends the current date and time in user-readable form. |
TIME | Sends the current date and time in machine-readable form. |