usbmodeswitch: Updated to v.1.2.6 from shibby's branch.
[tomato.git] / release / src / router / p910nd / p910nd.8
blob109ce205aca856f0546171422a967ad859a7a62b
1 .TH P910ND 8 "16 February 2011"
2 .SH NAME
3 p910nd \- port 9100+n printer daemon
4 .SH SYNOPSIS
5 .B p910nd
6 [\fB-f device\fR]
7 [\fB-i bindaddr\fR]
8 [\fB-bv\fR]
9 [\fB0|1|2\fR]
10 .SH DESCRIPTION
11 .I p910nd
12 is a small daemon that copies any data received on the port
13 it is listening on to the corresponding printer port.
14 It is primarily intended for diskless Linux hosts running as printer drivers
15 but there is no reason why it could not be used on diskful hosts.
16 Port 9100 is copied to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2.
17 The default is port 9100 to /dev/lp0.
18 .LP
19 The \fB-f\fR option can be used to specify a different printer device,
20 e.g. /dev/usblp0.
21 .LP
22 The \fB-i\fR option can be used to specify binding to one address instead
23 of all interfaces which is the default.
24 .LP
25 The \fB-b\fR option turns on bidirectional copying.
26 .LP
27 The \fB-v\fR option shows the version number.
28 .SH INSTALLATION
29 .I p910nd
30 can be run as a standalone daemon or from (x)inetd.
31 It will automatically detect if it is running under (x)inetd.
32 .LP
33 A sample SysVinit script,
34 .IR p910nd.sh ,
35 is provided for operation as a daemon.
36 .I p910nd
37 will change its name under ps to match the printer port, i.e.
38 .I p9100d, p9101d
39 and
40 .IR p9102d .
41 .LP
42 When running under (x)inetd, the
43 .I /etc/inetd.conf
44 entry should look something like this (with tcpwrappers protection):
45 .sp
46 .nf
47 p9101 stream tcp nowait root /usr/sbin/tcpd /sbin/p910nd
48 .fi
49 .sp
50 Don't forget to add an entry in
51 .I /etc/services
52 for the corresponding port.
53 .LP
54 If operating with lprng, use the host%port syntax for the
55 printer device to send jobs to it.
56 .LP
57 If operating with CUPS, this is supported as the AppSocket
58 protocol, also known as the JetDirect (probably TM) protocol.
59 .LP
60 If operating with classic Berkeley lpd, a sample client,
61 .IR client.pl ,
62 is provided.
63 This should be installed as the ifilter (if=) in /etc/printcap.
64 .I banner.pl
65 should be installed as the ofilter (of=) in /etc/printcap.
66 It may be necessary to create a dummy spool file for lpd (lp=).
67 This file will be opened but not written to.
68 The corresponding C versions are left as an exercise for the reader.
69 .LP
70 When running under inetd, more than one instance could be started.
71 To avoid problems with multiple instances attempting to access the
72 printer at the same time, make sure that only one client is active
73 at any one time. This can be done by designating one host as the
74 spooler and sending all jobs to this host. You will probably
75 need to set up an intermediate queue anyway to provide print job filtering.
76 .LP
77 If built with USE_WRAP, it uses the libwrap library (tcpwrappers).
78 Access control can be done with /etc/hosts.allow
79 and /etc/hosts.deny. The service name is p910nd.
80 .SH DIAGNOSTICS
81 .I p910nd
82 logs error messages to syslog.
83 .SH "SEE ALSO"
84 printcap(5), hosts_access(5)
85 .SH FILES
86 /var/run/p9100d.pid, /var/lock/subsys/p9100d, /etc/hosts.allow, /etc/hosts.deny
87 .SH COPYRIGHT
88 .I p910nd
89 is under the GNU Public License Version 2
90 .SH AUTHOR
91 Ken Yap (greenpossum ATSIGN users PERIOD sourceforge PERIOD net)
92 .SH DATE
93 Version 0.95 February 2011