INETD.CONF(4) — Series 300 and 800 Only
NAME
inetd.conf − configuration file for inetd
DESCRIPTION
Upon execution, inetd(1M) reads its configuration information from the configuration file /etc/inetd.conf and, possibly, at some later time in response to a SIGHUP signal; see inetd(1M).
There must be an entry for each field of the configuration file. Each field must be separated by tabs and/or spaces. A line can be continued if it terminates with a ‘\’. Comments are denoted by a ‘#’ at the beginning of a line. The number of entries in the configuration file must not exceed _NFILE − 10. _NFILE is defined in <stdio.h>. A line in the configuration file has the following fields:
service name
socket type
protocol
wait/nowait
user
server program
program number (RPC services only) (NFS)
version number (RPC services only) (NFS)
server program arguments
If the server is RPC-based (NFS), then the service name should be rpc. Otherwise, the service name is the name of a valid service in the file /etc/services. For example, shell for the remsh service, login for the rlogin service and telnet for the telnet service.
Socket type is either stream or dgram, depending on whether the server socket is a stream or a datagram socket.
Protocol must be a valid protocol as given in /etc/protocols; for example, tcp or udp.
Wait/nowait applies to datagram sockets only (other sockets should specify nowait).
Wait instructs inetd to execute only one datagram server for the specified socket at any one time. Datagram servers which process all datagrams on a socket and terminate by timing out are called “single-threaded.” Most datagram RPC servers are single-threaded servers.
Nowait instructs inetd to execute a datagram server for a specified socket whenever a datagram arrives. Datagram servers which connect to their peers and free the socket so inetd can receive further datagrams are called “multi-threaded.”
User entry is the name of the user as whom the server should run.
Server program is the absolute pathname of the program which inetd executes when it finds a request on the server’s socket.
The arguments to the server program should be just as they normally are, starting with argv[0], which is the name of the program.
RPC services (NFS) require two extra fields: program number and version number. A program number defines a particular service grouping and is unique. Version number is the version supported by the RPC service. This number can be a single value or a range if the program handles multiple versions, in other words 1 or 1-3. Ranges are separated by a dash (‘-’). Version numbers allow RPC protocols to be extended and modified and make it possible for old and new protocols to share the same server process.
EXAMPLES
1) This is the entry for the remsh service, which uses the tcp protocol, and which daemon should run as root.
shell stream tcp nowait root /etc/remshd remshd
2) This is a possible entry for the ftp service which times-out an inactive session after 75 seconds.
ftp stream tcp nowait root /etc/ftpd ftpd -t75
3) This is an example entry for an RPC-based service. Notice how the service name field contains the name “rpc” and how there are two more fields used, the program number (100005) and the version number (1).
rpc dgram udp wait root /etc/rpc.mountd 100005 1 rpc.mountd
DEPENDENCIES
Implemented on the Series 300 and 800 only.
AUTHOR
UCB (University of California at Berkeley)
NFS was developed by Sun Microsystems, Inc.
SEE ALSO
inetd(1M), inetd.sec(4), protocols(4), services(4).
Hewlett-Packard Company — May 11, 2021