DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

hpnpf(ADM)


hpnpf -- network peripheral filter

Syntax

/usr/lib/hpnp/pnpf -x peripheral [ -nNrRv ] [ -c port ] [ -l logfile ]
[ -p port ] [ file ... ]

Description

hpnpf reads each file in sequence sending it to a network peripheral over a TCP connection. hpnpf writes any output from the network peripheral to the standard output. As with cat(C), hpnpf reads from the standard input if no input file is given or if the argument - is encountered. This enables you to combine the standard input with other files.

If hpnpf fails to make a connection to peripheral, it retries the connection until it is successful. The -R option prevents it retrying.

hpnpf can operate as an output filter, an input filter, and as both an output and input filter (``relay'' mode).

Using hpnpf as a relay process (using the -r option) allows the banner page and all print job files to be sent to the network peripheral over a single connection.

hpnpf accepts a banner page from the standard input, sends it to the network peripheral, and then relays further data sent by the input filters. The file .port, written by hpnpf in the current directory, indicates the control and data ports that the input filters use to connect to hpnpf. After the input filter completes a file, it waits for a single byte response from hpnpf on the control port. A response of zero indicates that hpnpf transmitted the data successfully and its buffers are empty. A non-zero response indicates an error.

hpnpf accepts the following options:


-c port
Create a control line connection. This option is only used when /etc/printcap specifies hpnpf as an input filter to pass data through a relay process on the same host.

-l logfile
Write verbose logging information to logfile. The logging messages are detailed messages about what hpnpf is doing. Included in the messages are how many bytes are read and written to the network connection. hpnpf performs no logging if you omit this option.

-n
Send the PCL escape sequence (ESC&k2G) before the files. This sets the end-of-line character to be newline (ASCII LF) instead of carriage-return/line-feed.

-N
Translate newline (ASCII LF) characters to carriage-return/line-feed character pairs for data sent to the network peripheral. Do not use this option for binary transfers.

-p port
Connect to port on the network peripheral. The default is port 9100.

-r
Operate in relay mode. This option is only used when /etc/printcap specifies hpnpf as an output filter together with a separate input filter. hpnpf ignores any files listed on the command line when operating in relay mode.

-R
Do not retry if the first connection attempt fails. This option allows the retry interval and number of retries before giving up to be controlled externally to hpnpf.

-v
Verbose mode. Display messages to the standard error when the connection is initiated and when it succeeds. Print a number sign ``#'' to the standard error output for each 1024 bytes transferred.

-x peripheral
Send the file to peripheral; this may be a host name or dotted decimal Internet address.

Return values

hpnpf returns 0 if all the files are sent successfully. It returns a non-zero value if a failure was detected.

See also

hpnptyd(ADM)

Standards conformance

hpnpf is not part of any currently supported standard; it was developed by Hewlett Packard and is used with permission.


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005