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