📄 rfc2569.txt
字号:
Herriot, et al. Experimental [Page 7]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
This sub-command is roughly equivalent to the IPP Create-Job
operation.
The mapper SHALL use the contents of the received LPD control file to
create IPP operation attribute and job template attribute values to
transmit with the Print-Job or Create-Job operation.
3.2.3 Receive data file
Sub-command syntax: %x3 number-of-bytes-in-data-file Name-of-data-file
receive-data-file = %x03 number-of-bytes SP name-of-data-file LF
number-of-bytes = 1*DIGIT
name-of-data-file = "df" letter job-number client-host-name
; e.g. "dfA123woden for the first file
letter = %x41-5A / %x61-7A ; "A" to "Z", "a" to "z"
; first file is "A",
; second "B", and 52nd file is "z"
job-number = 3DIGIT
client-host-name = <a host name>
This sub-command is roughly equivalent to the IPP Send-Document
operation.
The mapper SHALL use the contents of the received LPD data file as
the data to transmit with the IPP Print-Job or Send-Document
operation.
Although RFC 1179 alludes to a method for passing an unspecified
length data file by using an octet-count of zero, no implementations
support this feature. The mapper SHALL reject a job that has a value
of 0 in the number-of-bytes field.
3.3 Send queue state (short)
Command syntax:
send-queue-short = %x03 printer-name *(SP(user-name / job-number)) LF
The mapper's response to this command includes information about the
printer and its jobs. RFC 1179 specifies neither the information nor
the format of its response. This document requires the mapper to
follow existing practice as specified in this document.
The mapper SHALL produce a response in the following format which
consists of a printer-status line optionally followed by a heading
line, and a list of jobs. This format is defined by examples below.
Appendix A contains the ABNF syntax.
Herriot, et al. Experimental [Page 8]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
For an printer with no jobs, the response starts in column 1 and is:
no entries
For a printer with jobs, an example of the response is:
killtree is ready and printing
Rank Owner Job Files Total Size
active fred 123 stuff 1204 bytes
1st smith 124 resume, foo 34576 bytes
2nd fred 125 more 99 bytes
3rd mary 126 mydoc 378 bytes
4th jones 127 statistics.ps 4567 bytes
5th fred 128 data.txt 9 bytes
The column numbers of above headings and job entries are:
| | | | |
01 08 19 35 63
The mapper SHALL produce each field above from the following IPP
attribute:
LPD field IPP attribute special conversion details
printer- printer-state and For a printer-state of idle or
status printer-state-reasons processing, the mapper SHALL use
the formats above. For stopped,
the mapper SHALL use printer-
state-reasons to produce an
unspecified format for the error.
rank number-of- the mapper SHALL the format above
intervening-jobs
owner job-originating-user- unspecified conversion; job-
name originating-user-name may be the
mapper's user-name
job job-id the mapper shall use the job-id
files document-name the mapper shall create a comma
separated list of the document-
names and then truncate this list
to the first 24 characters
total- job-k- the mapper shall multiple the
size octets*copies*1024 value of job-k-octets by 1024 and
by the value of the "copies"
attribute.
Herriot, et al. Experimental [Page 9]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
A mapper SHOULD use the job attribute number-of-intervening-jobs
rather than the job's position in a list of jobs to determine 'rank'
because a Printer may omit jobs that it wants to keep secret. If a
printer doesn't support the job attribute number-of-intervening-jobs,
a mapper MAY use the job's position.
Note: a Printer may set the value of job-originating-user-name to the
authenticated user or to the value of "requesting-user-name",
depending on the implementation and configuration. For a gateway, the
authenticated user is the user-id of the gateway, but the
"requesting-user-name" may contain the name of the user who is the
gateway's client.
In order to obtain the information specified above, The LPD-to-IPP
mapper SHALL use the Get-Printer-Attributes operation to get
printer-status and SHOULD use the Get-Jobs operation to get
information about all of the jobs. If the LPD command contains job-
numbers or user-names, the mapper MAY handle the filtering of the
response. If the LPD command contains job-numbers but no user-names,
the mapper MAY use Get-Job-Attributes on each converted job-number
rather than Get-Jobs. If the LPD command contains a single user-name
but no job-numbers, the mapper MAY use Get-Jobs with the my-jobs
option if the server supports this option and if the server allows
the client to be a proxy for the LPD user.
NOTE: This specification does not define how the mapper maps the LPD
Printer-name operand to the IPP "printer-uri" operation attribute.
3.4 Send queue state (long)
Command syntax:
send-queue-long = %x04 printer-name *(SP(user-name / job-number)) LF
The mapper's response to this command includes information about the
printer and its jobs. RFC 1179 specifies neither the information nor
the format of its response. This document requires the mapper to
follow existing practice as specified in this document.
The mapper SHALL produce a response in the following format which
consists of a printer-status line optionally followed a list of jobs,
where each job consists of a blank line, a description line, and one
line for each file. The description line contains the user-name,
rank, job-number and host. This format is defined by examples below.
Appendix B contain the ABNF syntax.
Herriot, et al. Experimental [Page 10]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
For an printer with no jobs the response is:
no entries
For a printer with jobs, an example of the response is:
killtree is ready and printing
fred: active [job 123 tiger]
2 copies of stuff 602 bytes
smith: 1st [job 124 snail]
2 copies of resume 7088 bytes
2 copies of foo 10200 bytes
fred: 2nd [job 125 tiger]
more 99 bytes
The column numbers of above headings and job entries are:
| | |
01 09 41
Although the format of the long form is different from the format of
the short form, their fields are identical except for a) the copies
and host fields which are only in the long form, and b) the "size"
field contains the single copy size of each file. Thus the sum of
the file sizes in the "size" field times the value of the "copies"
field produces the value for the "Total Size" field in the short
form. For fields other than the host and copies fields, see the
preceding section. For the host field see the table below.
LPD field IPP attribute special conversion details
host unspecified conversion; job-
originating-host may be the
mapper's host
copies copies the mapper shall assume the
value of copies precedes the
string "copies of "; otherwise,
the value of copies is 1.
NOTE: This specification does not define how the mapper maps the LPD
Printer-name operand to the IPP printer-uri operation attribute.
Herriot, et al. Experimental [Page 11]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
3.5 Remove jobs
Command syntax:
remove-jobs = %x05 printer-name SP agent
*(SP(user-name / job-number)) LF
The agent operand is the user-name of the user initiating the
remove-jobs command. The special user-name 'root' indicates a
privileged user who can remove jobs whose user-name differs from the
agent.
The mapper SHALL issue one Cancel-Job operation for each job
referenced by the remove-jobs command. Each job-number in the
remove-jobs command references a single job. Each user-name in the
remove-jobs command implicitly references all jobs owned by the
specified user. The active job is implicitly referenced when the
remove-jobs command contains neither job-numbers nor user-names. The
mapper MAY use Get-Jobs to determine the job-uri of implicitly
referenced jobs.
The mapper SHALL not use the agent name of 'root' when end-users
cancel their own jobs. Violation of this rule creates a potential
security violation, and it may cause the printer to issue a
notification that misleads a user into thinking that some other
person canceled the job.
If the agent of a remove-jobs command for a job J is the same as the
user name specified with the 'P' function in the control file for job
J, then the mapper SHALL ensure that the initiator of the Cancel-Job
command for job J is the same as job-originating-user for job J.
Note: This requirement means that a mapper must be consistent in who
the receiver perceives as the initiator of IPP operations. The mapper
either acts as itself or acts on behalf of another user. The latter
is preferable if it is possible. This consistency is necessary
between Print-Job/Create-Job and Cancel-Job in order for Cancel-Job
to work, but it is also desirable for other operations. For example,
Get-Jobs may give more information about job submitted by the
initiator of this operation.
NOTE: This specification does not define how the mapper maps: (1) the
LPD printer-name to the IPP "printer-uri" or (2) the LPD job-number
to the IPP "job-uri".
NOTE: This specification does not specify how the mapper maps the LPD
user-name to the IPP job-originating-user because the mapper may use
its own user-name with jobs.
Herriot, et al. Experimental [Page 12]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
4. Mapping of LPD Control File Lines to IPP Operation and Job Template
Attributes
This section describes the mapping from LPD control file lines
(called 'functions') to IPP operation attributes and job template
attributes. The mapper receives the control file lines via the LPD
receive-control-file sub-command. Each of the LPD functions appear
as sub-sections of section 7 of RFC 1179.
In LPD control file lines, the text operands have a maximum length of
31 or 99 while IPP operation attribute and job template attribute
values have a maximum of 255 or 1023 octets, depending on the
attribute syntax. Therefore, no data is lost.
The mapper converts each supported LPD function to its corresponding
IPP operation or job template attribute as defined by tables in the
subsections that follow. These subsections group functions according
to whether they are:
- required with a job,
- optional with a job
- required with each document.
In the tables below, each LPD value is given a name, such as 'h'. If
an IPP value uses the LPD value, then the IPP value column contains
the LPD name, such as 'h' to denote this. Otherwise, the IPP value
column specifies the literal value.
4.1 Required Job Functions
The following LPD functions MUST be in a received LPD job. The mapper
SHALL receive each of the following LPD functions and SHALL include
the information as a operation or job template attribute with each
IPP job. The functions SHOULD be in the order 'H', 'P' and they
SHOULD be the first two functions in the control file, but they MAY
be anywhere in the control file and in any order:
LPD function IPP
name value description name value
H h Originating Host h (in security layer)
P u User identification requesting- u (and in security
user-name layer)
none ipp- 'true'
attribute-
fidelity
Herriot, et al. Experimental [Page 13]
RFC 2569 Mapping between LPD and IPP Protocols April 1999
A mapper MAY send its own host rather than the client's host, and a
mapper MAY send its own user-name as user identification rather than
the client user. But in any case, the values sent SHALL be compatible
with the Cancel-Job operation. The IPP operation MAY have no way to
specify an originating host-name.
The mapper SHALL include ipp-attribute-fidelity = true so that it
doesn't have to determine which attributes a printer supports.
4.2 Optional Job Functions
The following LPD functions MAY be present in a received job. These
functions SHOULD follow the required job functions and precede the
document functions, but they MAY be anywhere in the control file.
If the mapper receives such an LPD function, the mapper SHALL include
the corresponding IPP attribute with the value converted as specified
in the table below. If the mapper does not receive such an LPD
attribute, the mapper SHALL NOT include the corresponding IPP
attribute, except the 'L' LPD function whose absence has a special
meaning as noted in the table.
LPD function IPP
name value description name value
J j Job name for job-name j
banner page
L l Print banner page job-sheets 'standard' if 'L' is
present
'none' if 'L' is present
M m Mail When Printed IPP has no notification
mechanism. To support
this LPD feature, the
gateway must poll using
the Get-Job-Attributes
operation.
4.3 Required Document Functions
The mapper SHALL receive one set of the required document functions
with each copy of a document, and SHALL include the converted
information as operation or job template attributes with each IPP
document.
If the control file contains required and recommended document
functions, the required functions SHOULD precede the recommended ones
and if the job contains multiple documents, all the functions for
Herriot, et al. Experimental [Page 14]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -