DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

hpnptyd(ADM)


hpnptyd -- HP network peripheral pty daemon

Syntax

/usr/lib/hpnptyd -m master_pty -x peripheral [-fk] [-p port] -t [ timeout ]
[-l logfile]

Description

hpnptyd provides a network connection between a pseudo terminal (pty) and an HP network peripheral. A daemon process is invoked for each network connection. To an application, operating on a pty has the appearance of operating on a local serial port.

hpnptyd opens the network connection when there is data from the pty. It sends data from the pty to the peripheral over the network connection and it passes data from the peripheral back to the pty. hpnptyd closes the network connection after a period when there is no more data from the pty or the network peripheral, and all the pty data has been sent to the network peripheral. The length of the inactivity period can be specified using -t timeout.

Normally, /etc/rc starts hpnptyd at bootup. When using hpnptyd, the print scheduler must be started after starting the pty daemons.

hpnptyd accepts the following options:


-f
Run in the foreground. Normally, hpnptyd runs in the background.

-k
Keep the network connection open. This option can be used in conjunction with the SIGHUP signal to control externally when the network connection is closed down. After the network connection is closed, new data from the pty will cause the connection to be re-opened.

-l logfile
Send verbose logging messages to file logfile. The logging messages detail what hpnptyd is doing. Included in the messages are how many bytes are read and written to the pty and to the network connection. hpnptyd performs no logging if this option is omitted.

-m master_pty
Specify master_pty as the master (controller) pty for a network connection. For each master pty, there will be a corresponding slave pty; application programs interface to the slave pty. The naming conventions for ptys is given in the ``Files'' section.

-p port
Specify port as the TCP/IP port number for a network connection. The default port number is 9100.

-t [ timeout ]
Specify timeout as the timeout period for a network connection. If there is no data from the pty or from the network peripheral for timeout seconds and all the data read so far has been written to the network peripheral, the network connection is closed. New data from the pty causes the network connection to be re-opened. The default timeout is 30 seconds. A timeout of 0 is not allowed.

-x peripheral
Specify peripheral as the peripheral for printing. This may be a host name or dotted decimal Internet address.

Signal handling

These signals have the specified effect when sent to hpnptyd using kill(C):

SIGHUP
Causes hpnptyd to close the network connection after a timeout interval when there has been no activity between the pty and network peripheral.

SIGUSR1
Turns on logging. hpnptyd appends the log file if it was specified. Otherwise, it writes to /usr/tmp/hpnptyd.<PID>.

SIGUSR2
Turns off logging.

Examples

To start up a single network connection from pty /dev/ptypa to peripheral remhost:

/usr/lib/hpnp/hpnptyd -m /dev/ptypa -x remhost

To send the contents of file plot1 over the network connection in the previous example:

cat plot1 > /dev/ttypa

Limitations

The print job is not re-sent if the peripheral is power cycled while the job is printing. Also, if the print job is small, the application may complete sending before the print job is printed. The print job may be buffered at the pty or at hpnptyd waiting to be sent to the peripheral.

Files


/dev/pty[pqr][0-9a-f]
master pseudo terminals

/dev/tty[pqr][0-9a-f]
slave pseudo terminals

/usr/tmp/hpnptyd.PID
default log file name

See also

hpnpf(ADM)

Standards conformance

hpnptyd is not part of any currently supported standard; it was developed by Hewlett Packard and is used with permission.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003