GURI SoftHouse
System Development,
Auditing and Consulting

INDEX


NAME
ABSTRACT
SYNOPSYS
DESCRIPTION
DIAGNOSTICS
BUGS
COMMAND ARGUMENTS
CONFIGURATION PARAMETERS
AUTHOR
LICENSE


NAME

lpproxy 3

ABSTRACT

Proxy applicaton for Printers, emulating the JetDirect protocol

ABSTRACT

Implement the JetDirect protocol and session under Proxy.

DESCRIPTION

The application service lpproxy is a proxy with TCP session for network printers with or without JetDirect protocol. The application can be used to emulate a printing service system when the printer is directly attached to the computer (by using a parallel, USB or serial port) and the computer acts as a intermediate network element (Proxy) between the client network and the printer.

Before any document printing through the network, lpproxy prints one face page with informations provided by network (IP address) and/or tables stored at local system: Date, Ip Address, client host name, and, if available, the office number, phone extension, and the personal name of who commanded that document printing.

DIAGNOSTICS

Printing Failures and Sucess are registered at specific file or through system syslog.

BUGS

A lot!

COMMAND ARGUMENTS

lpproxy application accepts several command line arguments to modify its behavior, using the syntaxes:

lpproxy [-C arq-conf] [-c] [-v] [-d ou -h]

-C arq-conf
The option -C defines the full path name of configuration file with name arq-conf. If undefined the full name is /etc/lpproxy.conf.

-c
The option -c forces that file reading, showing its contents and default values. If that file did not exist, or is defined at option -C then the option -c creates a configuratin file with all default values.

-v
The option -v enables the verbose mode of application, showing all actions taken or decided.

-d
The option -d enables the application running at daemon mode, leting it ready to answer printing queries.

-h
The option -h only shows this quick help.

CONFIGURATION PARAMETERS


The configuration file lpproxy.conf stores a set of parameters. It MUST BE located at directory /etc. So, the full path name is "/etc/lpproxy.conf". Each parameter has its default value, that will be used when that parameter is omitted. If the parameter is defined but without value then the value is retrieved from system (for instance: daemon account, execution directory, etc).

The parameters are defined following the syntax:

key=value

user
After reading the configuration file, the application lpproxy is drops its privilege to this user. The application does not need any exceptional privilege. Even if it starts as root (super user) it will drop the privilege for the user defined by the key user. The default user is lpproxyusr and the group with the same name. The administrator MUST create that user and group. The user/group ashall be owner of directory /var/lib/lpproxy.

working-dir
It defines where the files are stored and where the template is stored. If it is omitted then the lpproxy uses the default value, that is /var/lib/lpproxy. It is important that user has permission to write into this directory.

template
This parameter defines the template file of face page. It must be the full path name of template file (a postscript file) that will be sent to the printer as face page. if the printer is not postscipt compatible then the administrator MUST create one. A simple method is select the template text file. It will be printed as ASCII and will be printed "as is". To create your own postscript template you can use the application "a2ps". The default file name is "lpproxy.ps". There is a demo version available.

logfile
It defines the full path name of log file. The default value is working-dir/lpproxy.log

ip-location
It defines the full path name of file related to database with addictional user information. Each record has the format:

IP-ADDRESS    OFFICE-ROOM       PHONE-EXTENSION

The default value is working-dir/lpproxy.db

If this parameter is ommitted then no additional information is provided, only the IP-ADRRESS.

proxy-port
It defines the port number to listen service for client network side. The default value is 9100.

proxy-ip
It defines the IP-address to listen for proxy emulation. The default value is 0.0.0.0 (all IP address of the system).

printer-port
It defines the destination port number of printer, when it is a JetDirect Printer. It can be zero (0) when the printer is directly attached to a serial, USB or parallel port. It MUST be the same port where the JetDirect printer is listen (usually 9100).

printer-ip
It defines the destination IP address of JetDirect Printer. It MUST be zero ("0.0.0.0") when the printer is not JetDirect and it is attached to serial, USB or parallel port. The default value is 127.0.0.1.

printer-dev
It defines the port name when the printer is not JetDirect. If the printer is JetDirect then this parameter MUST BE OMMITED. The default value is /dev/lp0.

If the printer is attached to serial port then the value must be port complaint, ie. /dev/ttySn, for serial port; /dev/ttyUSBN for USB->serial port; /dev/lpN for parallel port.

idletime
It defines the wait time, in seconds, to close the TCP conection after the client sent the document. Usually the client application closes the connection but, for any reason, this can not happen. At this situation the lpproxy will close the connection if no more data was received. The default value is 90 seconds.

retry-printer
It defines number that the application tries to connect to printer. The default value is 3. The application will try that conection forever after idletime.

AUTHOR

Ulisses Thadeu Vieira Guedes
GURI SoftHouse LTDA.

LICENSE

GPL