1INETD(8) 386BSD System Manager's Manual INETD(8) 2 3NNAAMMEE 4 iinneettdd - internet ``super-server'' 5 6SSYYNNOOPPSSIISS 7 iinneettdd [--dd] [_c_o_n_f_i_g_u_r_a_t_i_o_n _f_i_l_e] 8 9DDEESSCCRRIIPPTTIIOONN 10 IInneettdd should be run at boot time by /_e_t_c/_r_c._l_o_c_a_l (see rc(8)). It then 11 listens for connections on certain internet sockets. When a connection 12 is found on one of its sockets, it decides what service the socket 13 corresponds to, and invokes a program to service the request. After the 14 program is finished, it continues to listen on the socket (except in some 15 cases which will be described below). Essentially, iinneettdd allows running 16 one daemon to invoke several others, reducing load on the system. 17 18 The option available for iinneettdd:: 19 20 --dd Turns on debugging. 21 22 Upon execution, iinneettdd reads its configuration information from a 23 configuration file which, by default, is /_e_t_c/_i_n_e_t_d._c_o_n_f. There must be 24 an entry for each field of the configuration file, with entries for each 25 field separated by a tab or a space. Comments are denoted by a ``#'' at 26 the beginning of a line. There must be an entry for each field. The 27 fields of the configuration file are as follows: 28 29 service name 30 socket type 31 protocol 32 wait/nowait 33 user 34 server program 35 server program arguments 36 37 The _s_e_r_v_i_c_e-_n_a_m_e entry is the name of a valid service in the file 38 /_e_t_c/_s_e_r_v_i_c_e_s. For ``internal'' services (discussed below), the service 39 name _m_u_s_t be the official name of the service (that is, the first entry 40 in /_e_t_c/_s_e_r_v_i_c_e_s). 41 42 The _s_o_c_k_e_t-_t_y_p_e should be one of ``stream'', ``dgram'', ``raw'', ``rdm'', 43 or ``seqpacket'', depending on whether the socket is a stream, datagram, 44 raw, reliably delivered message, or sequenced packet socket. 45 46 The _p_r_o_t_o_c_o_l must be a valid protocol as given in /_e_t_c/_p_r_o_t_o_c_o_l_s. 47 Examples might be ``tcp'' or ``udp''. 48 49 The _w_a_i_t/_n_o_w_a_i_t entry is applicable to datagram sockets only (other 50 sockets should have a ``nowait'' entry in this space). If a datagram 51 server connects to its peer, freeing the socket so iinneettdd can received 52 further messages on the socket, it is said to be a ``multi-threaded'' 53 server, and should use the ``nowait'' entry. For datagram servers which 54 process all incoming datagrams on a socket and eventually time out, the 55 server is said to be ``single-threaded'' and should use a ``wait'' entry. 56 Comsat(8) (biff(1)) and talkd(8) are both examples of the latter type of 57 datagram server. Tftpd(8) is an exception; it is a datagram server that 58 establishes pseudo-connections. It must be listed as ``wait'' in order 59 to avoid a race; the server reads the first packet, creates a new socket, 60 and then forks and exits to allow iinneettdd to check for new service requests 61 to spawn new servers. 62 63 The _u_s_e_r entry should contain the user name of the user as whom the 64 server should run. This allows for servers to be given less permission 65 than root. 66 67 The _s_e_r_v_e_r-_p_r_o_g_r_a_m entry should contain the pathname of the program which 68 is to be executed by iinneettdd when a request is found on its socket. If 69 iinneettdd provides this service internally, this entry should be 70 ``internal''. 71 72 The _s_e_r_v_e_r _p_r_o_g_r_a_m _a_r_g_u_m_e_n_t_s should be just as arguments normally are, 73 starting with argv[0], which is the name of the program. If the service 74 is provided internally, the word ``internal'' should take the place of 75 this entry. 76 77 IInneettdd provides several ``trivial'' services internally by use of routines 78 within itself. These services are ``echo'', ``discard'', ``chargen'' 79 (character generator), ``daytime'' (human readable time), and ``time'' 80 (machine readable time, in the form of the number of seconds since 81 midnight, January 1, 1900). All of these services are tcp based. For 82 details of these services, consult the appropriate RFC from the Network 83 Information Center. 84 85 IInneettdd rereads its configuration file when it receives a hangup signal, 86 SIGHUP. Services may be added, deleted or modified when the configuration 87 file is reread. 88 89SSEEEE AALLSSOO 90 comsat(8), fingerd(8), ftpd(8), rexecd(8), rlogind(8), rshd(8), 91 telnetd(8), tftpd(8) 92 93HHIISSTTOORRYY 94 The iinneettdd command appeared in 4.3BSD. 95 964.3 Berkeley Distribution March 16, 1991 2 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133