123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- .TH LISTEN 8
- .SH NAME
- 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
- .SH SYNOPSIS
- .B aux/listen
- .RB [ -q ]
- .RB [ -d
- .IR srvdir ]
- .RB [ -t
- .IR trustsrvdir ]
- .RB [ -n
- .IR namespace ]
- .RI [ net ]
- .PP
- .B aux/listen1
- [
- .B -tv
- ]
- .I addr
- .I cmd
- [
- .I args...
- ]
- .SH DESCRIPTION
- .I listen
- listens on a network for inbound calls to local services.
- .I Net
- is the network protocol on which to listen, by default
- .BR /net/tcp .
- The services available are executable, non-empty files in
- .I srvdir
- or
- .IR trustsrvdir .
- If neither
- .I srvdir
- nor
- .I trustsrvdir
- is given,
- .I listen
- looks for executable files in
- .BR /bin/service .
- Services found in
- .I srvdir
- are executed as user
- .BR none ;
- services found in
- .I trustsrvdir
- are executed as the user who started
- .IR listen .
- When changing user to
- .BR none ,
- a new namespace is created,
- usually by executing
- .BR /lib/namespace ,
- but
- .B -n
- selects an alternate
- .IR namespace .
- Option
- .B -q
- suppresses affirmative log information.
- .PP
- Service names are made by concatenating the name of
- the network with the name of the service or port.
- For example,
- an inbound call on the TCP network for port 565 executes service
- .BR tcp565 .
- .PP
- At least the following services are available in
- .BR /bin/service .
- .TF \ tcp0000
- .TP
- .B tcp564
- serve a piece of the name space using the Plan 9 file system protocol,
- with authentication via
- .I Tauth
- (in
- .IR attach (5)),
- no encryption,
- and multiplex multiple users on a single connection
- (used by
- .IR srv (4),
- and also by Unix systems to see Plan 9 files).
- .TP
- .B tcp17007
- serve a piece of the name space using the Plan 9 file system protocol,
- with authentication at the start,
- optional SSL encryption,
- and no multiplexing of users
- (typically used by
- .IR cpu (1)
- and
- .IR import (4)).
- Not usable by user
- .IR none .
- .TP
- .B tcp17008
- like
- .BR tcp17007 ,
- but serves the root of the tree,
- forgoing the negotiation for which subtree to serve.
- .TP
- .B tcp17009
- .I rx
- remote execution.
- .TP
- .B tcp17010
- server for
- .IR cpu (1)
- command.
- .TP
- .B tcp17013
- server for old
- .IR cpu (1)
- command for compatibility with old clients.
- .TP
- .B tcp7
- echo any bytes received (bit mirror)
- .TP
- .B tcp9
- consume any bytes received (bit bucket)
- .TP
- .B tcp19
- .B chargen
- service.
- .TP
- .B tcp21
- FTP daemon
- .TP
- .B tcp22
- .IR ssh (1)
- `secure shell' encrypted terminal connection or file transfer.
- .TP
- .B tcp23
- .B telnet
- terminal connection.
- .TP
- .B tcp25
- mail delivery.
- .TP
- .B tcp53
- TCP port for DNS.
- .TP
- .B tcp110
- POP3 port.
- .TP
- .B tcp113
- .B Ident
- port (always reports
- .BR none ).
- .TP
- .B tcp143
- IMAP4rev1 port.
- .TP
- .B tcp513
- .B rlogin
- terminal connection.
- .TP
- .B tcp515
- LP daemon; see
- .IR lp (8).
- .TP
- .B tcp565
- report the address of the incoming call.
- .TP
- .B tcp993
- Secure IMAP4rev1 port.
- .TP
- .B tcp995
- Secure POP3 port.
- .TP
- .B tcp1723
- PPTP (point-to-point tunnelling protocol) service.
- .PD
- .PP
- At least the following services are available in
- .BR /bin/service.auth .
- .TF \ tcp0000
- .TP
- .B tcp566
- validate a SecureNet box.
- .TP
- .B tcp567
- Plan 9 authentication-ticket service.
- .PD
- .PP
- .I Listen1
- is a lightweight listener intended for personal use,
- modeled from Inferno's
- .\" write out this way so automatic programs
- .\" don't try to make it into a real man page reference.
- \fIlisten\fR(1).
- announces on
- .IR address ,
- running
- .I cmd
- .I args...
- for each incoming connection;
- the network directory is passed in the environment
- as
- .BR $net .
- Option
- .B -t
- causes
- .I listen1
- to run as the invoking user; the default
- is to become
- .B none
- before listening.
- Option
- .B -v
- causes verbose logging on standard output.
- See
- .B /rc/bin/tlssrvtunnel
- for an example.
- .SH FILES
- .TF /env/sysname
- .TP
- .B /net/tcp
- by convention, TCP device bind point
- .SH SOURCE
- The sources to
- .I listen
- and
- .I listen1
- are
- .B /sys/src/cmd/aux/listen.c
- and
- .BR /sys/src/cmd/aux/listen1.c .
- The other commands are
- .IR rc (1)
- scripts in
- .BR /rc/bin/service .
- .SH "SEE ALSO"
- .IR authsrv (6),
- .IR dial (2)
|