NAME
     printcap - printer capability data base

SYNOPSIS
     /etc/printcap database 

DESCRIPTION
     The format of the LPNng printcap database was based  on  the
     termcap(5)  data  base file format.  Entries in the printcap
     Each entry in the  data  base  is  used  to  define  various
     options  and  values to control the printing and spooling of
     print jobs.

CAPABILITIES
     The database is a simplified form of the termcap  (5)  data-
     base.   Leading  whitespace  on  each line is discarded, and
     blank lines or lines which then start with a comment charac-
     ter  (#)  are discarded.  A line which does not start with a
     colon (:) or bar (|)  starts  a  printer  entry  definition.
     Lines ending with a backslash (\) are assumed to continue to
     the next line; this is for compatibility with other histori-
     cal  printcap  file formats.  Trailing blanks and tabs (whi-
     tespace) for an option value are deleted unless the last one
     is escaped with a backslash (``\'').

     A printer definition starts with a   primary  printer  name,
     followed by zero or more alternative printer names, followed
     by a set of keyword entries and values.  For example:

     #comment
     # primary printer name
     lp
     #alternate names
      |lp2|lp3
      |Example of a printer
      :sd=/usr/spool/LPD/lp
      :rw:lp=/dev/lp:mx#100
     include /etc/printcap/mainprintcap


     The special printcap definition include will read the  named
     file,  which must have an absolute pathname, as the next set
     of printcap entries.

     Keywords can be 1 to  an  indefinate  number  of  characters
     long,  and  are  case sensitive.  Values for keywords can be
     strings (:st=string:), signed integer  values  using  the  C
     language  notation,  (:nu#12:max#-2:mask#0x1EF:),  or  flags
     (:flag: to set to 1, :flag@: to clear to 0).  Integer values
     must be representable as 32 bit 2's complement numbers; care
     should be taken with extremely large numbers.

     If the primary name of a printcap entry starts with a  punc-
     tuation  character,  then  the entry may be referenced using
     the tc capability, but is ignored  otherwise.   This  allows
     common printcap information to be placed in a single entry.

     The special printcap entry oh (i.e. - only this host) may be
     used  to  select  a  printcap  entry  for use by one or more
     hosts.  The oh entry can be a list of one or more host names
     or  glob type of patterns.  These patterns are first applied
     to the host's fully qualified domain name, and then used  to
     to  a  lookup of an IP address.  If either the glob match or
     the host has a matching IP address then the  printcap  entry
     is selected for use.  In addition, the server flag indicates
     that only the LPD server is  to  use  this  printcap  entry.
     This  allows client and server printcap information be to be
     segragated in a simple manner.

     The following is a list of the keywords  currently  used  by
     the LPRng software.  Many of these keywords are used only by
     the LPD server, others are used by the client programs  LPR,
     LPC, LPRM, PAC, as well as the server.  In the Use column in
     the table below, an A stands for all programs, D stands  for
     lpd, and R stands for the client programs such as LPR.

     Some of these entries can only appear or have an  effect  if
     they   are   in   the  lpc.conf  initialization  file.   See
     lpd.conf(5) for further details.

ENTRIES BY ALPHABETICAL ORDER
     FL  Use Type Default     Description
     Xf  D   str  NULL        output filter for format X (used by lpd)
     ab  D   bool false       always print banner, ignore lpr -h option
     ac  A   str  NULL        allowed classes to be printed (default is all classes)
     achk    D    bool false
                              If TRUE LPD will check for a 'ACCEPT' reply to the initial
                              accounting information written to a filter at the start
                              of a job.
     ae  D   str              accounting format for end of job (see also af, la, ar
                              and Accounting)
     af  D   str  NULL
                              name of accounting file or server (see also la, ar)
                              If the af field has the format |program,  a filter will
                              be started and used for recording accounting information;
                              if the format is host%port,  a tcp socket connection will
                              be made to the port on the host.  The as and ae strings
                              will be printed to the specified destination.  This
                              connection will be passed to filters as file descriptor 3.
                              The accounting file will not be created, it must exist for
                              LPD to append data to it.
     ah  D   bool false       auto-hold - job held until explicitly released
     all A   str  NULL        a list of all printers; (see ALL PRINTERS)
     allow_duplicate_flags    A   bool    false
                              allow duplicate command line flags; last overwrites earlier
     allow_getenv A           bool    (compile time)
                              allows LPRng software to use the LPD_CONF environment variable
                              to specify the location of a configuration file.  This is
                              for testing only.
     allow_user_logging       A   bool    false
                              if mail is requested using lpr -mhost%port,prot operations,
                              and the allow_user_logging flag is true,  then job logging
                              information will be sent to host%port,prot.
     ar  D   bool true        write remote transfer accounting (if af, and as/ae set)
     architecture A           str (compile time)
                              architecture the software was compiled for. (Obsolete.)
     as  D   str              accounting format for start of job (see also af, la, ar
                              and Accounting)
     be  D   str              banner printing program for end (overrides bp, hl)
     bk  R   bool false       Berkeley-compatible: be strictly RFC-compliant
                              or more exactly, BSD LPR compatible when sending jobs.
     bkf R   bool false
                              use bk_filter_options and bk_of_filter_options when
                              invoking print filter.
     bk_filter_options        D   str (see source code)
                              when bk flag set, options for non OF print filters
     bk_of_filter_options     D   str (see source code)
                              when bk flag set, options for OF print filters
     bl  D   str              banner line - sent to banner printer program
                              default: $-'C:$-'n Job: $-'J Date: $-'t
                              expands to:  Class:User  Job: job Date: date
                              This is to force compatibility with vintage print filters
                              that require a non-standard banner string. Usually used with
                              :sb: option.
     bp  D   str              banner printing program (see hl)
                              (default: configuration variable default_banner_printer)
     bq  D   str  NULL        specifies the next destination for jobs sent to this queue.
                              Job data files are first sent through any filters listed in
                              printcap entry before transfer.  (See Bounce Queues)
     br  D   num  none        if lp is a tty, set the baud rate (see ty)
     break_classname_priority_link    A   flag  false
                              Normally, lpr sets the priority to the first letter of the
                              class specified with -C.  When non-zero, forces the class
                              and priority to be disjoint.
     bs  D   str              banner printing program for start (overrides bp, hl)
     cd  D   str  NULL        control information directory for LPD server
     cf  D   str  NULL        cifplot data filter
     check_for_nonprintable   R   bool    true
                              lpr checks f and p formats for printable files
                              Alias for xt
     check_idle   D           str NULL
                              program to use to check for idle printer conditions before
                              processing jobs.
     classname_length         A   num 31
                              overrides the RFC1179 limitations on the control file
                              CLASS entry.  Default is 31 characters.

     cm  A   str  NULL        comment identifying printer (LPQ)
     co  D   num  20          cost in dollars.  Obsolete.
     config_file  A           str /etc/lpd.conf:/usr/etc/lpd.conf
                              location of LPRng configuration information.  Compile
                              time option only - see allow_getenv.
     connect_grace            A   num 0
                              time between jobs to allow printer recovery
     connect_interval         A   num 10
                              time between open or connection attempts
     connect_timeout          A   num 10
                              timeout value for connection or open
     control_filter           D   str NULL
                              Filter for control file. Used when sending job to remote
                              spool queue.
     db  A   str  NULL        LPD debug options when serving this queue.
                              See lf (log file) entry as well.
     default_auth R           str NULL
                              default client to server authentication type
                              used when specificially requested by user.
     default_format           R   str f
                              default format for printing jobs
     default_logger_port      D   str 2001
                              default remote port for logging information
     default_logger_protocol  D   str UDP
                              default protocol for logging information.  TCP selects TCP/IP
     default_permission       D   str A
                              default permission for operation
     default_printer          A   str lp
                              default printer for printing jobs
     default_priority         R   str A
                              default priority for printing jobs
     default_remote_host      A   str localhost
                              default remote host for printing operations
     default_tmp_dir          A   str /tmp
                              default temporary directory
     destinations D           str NULL
                              names of printers that lpq/lprm should talk to
                              find a job that has been processed by a router
                              script (see README.routing)
     df  D   str  NULL        tex data filter (DVI format)
     direct_read  D           bool    false
                              if true, filters are given direct access to file.
                              This means no progress indication possible.
     fc  D   num  OBSOLETE    if lp is a tty, clear flag bits (see STTY)
     fd  D   bool false       if true, no forwarded jobs accepted
     ff  D   str  ``\f''      string to send for a form feed (see INITIALIZATION)
     filter_ld_path           D   str (see source)
                              the LD_LIBARY_PATH environment variable value for filters
     filter_options           D   str (see source code)
                              when bk flag clear, options for non OF print filters
     filter_path  D           str (see source)
                              the PATH environment variable value for filters

     fix_bad_job  D           bool    false
                              fix a bad job file - usually by ignoring multiple
                              U (unlink) entries,  badly formatted file names,
                              or other common botches produced by various PC based
                              LPR clients.
     fo  D   bool false       print a form feed when device is opened
     force_fqdn_hostname      A   bool    FALSE
                              Force a fully qualified host name in control file
     force_localhost          A   bool    FALSE
                              Forces the clients programs (lpr, lpc, etc.)
                              to send all print jobs and requests to the server running
                              on the localhost entry for action.  This flag effectively
                              forces BSD LPR behaviour.
     force_queuename          A   str NULL
                              When :qq: flag or use_queuename configuration is enabled,
                              specifies the queuename to be used for control file Q
                              information.
     forward_auth A           str NULL
                              Do server to server authentication when non-null.
                              Use this value for the remote host authentication information.
     fq  D   bool false       print a form feed when device is closed
     full_time    D           bool detailed time format specification in log messages
     fs  D   num  OBSOLETE    like `fc' but set bits (see STTY)
     fx  A   str  ``flp''     valid output filter formats
     generate_banner          D   bool    false   force banner generation
     gf  D   str  NULL        graph data filter (plot (3X) format)
     hl  D   bool false       print banner after job instead of before
     ignore_requested_user_priority   D   bool    false
                              Ignore the requested user priority when ordering jobs.
                              Prevents students... um... users from queue jumping.
     if  D   str  NULL        filter command, run on a per-file basis
     kerberos_*   D           str
                              Kerberos authentication support.  See KERBEROS.
     kerberos_keytab          D   str /etc/lpd.keytab
                              Kerberos lpd server keytab file
     kerberos_life            D   str NULL
                              Kerberos lpd server key lifetime
     kerberos_renew           D   str NULL
                              Kerberos lpd server key renewal time
     kerberos_server_principle    D   str NULL
                              Kerberos remote lpd server principle
     kerberos_service         D   str lpr
                              Kerberos service used in principle requests
     la  D   bool true        write local printer accounting (if af is set)
     ld  D   str  NULL        leader string printed on printer open (see INITIALIZATION)
     lf  D   str  ``log''     error and debugging log file (LPD)
     lk  D   bool false       lock the lp device to force arbitration
     localhost    A           str localhost       localhost named used for localhost lookup
     lockfile     D           str /var/spool/lpd/lpd.lock.%h
                              lpd lock file (used only in lpd.conf)
     logfile D    str         /var/spool/lpd/lpd.log.%h
                              lpd log file (used only in lpd.conf)

     logger_destination       D   str NULL
                              destination for logging information.  Format is
                              host[%port][,(TCP|UDP)]
     longnumber   D           bool    false
                              use 6 digit job numbers
     lp  D   str  NULL        device name or pipe to send output to
     lpd_force_poll           A   bool    FALSE
                              Forces lpd to periodically poll lpd queues.
     lpd_poll_time            A   num 600
                              After this amount of idle time,  lpd will poll queues
     lpd_port     D           str printer
                              integer or port from /etc/services for lpd server
                              to accept connections.
     lpd_printcap_path        D   str (see source)
                              printcap path for lpd, in addition to normal one
                              (configuration value only)
     lpr_bounce   R           bool    true
                              LPR will do bounce queue filtering.
     mail_operator_on_error   D   str NULL
                              send mail to this user when LPD encounters printing error.
     max_connect_interval     A   num 60
                              maximum time between connection attempts
     max_log_file_size        D   num 0
                              maximum log file size in K bytes (0 is unlimited)
                              spool queue log file truncated to min_log_file_size
                              when value is nonzero and limited exceeded.
     max_servers_active       D   num 0
                              maximum servers that LPD will allow to be active at one
                              time.  0 selects the system default,  which is usually
                              pretty small, perhaps 10. (configuration value only).
     max_status_line          D   num 79  maximum number of characters on an LPQ status line
     max_status_size          D   num 10  maximum size (Kbytes) of status file
     mc  R   num  1           maximum copies allowed
     mi  D   str  0           minimum space (Kb), to be left in spool filesystem
                              You can also use nnnM for nnn megabytes. Alias for minfree
     min_log_file_size        D   num 0   minimum size (Kbytes) of log file
     min_status_size          D   num 2   minimum size (Kbytes) of status file
     minfree D    str         0   alias for mi
     ml  R   num  32          minimum printable characters for printable check
     ms  D   str  NULL        alias for ty
     ms_time_resolution       D   bool    false  log time in milliseconds
     mx  R   num  1000        maximum job size (1Kb blocks, 0 = unlimited)
     nb  D   num  0           if non-zero, do a nonblocking open on lp device
     nf  D   str  NULL        DITROFF data filter
     network_connect_grace    A   num 0
                              time between attempts to send jobs to spooler
                              Useful when dealing with network printer using LPD
                              interface to allow a bit of time between jobs.
     nw  A   bool false       spool dir is on an NFS file system
                              (take precautions when reading/writing files)
     of  D   str  NULL        output filter, run once for all output
                              (used for banner printing, form feeds between files)

     of_filter_options        D   str (see source code)
                              when bk flag clear, options for OF print filters
     originate_port           A   str 512 1023
                              when originating a connection, use ports in this range.
     oh  A   str  NULL        Specific printcap entry for host;
                              (printcap entry ignored unless IP address of host and
                              entry value match.  Entry is used first to do glob
                              style match against the host's fully qualified domain name,
                              and then interpreted as a general IP address)
     pass_env     A           str PGPPASS,PGPPATH
                              if not the LPD server, sanitize and put these variables
                              in a filter environment variable list.
     perms_path   A           str /etc/lpd.perms:/usr/etc/lpd.perms
                              location of perms file (used in lpd.conf)
     pl  D   num  66          page length (in lines)
     pr  D   str  ``/bin/pr'' pr program for p format
     printcap_path            A   str /etc/printcap:/usr/etc/printcap
                              location of printcap file (used in lpd.conf)
     ps  A   str  ''status''  printer status file name
     pw  D   num  132         page width (in characters)
     px  D   num  0           page width in pixels (horizontal)
     py  D   num  0           page length in pixels (vertical)
     qq  A   bool false       LPR - puts in the queue name (Q entry)
                              in the job control file when spooled or transferred.
                              LPD - when receiving or transferring a job,
                              if the queue name (Q entry) in the job control
                              file is not present,  puts in the queue name.
     remote_user  A           str NULL
                              when doing authentication,  use this entry for the remote user
                              or remote end of the connection.  This allows you to specify
                              a key or other information.
     remote_support           A   str NULL
                              if non-null, specifies allowed operations to remote queue.
                              R=lpr, M=lprm, Q=lpq, V = lpq -v, C=lpc.  For example,
                              remote_support=RM would only allow LPR and LPRM operations.
     retry_econnrefused       A   bool    true
                              if set, retry a connection to a remote system when an
                              ECONNREFUSED error is returned.
     retry_nolink D           bool    true
                              if LPD is sending a job or opening a device for
                              printing and the value is true, then the connection or
                              device open is repeated indefinately.
     return_short_status      D   str NULL
                              Some legacy (non-LPRng) LPQ programs expect 'short' status
                              to be returned.  This option allows you to specify which hosts
                              will get it.  The value is a list of hosts and/or IPaddresses
                              and masks to which the LPD server will provide short status.
                              For example:  return_short_status=192.8.0.0/16 will make LPD
                              return short status to all requests from hosts in subnet
                              192.8.0.0.  (See short_status_length)
     reuse_addr   A           bool    false
                              if set, use SO_REUSEADDR on outgoing connection ports.
                              This reduces the problems with exhausting port numbers.
                              (usually only in lpd.conf)
     reverse_lpq_status       D   str NULL
                              When a lpq status request arrives from one of the specified
                              hosts or IP addresses,  then the LPQ status format is inverted.
                              For example, if  reverse_lpq_status=host*,127.0.0.0/8,
                              then when a LONG status request arrives from host1 or from
                              ip address 127.0.0.1,  the SHORT status will be returned.
     rf  D   str  NULL        filter for printing FORTRAN style text files
     rm  A   str  NULL        remote-queue machine (hostname) (with rp)
     router  D    str         NULL    script that dynamically re-routes a job
                              (see README.routing)
     rp  A   str  NULL        remote-queue printer name (with rm)
     rt  A   num  3           number of times to try printing (0=infinite)
                              see send_failure_action, send_job_rw_timeout, send_try
     rw  D   bool false       open the printer for reading and writing
     safe_chars   D           str NULL    additional safe characters for control file contents
     save_on_error            D   bool    false
                              Save job when an error occurs to allow post-mortem
                              diagnostics or reprinting.  This should only be set on
                              print queues.  It is also a diagnostic aid.
     save_when_done           D   bool    false
                              Save job when done (printed, transferred) to allow
                              retry at a later time.  This should only be set on
                              print queues.  It is also a diagnostic aid.
     sb  D   bool false       short banner (one line only)
     sc  R   bool false       suppress multiple copies
     sd  A   str  NULL        spool directory (only ONE printer per directory!)
     send_block_format        A   bool    false
                              Use the LPRng extended 'block job' job transmission
                              method to send a job to a remote site.
     send_data_first          A   bool    false   send data files then control files
                              when sending a job to a remote host.
     send_failure_action      D   str "abort"
                              Action on print or transmission failure after send_try
                              attempts; use the following codes:
                              'success' (JSUCC)  - treat as successful
                              'abort'   (JABORT) - abort printer
                              'retry'   (JRETRY) - retry job
                              'remove'  (JREMOVE)- remove job
                              'hold'    (JHOLD)  - hold job
                              If the value is "|/filter", the filter will be run and
                              the number of attempts can be read from standard input.
                              The filter should exit with one of the error codes listed
                              above to cause the appropriate action.
     send_job_rw_timeout      A   num 6000
                              timeout on read/write operations when sending job to
                              printer or remote host (0 value is no timeout)
     send_query_rw_timeout    A   num 6000
                              timeout on read/write operations when performin a status
                              operation (0 value is no timeout)
     send_try     A           num 3
                              alias for rt - numbers of times to try sending
                              or printing a job. 0 is infinite.
     sendmail     D           str /usr/sbin/sendmail -oi -t
                              sendmail command to send mail to user.  Flags must be set
                              so that address and other information is taken from
                              standard input.
     server  A    bool        false   printcap entry for server only
     server_auth_command      A   str NULL
                              authentication command for server program
     server_tmp_dir           D   str /tmp
                              temporary directory for server to create files when there
                              is no spool directory.
     server_user  D           str daemon  server user name used in authentication operations
     sf  D   bool false       suppress form feeds separating jobs
     sh  D   bool false       suppress headers and/or banner page
     short_status_length      D   num 1
                              If the return_short_status value is used and has a match against
                              a requesting address, this amount of status is set by the
                              short_status_length option.  For most legacy systems a 1 is
                              suitable (1 line of status).
     socket_linger            A   num 10
                              if nonzero, forces a SO_LINGER operation to be done
                              on all TCP/IP connections.  This usually corrects a problem
                              with missing last data transmissions to remote hosts.
     spool_dir_perms          D   num 042700      permissions for spool directory
     spool_file_perms         D   num 0600        permissions for spool file
     spread_jobs  D           num 0   spread job numbers to avoid collisions
     ss  D   str  NULL        name of queue that server serves (with sv)
     stalled_time D           num 120
                              Time after which to report an active job as stalled
     stop_on_abort            D   bool    true
                              Stop processing queue when print filter aborts.
     sv  D   str  NULL        names of servers for queue (with ss)
     sy  D   str  NULL        alias for ty
     syslog_device            D   str /dev/console
                                  name of syslog device to use if no syslog facility
     tc  A   str  NULL        reference to a printcap entry to include as part of
                              the current entry.
     tf  D   str  NULL        troff data filter (C/A/T phototypesetter)
     tr  D   str  NULL        trailer string to print when queue empties
     translate_format         D   str NULL
                              translate job format (similar to tr(1) utility)
                              only valid when transferring to remote spool queue.
                              Example: translate_format=pfml
                              p format changed to f, m format to l
     ty  D   str  NULL        stty commands to set output line characteristics
                              alias is sy, ms
     use_identifier           R   bool    false
                              add job identifier lines ('A') in the control file
     use_info_cache           D   bool    true    cache printcap information
     use_queuename            A   str NULL        if no Q information in control file,
                              use this value and place in control file.

     use_shorthost            R   bool    false
                              use only the hostname for job control
                              and data file names.  Host information in job file
                              will still be fully qualified domain name.
     user    D    str         daemon  LPD effective user (EUID) for SUID operations
     user_auth_command        A   str NULL
                              authentication command for user (client program)
     user_lpc     D           str NULL
                              list of lpc subcommands allowed to be executed by user
                              A matching value enables SERVICE=U permissions checking.
     vf  D   str  NULL        (Versatek) raster image filter
     xc  D   num  0           if lp is a tty, clear local mode bits (see STTY)
     xs  D   num  0           like `xc' but set bits (see STTY)
     xt  R   bool true        lpr checks f and p formats for printable files
                              Alias for check_for_nonprintable.
     xu  A   str  NULL        additional permissions information for this queue

ENTRIES BY FUNCTION
     See the alphabetical listing for detailed information.


     Filters and Page Formats
     Xf  D   str  NULL        output filter for format X (used by lpd)
     cf  D   str  NULL        cifplot data filter
     control_filter           D   str NULL
                              Filter for control file. Used when sending job to remote
                              spool queue.
     df  D   str  NULL        tex data filter (DVI format)
     direct_read  D           bool    false
                              if true, filters are given direct access to file.
                              This means no progress indication possible.
     fx  A   str  ``flp''     valid output filter formats
     gf  D   str  NULL        graph data filter (plot (3X) format)
     if  D   str  NULL        filter command, run on a per-file basis
     lpr_bounce   R           bool    false
                              LPR will do bounce queue filtering.
     nf  D   str  NULL        DITROFF data filter
     of  D   str  NULL        output filter, run once for all output
     pl  D   num  66          page length (in lines)
     pr  D   str  ``/bin/pr'' pr program for p format
     pw  D   num  132         page width (in characters)
     px  D   num  0           page width in pixels (horizontal)
     py  D   num  0           page length in pixels (vertical)
     rf  D   str  NULL        filter for printing FORTRAN style text files
     translate_format         D   str NULL
                              translate job format (similar to tr(1) utility)
                              only valid when transferring to remote spool queue.
                              Example: translate_format=pfml
                              p format changed to f, m format to l
     tf  D   str  NULL        troff data filter (C/A/T phototypesetter)
     vf  D   str  NULL        (Versatek) raster image filter
     xt  R   bool true        lpr checks f and p formats for printable files
     Banners
     ab  D   bool false       always print banner, ignore lpr -h option
     be  D   str              banner printing program for end (overrides bp, hl)
     bp  D   str              banner printing program (use hl to print banner at end)
     bs  D   str              banner printing program for start (overrides bp, hl)
     hl  D   bool false       print banner after job instead of before
     sb  D   bool false       short banner (one line only)
     sh  D   bool false       suppress headers and/or banner page, overrides ab

     Accounting
     ae  D   str              accounting format for end of job (see also af, la, ar
                              and Accounting)
     af  D   str  NULL        name of accounting file (see also la, ar)
     ar  D   bool true        write remote transfer accounting (if af, and as/ae set)
     as  D   str              accounting format for start of job (see also af, la, ar
                              and Accounting)
     la  D   bool true        write local printer accounting (if af is set)

     Queue control
     ac  A   str  NULL        allowed classes to be printed (default is all classes)
     ah  D   bool false       auto-hold - job held until explicitly released
     bk  R   bool false       backwards-compatible: be strictly RFC-compliant
     bkf R   bool false       backwards-compatible filter: use Berkeley filter options
     bqfilter     D           bool    false       if a bounce queue (sends jobs to remote site)
                              then when bqfilter true and a format filter is specified,
                              sends data files through format filter before transfer.
                              See also 'qq'.
     cd  D   str  NULL        control information directory for LPD server
     cm  A   str  NULL        comment identifying printer (LPQ)
     fd  D   bool false       if true, no forwarded jobs accepted
     lf  D   str  ``log''     error and debugging log file (LPD)
     longnumber   D           bool    false
                              use 6 digit job numbers
     mc  R   num  1           maximum copies allowed
     mi  D   str  0           minimum space (Kb) to be left in spool filesystem
                              You can also use nnnM for nnn megabytes.
     ml  R   num  32          minimum printable characters for printable check
     mx  R   num  1000        maximum job size (1Kb blocks, 0 = unlimited)
     ps  A   str  ''status''  printer status file name
     nw  A   bool false       spool dir is on an NFS file system
                              (take precautions when reading/writing files)
     qq  A   bool false       place queue information in control file. See
                              alphabetical for details.
     rm  A   str  NULL        remote-queue machine (hostname) (with rp)
     rp  A   str  NULL        remote-queue printer name (with rm)
     sd  A   str  NULL        spool directory (only ONE printer per directory!)
     ss  D   str  NULL        name of queue that server serves (with sv)
     sv  D   str  NULL        names of servers for queue (with ss)
     sc  R   bool false       suppress multiple copies
     use_identifier           R   bool    false
                              add job identifier lines ('A') in the control file
     use_shorthost            R   bool    false   use only the hostname for job control
                              and data file names.  Host information in job file
                              will still be fully qualified domain name.
     xu  A   str  NULL        additional permissions information for this queue

     Connection and Interface to Printer
     db  A   num  0           debug level when using this printer
     connect_interval         A   num 10
                              time between open or connection attempts
     connect_timeout          A   num 10
                              timeout value for connection or open
                              (0 is infinite number)
     ff  D   str  ``\f''      string to send for a form feed (see INITIALIZATION)
     fix_bad_job D   bool    false
                     fix a bad job file - usually by ignoring multiple
                     U (unlink) entries,  badly formatted file names,
                     or other common botches produced by various PC based
                     LPR clients.
     fo  D   bool false       print a form feed when device is opened
     fq  D   bool false       print a form feed when device is closed
     ld  D   str  NULL        leader string printed on printer open (see INITIALIZATION)

     lp  D   str  NULL        device name or pipe to send output to
     lk  D   bool false       lock the lp device to force arbitration
     max_connect_interval     A   num 60
                              maximum time between connection attempts
     nb  D   num  0           if non-zero, do a nonblocking open on lp device
     retry_econnrefused       A   bool    true
                              if set, retry a connection to a remote system when an
                              ECONNREFUSED error is returned.
     retry_nolink D           bool    true
                              if LPD is sending a job or opening a device for
                              printing and the value is true, then the connection or
                              device open is repeated indefinately.
     rs  D   num  300         number of seconds between spool queue status scans
     rt  D   num  3           number of times to try printing (0=infinite).
     rw  D   bool false       open the printer for reading and writing
     save_on_error            D   bool    false
                              See above.
     save_when_done           D   bool    false
                              See above.
     send_failure_action      D   str abort
                              See above.
     send_try                 alias for rt
     sf  D   bool false       suppress form feeds separating jobs
     socket_linger            A   num 10
                              if nonzero, forces a SO_LINGER operation to be done
                              on all TCP/IP connections.  This usually corrects a problem
                              with missing last data transmissions to remote hosts.
     tr  D   str  NULL        trailer string to print when queue empties

     Serial Line Setup
     br  D   num  none        if lp is a tty, set the baud rate (see ty)
     fc  D   num  OBSOLETE    if lp is a tty, clear flag bits (see STTY)
     fs  D   num  OBSOLETE    like `fc' but set bits (see STTY)
     ms  D   str  NULL        alias for ty
     sy  D   str  NULL        alias for ty
     ty  D   str  NULL        stty commands to set output line characteristics
                              alias is sy, ms
     xc  D   num  OBSOLETE    if lp is a tty, clear local mode bits (see STTY)
     xs  D   num  0           like `xc' but set bits (see STTY)

     Miscellaneous
     all A   str  NULL        a list of all printers; (see ALL PRINTERS)
     destinations D           str NULL
                              names of printers that lpq/lprm should talk to find
                              a job that has been processed by a router script
                              (see README.routing)
     forward_auth D           str NULL
                              server to server authentication type, e.g. pgp, kerberos
     force_localhost          A   bool    FALSE
                              Forces the clients programs (lpr, lpc, etc.)
                              to send all print jobs and requests to the server running
                              on the localhost entry for action.  This flag effectively
                              forces BSD LPR behaviour.
     force_queuename          A   str NULL
                              See above.
     logger_destination       D   str NULL
                              destination for logging information.  Format is
                              host[%port][,(TCP|UDP)]
     oh  D   str  NULL        Specific printcap entry for host. See above.
     remote_support           A   str RMQC
                              if non-null, specifies allowed operations to remote queue.
                              R=lpr, M=lprm, Q=lpq, C=lpc
     router  D    str         NULL    script that dynamically re-routes a job
                              (see README.routing)
     server  A    bool        false   printcap entry for server only
     server_auth_command      D   str NULL
                              authentication command for server to use.
     tc  A   str  NULL        reference to a printcap entry to include as part of
                              the current entry.
     use_auth     D           str NULL
                              client to server authentication type, e.g. pgp, kerberos
     user_auth_command        R   str NULL
                              authentication command for user (client program)


FILTERS
     By convention, all output filter names  have  the  form  Xf,
     where  X  is  the lower case letter corresponding to the lpr
     formatting option.  The if and of filters are  the  standard
     output  filters.   The of filter is started for each job and
     is used to print the  banner  page  and  any  FF  separators
     between  individual  files of the job.  It is sent a special
     stop sequence by the lpd server, and must suspend operations
     until sent a SIGCONT signal.  An if filter is run separately
     for each file; at the end of the job the of filter  is  res-
     tarted and used to print the trailing banner (if any) and FF
     separators.

     Filters are invoked with a standard set of  options  defined
     by    the    bk_filter_options    (backwards    compatible),
     bk_of_filter_options (backwards compatible OF  filter),  and
     filter_options  configuration  variables.   See  the  lpd(8)
     manual page for details.  If the  first  characters  of  the
     filter  specification  are  -$, i.e.- Xf=-$ filter, then the
     command line options are not added.  Currently, the  options
     are:
     bk_filter_options $P $w $l $x $y $F $c $L $i $J $C $0n $0h $-a
     bk_of_filter_options $w $l $x $y
     filter_options $C $F $H $J $L $P $Q $R $Z $a $c $d \
         $e $f $h $i $j $k $l $n $s $w $x $y $-a

SPOOL QUEUES
     Printcap entries which have a spool directory value (sd) are
     called  spool  queues.   Jobs sent to a printer with a spool
     queue are place in the spool directory.  When  checking  the
     spool  queue for jobs, the server will check to see if there
     is  a  printcap  file  in  the  directory  with   the   name
     printcap.host.   If there is, the additional printcap infor-
     mation is processed and used by the server.

     If the spool directory is NFS exported,  then  remote  hosts
     can  manipulate  the  spool  entries directly; this can have
     catastrophic effects, especially in systems  where  the  NFS
     implementation  has  defects.   The  printcap information is
     particularly vulnerable to exploitation, as well as symbolic
     links, jobs which cannot be removed, etc.

     In order to support systems which require NFS exported spool
     directories,  the  LPRng  system  has the following options.
     The NFS (nw) printcap flag is an indication that  the  spool
     directory  is  NFS exported and/or mounted.  The server will
     not read the directory for printcap information.   The  next
     step  up in security is to specify a separate control direc-
     tory (cd) for the non-job control and data files.   If  this
     is done, then only job control files and job data files will
     be read from the spool directory.  In addition, if there are
     any  problems with a job, a special error file will be writ-
     ten in the control directory, preventing run  away  activity
     on a suspicious job.

LOCAL PRINTERS
     Local printers have an lp entry, which is  the  device  that
     output  should  be  sent to, usually a serial port tty.  PLP
     supplements this by using the lp field to indicate a  remote
     printer, or by allowing communication with the printer using
     a separate program, known as an lp-pipe, instead of a serial
     line.   If  the  printcap  lp entry contains a string of the
     form printer@host,  jobs  are  forwarded  to  the  specified
     remote  printer  on the host.  If the printcap lp entry con-
     tains a string of the form | command args , the command com-
     mand  is  run, with the arguments args . This can be used to
     communicate with  printers  connected  to  network  terminal
     servers,  some  TCP/IP-capable printers, and just about any-
     thing you can hack up a communication program for. Read  the
     PLP Manual for more details.

TY (STTY) OPTIONS
     The ty (stty) printcap parameter recognises a set of stty(1)
     options  that can be used to set serial line characteristics
     for the printer.  However, due to  the  differences  between
     implementations  of  UNIX,  there  are  several  sets  of ty
     options supported. Invoke lpd(8) with  the  ``-v''  command-
     line option to see which set your installation is using.

     Systems using the sgtty tty manipulation interface  may  use
     the following stty(1) options:

     bs0             bs1             [-]cbreak       cooked          cr0
     cr1             cr2             cr3             [-]decctlq      [-]echo
     [-]even         ff0             ff1             [-]lcase        [-]litout
     nl0             nl1             nl2             nl3             [-]nl
     [-]noflsh       new             [-]nohang       old             [-]odd
     [-]raw          start           stop            tab0            tab1
     tab2            [-]tabs         [-]tandem       tek             ti700
     [-]tilde        tn300           tty33           tty37           vt05
     [-]evenp        [-]oddp         [-]pass8

     Systems using termio may use the following options:

     [-]ignbrk       [-]brkint       [-]ignpar       [-]parmrk       [-]inpck
     [-]istrip       [-]inlcr        [-]igncr        [-]icrnl        [-]iuclc
     [-]ixon         [-]ixany        [-]ixoff        [-]decctlq      [-]tandem
     [-]imaxbel      [-]opost        [-]olcuc        [-]onlcr        [-]ocrnl
     [-]onocr        [-]onlret       [-]ofill        [-]ofdel        [-]cstopb
     [-]cread        [-]parenb       [-]parodd       [-]hupcl        [-]clocal
     [-]loblk        [-]parity       [-]evenp        [-]oddp         [-]stopb
     [-]hup          [-]crtscts      [-]isig         [-]noisig       [-]icanon
     [-]cbreak       [-]xcase        [-]echo         [-]echoe        [-]echok
     [-]crterase     [-]lfkc         [-]echonl       [-]noflsh       [-]tostop
     [-]echoctl      [-]ctlecho      [-]echoprt      [-]prterase     [-]echoke
     [-]crtkill      [-]lcase        [-]nl           [-]litout       [-]pass8
     [-]raw          [-]sane         [-]cooked       [-]nopost       fill
     nl0             nl1             cr0             cr1             cr2
     cr3             tab0            tab1            tab2            tab3
     bs0             bs1             vt0             vt1             ff0
     ff1             cs5             cs6             cs7             cs8
     nul-fill        del-fill        -tabs
     And systems using termios may use the following options:

     [-]ignbrk       [-]brkint       [-]ignpar       [-]parmrk       [-]inpck
     [-]istrip       [-]inlcr        [-]igncr        [-]icrnl        [-]iuclc
     [-]ixon         [-]ixany        [-]ixoff        [-]imaxbel      [-]pass8
     [-]opost        [-]olcuc        [-]onlcr        [-]ocrnl        [-]onocr
     [-]onlret       [-]ofill        [-]ofdel        [-]tabs         nl0
     nl1             cr0             cr1             cr2             cr3
     tab0            tab1            tab2            tab3            bs0
     bs1             vt0             vt1             ff0             ff1
     cs5             cs6             cs7             cs8             [-]cstopb
     [-]cread        [-]parenb       [-]parodd       [-]hupcl        [-]clocal
     [-]crtscts      [-]evenp        [-]parity       [-]oddp         [-]pass8
     [-]isig         [-]icanon       [-]xcase        [-]echo         [-]echoe
     [-]echok        [-]echonl       [-]noflsh       [-]tostop       [-]iexten
     [-]echoctl      [-]ctlecho      [-]echoprt      [-]prterase     [-]echoke
     [-]crtkill      [-]flusho       [-]pendin

     The fc , fs , xc , and xs printcap entries are obsolete, and
     if  present  with  non-zero values will abort print job pro-
     cessing.

INITIALIZATION
     Many printers require an initialization string to be sent to
     them in order to configure their operation.  The leader (ld)
     and trailer (tr) strings are sent at the start  and  end  of
     job  processing.   These strings are interpreted using the C
     language conventions for character representation:  \nnn  is
     replaced  with a character with the value nnn, \n with a new
     line, \r with a carriage return, and so forth.

ALL PRINTERS
     The LPRng software has the capability to use a remote  data-
     base  for  obtaining printcap and other information.  One of
     the difficulties arises when a list of all  printers  avail-
     able is needed.  By convention, the special printer name all
     is reserved for this information; the all field is a list of
     printers separated by spaces or punctuation.  For example:

     #all printers
     all:all=lp1,lp2,lp3,lp4

     (Reg.).fi

ACCOUNTING
     Accounting is done by writing information to  an  accounting
     file,  filter,  or  remote  connection  specified  by the af
     printcap entry.  If af has the form  |filter,  a  filter  is
     started and all accounting information is passed through the
     filter.  The filter is passed the options specified  by  the
     filter_options configuration variable.  The special form |-$
     filter will suppress adding options.  If  af  has  the  form
     host%port, then a tcp socket is opened to the specified port
     on the remote host and all accounting information is sent on
     the  socket.  If the achk flag is set, then after the string
     specified by the as field has been sent a reply of the  form
     ACCEPT  will  be  expected,  otherwise  the  job will not be
     printed.

     The printcap as and ae specify the format of the  accounting
     information  sent  at  the  start  and  end  of job printing
     respectively, or filters  to  be  used  to  generate  and/or
     report   accounting  information.   If  as  and  ae  specify
     filters, the filters are opened with STDIN set to  /dev/null
     and  STDOUT  set  to  the device, and are passed the command
     line options specified by the  filter_options  configuration
     variable  (see  lpd.conf(5)).   The  special form |-$ filter
     will suppress adding options.  The  as  filter  should  exit
     with  0  (JSUCC)  status  if  successful  and the job can be
     printed, nonzero status JABORT for abnormal  queue  termina-
     tion,  JREMOVE  if  the job cannot be printed, and JRETRY if
     the job should be retried.  The filter's STDERR  is  set  to
     the printer error logging file.

BOUNCE QUEUES AND PRINT FORMATS
     Bounce queues are designed to  allow  users  to  have  their
     files  preprocessed by a set of filters before being sent to
     the final destination.  If a queue is being used as a bounce
     queue, then the lp printcap entry must be set to the name of
     the printer on the server, and the bq entry must be the des-
     tination  after  filtering.   This will cause all jobs to be
     sent to the bounce queue, rather than directly to the  final
     destination.  For example, pr:lp=pr@host:bq=destpr@desthost.

     The filters used by the bounce queue are  those  that  would
     normally  be used by the LPD server for printing a job.  For
     example, the :if: entry would specify the filter for  the  f
     format.   Each  job file is processed individually.  The lpr
     -p option will cause the LPD server to process job files  by
     the  program  specified by the pr printcap entry (default is
     /bin/pr) and then pass through the if filter.  However, if a
     bounce  queue  is  used the format of the output data may be
     changed.  To accomodate this  action,  the  translate_format
     value  can be used to reconfigure the format.  The value has
     the form SdSdSd..., where S is the original format and d  is
     the  final  format.   This is similar to the format used  by
     the UNIX tr(1) utility.  For example, the value  pfml  would
     convert format specifications p to f and m to l, but only in
     the job information sent to a remote destination.  Note that
     the  original format would still be supplied to any filters,
     and that the p filter would  need  to  provide  any  options
     and/or values to be used to do formatting.


     The lpr_bounce printcap flag can be used to cause LPR to  do
     bounce queue filtering, rather than the server.  This should
     be used with caution, as missing  filters  can  cause  unex-
     pected behaviour.

KERBEROS, PGP, AND OTHER AUTHENTICATION METHODS
     LPRng supports built in kerberos authentication.  To  enable
     this, the LPD protocol has been extended to provide a way to
     transfer authenticated and/or encrypted jobs  and  commands.
     The details are covered in other LPRng documentation.

FILES
     The files used by LPRng are set by  values  in  the  printer
     configuration  file.   The following are a commonly used set
     of default values.
     /etc/lpd.conf                                LPRng configuration file
     /etc/printcap                                printer description file
     /etc/lpd.perms                               printer permissions
     /var/spool/printer*                          spool directories
     /var/spool/printer*/printer                  lock file for queue control
     /var/spool/printer*/control.printer          queue control
     /var/spool/printer*/active.printer           active job
     /var/spool/printer*/log.printer              log file

SEE ALSO
     lpd.conf(5),  lpc(8),  lpd(8),  lpr(1),   lpq(1),   lprm(1),
     printcap(5), lpd.perms(5), pr(1).

DIAGNOSTICS
     Most of the diagnostics are self explanatory.
     If you are puzzled over the exact cause of failure,
     set the debugging level on (-D5) and run again.
     The debugging information will
     help you to pinpoint the exact cause of failure.

HISTORY
     LPRng is a enhanced printer spooler system with  functional-
     ity  similar  to the Berkeley LPR software.  In 1988 Patrick
     Powell released the  PLP  (Public  Line  Printer)  software,
     which   went   through  several  evolutions.   Justin  Mason
     (jmason@iona.ie)  generated  PLP4.0   from   several   older
     releases  of  PLP.   In 1992 Patrick Powell release LPRng, a
     completely redesigned  and  newly  written  version  of  the
     software.

     The LPRng mailing list is plp@iona.ie; subscribe by  sending
     mail  to  plp-request@iona.ie with the word subscribe in the
     body.      The     software      is      available      from
     ftp://iona.ie/pub/LPRng.

     LPRng is distributed under  the  GNU  software  license  for
     non-commercial   use,   the  Artistic  License  for  limited
     commercial use. Commerical support and licensing  is  avail-
     able through Patrick Powell <papowell@sdsu.edu>.