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