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