INETD(8C)
NAME
inetd − Internet superdaemon
USAGE
/etc/inetd
DESCRIPTION
The inetd is a server-manager that invokes internet services, such as ftpd(8C) or rlogind(8C), as necessary. Since it is a single process, inetd efficiently manages all types of internet connections.
The following servers and daemons can only be invoked by inetd. (This represents a change from the SR9.0 DOMAIN/IX convention).
/etc/ftpd DARPA File Transfer Protocol daemon
/etc/rexecd Remote execution server
/etc/rlogind Remote log-in daemon
/etc/rshd Remote Shell server
/etc/telnetd DARPA TELNET protocol server
The inetd configuration file, /etc/inetd.conf is, in nearly all installations, a link to ‘node_data/etc.inetd.conf, a per-node file. Inetd reads this file at boot time and, in some cases, after it gets a hangup signal. Details about this file may be found under inetd.conf(4).
When a connection-oriented service such as telnet(1) is requested, inetd creates a process running the necessary server and passes it the connection as standard input (file descriptor 0). The server calls getpeername(2), which returns the source host and port.
When a datagram arrives for a datagram-oriented service, inetd creates a process running the appropriate datagram-oriented server, and then passes it the socket (on which the pending datagram is being held) as file descriptor 0.
If the server is “single-threaded,” it simply takes over the socket. If the server is “multi-threaded,” it connects directly to the peer, freeing up the socket for continued use by inetd. The distinction between single- and multi-threaded servers must be noted, using the “wait” and “nowait” keywords, respectively, in ‘node_data/etc.inetd.conf.
If inetd encounters a serious error (e.g., unknown service, socket I/O error, incorrect server pathname), it attempts to log the error via syslog(8). We recommend that you run a syslog daemon on your node, especially if you are debugging a new server.
EXAMPLE
We recommend invoking inetd in background mode via the /etc/rc Shell script. If you include the lines if [ -f /etc/inetd ]; then /etc/inetd & fi in your node’s ‘node_data/etc.rc file, the /etc/run_rc program will start inetd at boot time (after first checking to see if the file exists). Old versions of ‘node_data/etc.rc typically include lines that start individual internet server daemons. If your node’s copy of ‘node_data/etc.rc includes such lines, remove them. We copy in a correct version of /etc/rc, including these lines, on installation (unless you have a diskless node).
FILES
/sys/node_data/inetd.conf inetd configuration file
/etc/services internet services database
RELATED INFORMATION
inetd.conf(4) services(5) protocols(5) rc(8) syslog(8) ftpd(8C) rexecd(8C) rlogind(8C) rshd(8C) telnetd(8C)