]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/listen
hjfs: add users command, fix newuser ? documentation
[plan9front.git] / sys / man / 8 / listen
1 .TH LISTEN 8
2 .SH NAME
3 listen, listen1, tcp7, tcp9, tcp19, tcp21, tcp22, tcp23, tcp25, tcp53, tcp110, tcp113, tcp143, tcp445, tcp513, tcp515, tcp564, tcp565, tcp566, tcp567, tcp993, tcp995, tcp1723, tcp17007, tcp17008, tcp17009, tcp17010, tcp17013 \- listen for calls on a network device
4 .SH SYNOPSIS
5 .B aux/listen
6 .RB [ -iq ]
7 .RB [ -d
8 .IR srvdir ]
9 .RB [ -t
10 .IR trustsrvdir ]
11 .RB [ -n
12 .IR namespace ]
13 .RB [ -p
14 .IR maxprocs ]
15 .RI [ net ]
16 .PP
17 .B aux/listen1
18 [
19 .B -tv
20 ]
21 .RB [ -p
22 .IR maxprocs ]
23 .I addr
24 .I cmd
25 [
26 .I args...
27 ]
28 .SH DESCRIPTION
29 .I listen
30 listens on a network for inbound calls to local services.
31 .I Net
32 is the network protocol on which to listen, by default
33 .BR /net/tcp .
34 The services available are executable, non-empty files in
35 .I srvdir
36 or
37 .IR trustsrvdir .
38 If neither
39 .I srvdir
40 nor
41 .I trustsrvdir
42 is given,
43 .I listen
44 looks for executable files in
45 .BR /bin/service .
46 Services found in
47 .I srvdir
48 are executed as user
49 .BR none ;
50 services found in
51 .I trustsrvdir
52 are executed as the user who started
53 .IR listen .
54 When changing user to
55 .BR none ,
56 a new namespace is created,
57 usually by executing
58 .BR /lib/namespace ,
59 but
60 .B -n
61 selects an alternate
62 .IR namespace .
63 The
64 .B -p
65 option limits the number of processes that
66 .I listen
67 spawns to service the connections. If the
68 .I maxprocs
69 limit is reached,
70 .I listen
71 will log the event and delay servicing until the number
72 of connection processes drops below the limit again. A
73 .I maxprocs
74 smaller or equal zero means no limit (default).
75 Option
76 .B -q
77 suppresses affirmative log information.
78 Option
79 .B -i
80 suppresses the periodic scan of the service directories for changes.
81 .PP
82 Service names are made by concatenating the name of
83 the network with the name of the service or port.
84 For example,
85 an inbound call on the TCP network for port 565 executes service
86 .BR tcp565 .
87 .PP
88 At least the following services are available in
89 .BR /bin/service .
90 .TF \ tcp0000
91 .TP
92 .B tcp564
93 serve a piece of the name space using the Plan 9 file system protocol,
94 with authentication via
95 .I Tauth
96 (in
97 .IR attach (5)),
98 no encryption,
99 and multiplex multiple users on a single connection
100 (used by
101 .IR srv (4),
102 and also by Unix systems to see Plan 9 files).
103 .TP
104 .B tcp17007
105 serve a piece of the name space using the Plan 9 file system protocol,
106 with authentication at the start,
107 optional SSL encryption,
108 and no multiplexing of users
109 (typically used by
110 .IR cpu (1)
111 and
112 .IR import (4)).
113 Not usable by user
114 .IR none .
115 .TP
116 .B tcp17008
117 like
118 .BR tcp17007 ,
119 but serves the root of the tree,
120 forgoing the negotiation for which subtree to serve.
121 .TP
122 .B tcp17009
123 .I rx
124 remote execution.
125 .TP
126 .B tcp17010
127 server for
128 .IR cpu (1)
129 command.
130 .TP
131 .B tcp17013
132 server for old
133 .IR cpu (1)
134 command for compatibility with old clients.
135 .TP
136 .B tcp7
137 echo any bytes received (bit mirror)
138 .TP
139 .B tcp9
140 consume any bytes received (bit bucket)
141 .TP
142 .B tcp19
143 .B chargen
144 service.
145 .TP
146 .B tcp21
147 FTP daemon
148 .TP
149 .B tcp22
150 .IR ssh (1)
151 `secure shell' encrypted terminal connection or file transfer.
152 .TP
153 .B tcp23
154 .B telnet
155 terminal connection.
156 .TP
157 .B tcp25
158 mail delivery.
159 .TP
160 .B tcp53
161 TCP port for DNS.
162 .TP
163 .B tcp110
164 POP3 port.
165 .TP
166 .B tcp113
167 .B Ident
168 port (always reports
169 .BR none ).
170 .TP
171 .B tcp143
172 IMAP4rev1 port.
173 .TP
174 .B tcp445
175 CIFS/SMB file sharing.
176 .TP
177 .B tcp513
178 .B rlogin
179 terminal connection.
180 .TP
181 .B tcp515
182 LP daemon; see
183 .IR lp (8).
184 .TP
185 .B tcp565
186 report the address of the incoming call.
187 .TP
188 .B tcp993
189 Secure IMAP4rev1 port.
190 .TP
191 .B tcp995
192 Secure POP3 port.
193 .TP
194 .B tcp1723
195 PPTP (point-to-point tunnelling protocol) service.
196 .PD
197 .PP
198 At least the following services are available in
199 .BR /bin/service.auth ,
200 the usual
201 .IR trustsrvdir .
202 .TF \ tcp0000
203 .TP
204 .B tcp566
205 validate a SecureNet box.
206 .TP
207 .B tcp567
208 Plan 9 authentication-ticket service.
209 .PD
210 .PP
211 .I Listen1
212 is a lightweight listener intended for personal use,
213 modeled from Inferno's
214 .\" write out this way so automatic programs
215 .\" don't try to make it into a real man page reference.
216 \fIlisten\fR(1).
217 announces on
218 .IR address ,
219 running
220 .I cmd
221 .I args...
222 for each incoming connection;
223 the network directory is passed in the environment
224 as 
225 .BR $net .
226 Option
227 .B -t
228 causes
229 .I listen1
230 to run as the invoking user; the default
231 is to become
232 .B none
233 before listening.
234 Option
235 .B -v
236 causes verbose logging on standard output.
237 See
238 .B /rc/bin/tlssrvtunnel
239 for an example.
240 .SH FILES
241 .TF /env/sysname
242 .TP
243 .B /net/tcp
244 by convention, TCP device bind point
245 .SH SOURCE
246 .B /sys/src/cmd/aux/listen*.c
247 .br
248 .B /rc/bin/service*
249 .SH "SEE ALSO"
250 .IR authsrv (6),
251 .IR dial (2)
252 .SH BUGS
253 .IR Srvdir ,
254 .IR trustsrvdir
255 and
256 .I namespace
257 must all be absolute path names.