Super-server configuration file
/etc/inetd.conf
The inetd.conf file is the default
configuration file for the inetd (super-server)
daemon. As shipped, this file describes all currently
supported QNX TCP/IP daemons. Unless you want to add or
remove daemon definitions, you won't need to modify this
file.
Here are the fields in the configuration file:
- service name
- The name of a valid
service in the /etc/services file.
For "internal" services (discussed below), the
service name must be the official name of the service (i.e.
the first entry in /etc/services).
- socket type
- One of
stream, dgram, or raw,
depending on whether the socket is a stream, datagram, or
raw socket.
- protocol
- A valid protocol
in /etc/protocols. For example,
tcp or udp. For RPC daemons, the
underlying protocol must also be specified, followed by a
/ (e.g rpc/udp).
- wait/nowait
- Sockets other than
datagram sockets should have a nowait entry in
this space. If a datagram server connects to its peer,
freeing the socket so inetd can receive further
messages on the socket, it's said to be a
multi-threaded server and should use the nowait entry.
If a datagram server processes all incoming datagrams on a
socket and eventually times out, that server is said to be
single-threaded and should use a wait entry. The
tftpd daemon is an exception
- it's a
datagram server that establishes pseudo-connections. It must
be listed as wait in order to avoid a race; the
server reads the first packet, creates a new socket, and
then forks and exits to let inetd check for new
service requests to spawn new servers.
- user
- The name of the user that the server will run as.
This allows servers to be given less permission than root.
- server program
- The pathname of the program to be executed by inetd
when a request is found on inetd's socket. If the
desired service is provided internally by inetd
(e.g. see echo in the
inetd
utility page), this field would contain the word internal.
- server program arguments
- Any arguments to be passed to the server program. The name of the program
is passed as argv[0]. If the server program field is
internal, you can leave this field blank.
The following is an example from a working inetd.conf file:
ftp stream tcp nowait root /usr/ucb/ftpd in.ftpd -el
where:
- ftp
- Is the service name (see /etc/services).
- stream
- Is the socket type.
- tcp
- Is the protocol.
- nowait
- Is the wait/nowait entry.
- root
- Is the user.
- /usr/ucb/ftpd
- Is the server program.
- in.ftpd
- Is argv[0] (server program arguments).
- -el
- Is argv[1] (server program arguments).
inetd
The
inetd daemon
section in the Basic Configuration chapter