INETD(8N) COMMAND REFERENCE INETD(8N)
NAME
inetd - internet super-server
SYNOPSIS
/etc/inetd [ -d ] [ configuration file ]
DESCRIPTION
The inetd server should be run at boot time by /etc/rc.net.
After inetd is run, it listens for connections on certain
internet sockets. When a connection is found on one of its
sockets, it decides what service the socket corresponds to,
and invokes a program to service the request. This process
is passed to the connection as file descriptor 0 and an
argument of the form
sourcehost.sourceport
where sourcehost is hex and sourceport is decimal.
After the program is finished, it continues to listen on the
socket (except in some cases, which are described here).
Essentially, inetd allows running one daemon to invoke
several others, reducing load on the system.
Upon execution, inetd reads its configuration information
from a configuration file which, by default, is
/etc/inetd.conf(5n). There must be an entry for each field
of the configuration file, with entries for each field
separated by a tab or a space. Comments are denoted by a
pound sign ( # ) at the beginning of a line. The fields of
the configuration file are as follows:
service name
socket type
protocol
wait/nowait
user
server program
server program arguments
The service name entry or an rpc service name is the name of
a valid service in the file /etc/services. For internal
services: (discussed below), the service name must be the
official name of the service (that is, the left-most entry
in /etc/services).
For RPC services: following the service name is a slash
( / ) and a number or range of numbers signifying version
numbers, for example:
mountd/1
rusersd/1-2
Printed 4/6/89 1
INETD(8N) COMMAND REFERENCE INETD(8N)
The socket type should be one of stream, dgram, raw, rdm, or
seqpacket depending on whether the socket is a stream,
datagram, raw, reliably delivered message, or sequenced
packet socket.
The protocol must be a valid protocol as given in
/etc/protocols. Examples might be tcp or udp. For RPC
services, valid protocols are prefixed with rpc/, for
example rpc/udp or rpc/tcp.
The wait/nowait entry is applicable to datagram sockets only
(other sockets should have a nowait entry in this space).
If a datagram server connects to its peer, freeing the
socket so inetd can received further messages on the socket,
it is said to be a multi-threaded server, and should use the
nowait entry. For datagram servers which process all
incoming datagrams on a socket and eventually time out, the
server is said to be single-threaded and should use a wait
entry. Tftp and talk are both examples of the latter type
of datagram server.
The user entry should contain the user name (whom the server
should run). This allows for servers to be given less
permission than root. The server program entry should
contain the pathname of the program which is to be executed
by inetd when a request is found on its socket.
For examples of the /etc/inetd.conf file, see
inetd.conf(5n).
The arguments to the server program should be just as they
normally are, starting with argv[0], which is the name of
the program. If the service is provided internally, the
word internal should take the place of this entry.
CAVEATS
The number of servers is limited to 57. The maximum number
of arguments to a server is limited to 64.
The configuration file is reread by inetd when it receives a
hangup signal, SIGHUP. Services may be added, deleted or
modified when the configuration file is reread.
SEE ALSO
inetd.conf(5n), services(5n), ftpd(8n), rexecd(8n),
rlogind(8n), rshd(8n), syslogd(8n), telnetd(8n), and
tftpd(8n).
Printed 4/6/89 2
%%index%%
na:288,81;
sy:369,256;
de:625,2455;3440,2456;
ca:5896,425;
se:6321,365;
%%index%%000000000105