The department version of PLP uses the Hesiod database to search for printcap
and printer permissions entries. All of the Hesiod records used by PLP have
the Hesiod type "pcap".

The printcap entries are searched in a similar fashion to printcap files. The
entry "printer.host" is searched for first, then "printer", and then
"printer.domain". If no match is found, the key "printer.domain" is tried for
each domain up to the root domain.

Domain names can be specified explicitly, in which case that key alone is
tried. The dot character is disallowed in printer names.

The printcap entries returned by Hesiod are an array of strings, all but one
of which has a colon as the first character. The non-colon entry is the first
part of the printcap, and the colon prefixed entries are appended to it in
whichever order in which they appear (Hesiod matches are returned in no
particular order).

If a match is made on a printcap entry which is not in the current domain, a
search is made for the printer entry 'printrelay'. If this entry is found, the
fields specified in it override the corresponding fields in the out of domain
entry. This is used to set up a relay site for all remote jobs, by overriding
the 'lp', 'rm', and 'sd' fields of the remote printcap entry.

The 'printrelay' printcap entry does not have a non-colon line in it.
Printer permissions entries are used in a similar way to the permissions
files. The entries "permissions.host" and "permissions.printer" are used to
grant or deny access to particular people, and the entry 'permissions' is used
for the general case. Permissions entries are only searched for in the local
domain.

The names of all of the printers available in the domain are returned as an
array of strings by a lookup on the key "printers@domain".

Due to severe limitations on the length of the Hesiod records returned, some
records are split up into multiple parts. The first record has the name
specified for the normal lookup, and contains an entry of the form
"+entry.seq". This entry is used as the key for another lookup (without the
preceding + sign), and the results of this lookup are merged into the results
of the previous lookup.  This process continues until there are no +-entries
in the resolved record. This is used to sort printer permissions files as
well, so that permit and deny lines do not get mixed up by Hesiod.

