no bugs
[unix-history] / usr / src / usr.sbin / inetd / inetd.8
CommitLineData
55270cae
KM
1.\" Copyright (c) 1985 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)inetd.8 6.1 (Berkeley) %G%
6.\"
7.TH INETD 8 ""
8.UC 6
9.SH NAME
10inetd \- internet ``super\-server''
11.SH SYNOPSIS
12.B /etc/inetd
13[
14.B \-d
15] [ configuration file ]
16.SH DESCRIPTION
17.I Inetd
18should be run at boot time by
19.IR /etc/rc.local .
20It then listens for connections on certain
21internet sockets. When a connection is found on one
22of its sockets, it decides what service the socket
23corresponds to, and invokes a program to service the request.
24After the program is
25finished, it continues to listen on the socket (except in some cases which
26will be described below). Essentially,
27.I inetd
28allows running one daemon to invoke several others,
29reducing load on the system.
30.PP
31Upon execution,
32.I inetd
33reads its configuration information from a configuration
34file which, by default, is
35.IR /etc/inetd.conf .
36There must be an entry for each field of the configuration
37file, with entries for each field separated by a tab or
38a space. Comments are denoted by a ``#'' at the beginning
39of a line. There must be an entry for each field. The
40fields of the configuration file are as follows:
41.br
42 service name
43.br
44 socket type
45.br
46 protocol
47.br
48 wait/nowait
49.br
50 user
51.br
52 server program
53.br
54 server program arguments
55.PP
56The
57.I service name
58entry is the name of a valid service in
59the file
60.IR /etc/services/ .
61For ``internal'' services (discussed below), the service
62name
63.I must
64be the official name of the service (that is, the left-most entry in
65.IR /etc/services ).
66.PP
67The
68.I socket type
69should be one of ``stream'', ``dgram'', ``raw'', ``rdm'', or ``seqpacket'',
70depending on whether the socket is a stream, datagram, raw,
71reliably delivered message, or sequenced packet socket.
72.PP
73The
74.I protocol
75must be a valid protocol as given in
76.IR /etc/protocols .
77Examples might be ``tcp'' or ``udp''.
78.PP
79The
80.I wait/nowait
81entry is applicable to datagram sockets only (other sockets should
82have a ``nowait'' entry in this space). If a datagram server connects
83to its peer, freeing the socket so
84.I inetd
85can received further messages on the socket, it is said to be
86a ``multi-threaded'' server, and should use the ``nowait''
87entry. For datagram servers which process all incoming datagrams
88on a socket and eventually time out, the server is said to be
89``single-threaded'' and should use a ``wait'' entry. ``Rwho''
90and ``talk'' are both examples of the latter type of
91datagram server.
92.PP
93The
94.I user
95entry should contain the user name of the user as whom the server
96should run. This allows for servers to be given less permission
97than root.
98The
99.I server program
100entry should contain the pathname of the program which is to be
101executed by
102.I inetd
103when a request is found on its socket. If
104.I inetd
105provides this service internally, this entry should
106be ``internal''.
107.PP
108The arguments to the server program should be just as they
109normally are, starting with argv[0], which is the name of
110the program. If the service is provided internally, the
111word ``internal'' should take the place of this entry.
112.PP
113.I Inetd
114provides several ``trivial'' services internally by use of
115routines within itself. These services are ``echo'',
116``discard'', ``chargen'' (character generator), ``daytime''
117(human readable time), and ``time'' (machine readable time,
118in the form of the number of seconds since midnight, January
1191, 1900). All of these services are tcp based. For
120details of these services, consult the appropriate RFC
121from the Network Information Center.
122.SH "SEE ALSO"
123comsat(8C), ftpd(8C), rexecd(8C), rlogind(8C), rshd(8C),
124rwhod(8C), telnetd(8C), tftpd(8C)
125.SH BUGS
126Internal services should not have to have their official
127name in the configuration file.