Network Working Group R. Herriot Request For Comments: 2569 Xerox Corporation Category: Experimental N. Jacobs Sun Microsystems, Inc. T. Hastings Xerox Corporation J. Martin Underscore, Inc. April 1999
Network Working Group R. Herriot Request For Comments: 2569 Xerox Corporation Category: Experimental N. Jacobs Sun Microsystems, Inc. T. Hastings Xerox Corporation J. Martin Underscore, Inc. April 1999
Mapping between LPD and IPP Protocols
LPD和IPP协议之间的映射
Status of this Memo
本备忘录的状况
This memo defines an Experimental Protocol for the Internet community. It does not specify an Internet standard of any kind. Discussion and suggestions for improvement are requested. Distribution of this memo is unlimited.
这份备忘录为互联网社区定义了一个实验性协议。它没有规定任何类型的互联网标准。要求进行讨论并提出改进建议。本备忘录的分发不受限制。
Copyright Notice
版权公告
Copyright (C) The Internet Society (1999). All Rights Reserved.
版权所有(C)互联网协会(1999年)。版权所有。
IESG Note
IESG注释
This document defines an Experimental protocol for the Internet community. The IESG expects that a revised version of this protocol will be published as Proposed Standard protocol. The Proposed Standard, when published, is expected to change from the protocol defined in this memo. In particular, it is expected that the standards-track version of the protocol will incorporate strong authentication and privacy features, and that an "ipp:" URL type will be defined which supports those security measures. Other changes to the protocol are also possible. Implementors are warned that future versions of this protocol may not interoperate with the version of IPP defined in this document, or if they do interoperate, that some protocol features may not be available.
本文档为互联网社区定义了一个实验协议。IESG希望本协议的修订版将作为拟议标准协议出版。拟定标准发布后,预计将改变本备忘录中定义的协议。特别是,预计协议的标准跟踪版本将包含强大的身份验证和隐私功能,并且将定义支持这些安全措施的“ipp:”URL类型。协议的其他更改也是可能的。提醒实施者,本协议的未来版本可能无法与本文档中定义的IPP版本进行互操作,或者,如果实现了互操作,则某些协议功能可能不可用。
The IESG encourages experimentation with this protocol, especially in combination with Transport Layer Security (TLS) [RFC 2246], to help determine how TLS may effectively be used as a security layer for IPP.
IESG鼓励对该协议进行试验,特别是结合传输层安全(TLS)[RFC 2246],以帮助确定如何将TLS有效地用作IPP的安全层。
Abstract
摘要
This document is one of a set of documents, which together describe all aspects of a new Internet Printing Protocol (IPP). IPP is an application level protocol that can be used for distributed printing using Internet tools and technologies. This document gives some advice to implementers of gateways between IPP and LPD (Line Printer Daemon). This document describes the mapping between (1) the commands and operands of the 'Line Printer Daemon (LPD) Protocol' specified in RFC 1179 and (2) the operations, operation attributes and job template attributes of the Internet Printing Protocol/1.0 (IPP). One of the purposes of this document is to compare the functionality of the two protocols. Another purpose is to facilitate implementation of gateways between LPD and IPP.
本文档是一组文档之一,这些文档共同描述了新Internet打印协议(IPP)的所有方面。IPP是一种应用程序级协议,可用于使用Internet工具和技术进行分布式打印。本文档为IPP和LPD(行打印机守护进程)之间网关的实现者提供了一些建议。本文档描述了(1)RFC 1179中指定的“行打印机守护程序(LPD)协议”的命令和操作数与(2)Internet打印协议/1.0(IPP)的操作、操作属性和作业模板属性之间的映射。本文档的目的之一是比较两个协议的功能。另一个目的是促进LPD和IPP之间网关的实施。
WARNING: RFC 1179 was not on the IETF standards track. While RFC 1179 was intended to record existing practice, it fell short in some areas. However, this specification maps between (1) the actual current practice of RFC 1179 and (2) IPP. This document does not attempt to map the numerous divergent extensions to the LPD protocol that have been made by many implementers.
警告:RFC 1179不在IETF标准轨道上。虽然RFC 1179旨在记录现有实践,但在某些方面还存在不足。然而,本规范在(1)RFC 1179的实际现行实践和(2)IPP之间进行了映射。本文档并不试图将许多不同的扩展映射到LPD协议,这些扩展已经由许多实现者完成。
The full set of IPP documents includes:
整套IPP文件包括:
Design Goals for an Internet Printing Protocol [RFC2567] Rationale for the Structure and Model and Protocol for the Internet Printing Protocol [RFC2568] Internet Printing Protocol/1.0: Model and Semantics [RFC2566] Internet Printing Protocol/1.0: Encoding and Transport [RFC2565] Internet Printing Protocol/1.0: Implementors Guide [ipp-iig] Mapping between LPD and IPP Protocols (this document)
Design Goals for an Internet Printing Protocol [RFC2567] Rationale for the Structure and Model and Protocol for the Internet Printing Protocol [RFC2568] Internet Printing Protocol/1.0: Model and Semantics [RFC2566] Internet Printing Protocol/1.0: Encoding and Transport [RFC2565] Internet Printing Protocol/1.0: Implementors Guide [ipp-iig] Mapping between LPD and IPP Protocols (this document)
The document, "Design Goals for an Internet Printing Protocol", takes a broad look at distributed printing functionality, and it enumerates real-life scenarios that help to clarify the features that need to be included in a printing protocol for the Internet. It identifies requirements for three types of users: end users, operators, and administrators. It calls out a subset of end user requirements that are satisfied in IPP/1.0. Operator and administrator requirements are out of scope for version 1.0.
“Internet打印协议的设计目标”文档广泛介绍了分布式打印功能,并列举了有助于澄清需要包含在Internet打印协议中的功能的实际场景。它确定了三类用户的需求:最终用户、操作员和管理员。它列出了IPP/1.0中满足的最终用户需求的子集。操作员和管理员要求超出了版本1.0的范围。
The document, "Rationale for the Structure and Model and Protocol for the Internet Printing Protocol", describes IPP from a high level view, defines a roadmap for the various documents that form the suite of IPP specifications, and gives background and rationale for the IETF working group's major decisions.
“互联网打印协议的结构、模型和协议的基本原理”文件从高层次上描述了IPP,定义了构成IPP规范套件的各种文件的路线图,并为IETF工作组的主要决策提供了背景和基本原理。
The document, "Internet Printing Protocol/1.0: Model and Semantics", describes a simplified model with abstract objects, their attributes, and their operations. It introduces a Printer and a Job object. The Job object supports multiple documents per Job. It also addresses security, internationalization, and directory issues.
“Internet打印协议/1.0:模型和语义”文档描述了一个带有抽象对象、属性及其操作的简化模型。它引入了打印机和作业对象。作业对象支持每个作业有多个文档。它还解决了安全性、国际化和目录问题。
The document, "Internet Printing Protocol/1.0: Encoding and Transport", is a formal mapping of the abstract operations and attributes defined in the model document onto HTTP/1.1. It defines the encoding rules for a new Internet media type called ' application/ipp'.
“Internet打印协议/1.0:编码和传输”文档是模型文档中定义的抽象操作和属性到HTTP/1.1的正式映射。它定义了名为“应用程序/ipp”的新Internet媒体类型的编码规则。
This document "Internet Printing Protocol/1.0: Implementer's Guide", gives advice to implementers of IPP clients and IPP objects.
本文件“Internet打印协议/1.0:实施者指南”为IPP客户端和IPP对象的实施者提供建议。
TABLE OF CONTENTS
目录
1. Introduction.....................................................4 2. Terminology......................................................5 3. Mapping from LPD Commands to IPP Operations......................5 3.1 Print any waiting jobs..........................................6 3.2 Receive a printer job...........................................6 3.2.1 Abort job.....................................................7 3.2.2 Receive control file..........................................7 3.2.3 Receive data file.............................................8 3.3 Send queue state (short)........................................8 3.4 Send queue state (long)........................................10 3.5 Remove jobs....................................................12 4. Mapping of LPD Control File Lines to IPP Operation and Job Template Attributes.............................................13 4.1 Required Job Functions.........................................13 4.2 Optional Job Functions.........................................14 4.3 Required Document Functions....................................14 4.4 Recommended Document Functions.................................16 5. Mapping from IPP operations to LPD commands.....................16 5.1 Print-Job......................................................16 5.2 Print-URI......................................................18 5.3 Validate-Job...................................................18 5.4 Create-Job.....................................................18 5.5 Send-Document..................................................18 5.6 Send-URI.......................................................18 5.7 Cancel-Job.....................................................18 5.8 Get-Printer-Attributes.........................................19 5.9 Get-Job-Attributes.............................................19 5.10 Get-Jobs......................................................20 6. Mapping of IPP Attributes to LPD Control File Lines.............20 6.1 Required Job Functions.........................................21 6.2 Optional Job Functions.........................................21
1. Introduction.....................................................4 2. Terminology......................................................5 3. Mapping from LPD Commands to IPP Operations......................5 3.1 Print any waiting jobs..........................................6 3.2 Receive a printer job...........................................6 3.2.1 Abort job.....................................................7 3.2.2 Receive control file..........................................7 3.2.3 Receive data file.............................................8 3.3 Send queue state (short)........................................8 3.4 Send queue state (long)........................................10 3.5 Remove jobs....................................................12 4. Mapping of LPD Control File Lines to IPP Operation and Job Template Attributes.............................................13 4.1 Required Job Functions.........................................13 4.2 Optional Job Functions.........................................14 4.3 Required Document Functions....................................14 4.4 Recommended Document Functions.................................16 5. Mapping from IPP operations to LPD commands.....................16 5.1 Print-Job......................................................16 5.2 Print-URI......................................................18 5.3 Validate-Job...................................................18 5.4 Create-Job.....................................................18 5.5 Send-Document..................................................18 5.6 Send-URI.......................................................18 5.7 Cancel-Job.....................................................18 5.8 Get-Printer-Attributes.........................................19 5.9 Get-Job-Attributes.............................................19 5.10 Get-Jobs......................................................20 6. Mapping of IPP Attributes to LPD Control File Lines.............20 6.1 Required Job Functions.........................................21 6.2 Optional Job Functions.........................................21
6.3 Required Document Functions....................................22 7. Security Considerations.........................................23 8. References......................................................23 9. Authors' Addresses..............................................24 10.Appendix A: ABNF Syntax for response of Send-queue-state (short)25 11.Appendix B: ABNF Syntax for response of Send-queue-state (long) 26 12.Appendix C: Unsupported LPD functions...........................27 13.Full Copyright Statement........................................28
6.3 Required Document Functions....................................22 7. Security Considerations.........................................23 8. References......................................................23 9. Authors' Addresses..............................................24 10.Appendix A: ABNF Syntax for response of Send-queue-state (short)25 11.Appendix B: ABNF Syntax for response of Send-queue-state (long) 26 12.Appendix C: Unsupported LPD functions...........................27 13.Full Copyright Statement........................................28
The reader of this specification is expected to be familiar with the IPP Model and Semantics specification [RFC2566], the IPP Encoding and Transport [RF2565], and the Line Printer Daemon (LPD) protocol specification [RFC1179] as described in RFC 1179.
本规范的读者应熟悉RFC 1179中所述的IPP模型和语义规范[RFC2566]、IPP编码和传输[RF2565]以及线路打印机守护程序(LPD)协议规范[RFC1179]。
RFC 1179 was written in 1990 in an attempt to document existing LPD protocol implementations. Since then, a number of undocumented extensions have been made by vendors to support functionality specific to their printing solutions. All of these extensions consist of additional control file commands. This document does not address any of these vendor extensions. Rather it addresses existing practice within the context of the features described by RFC 1179. Deviations of existing practice from RFC 1179 are so indicated.
RFC1179编写于1990年,旨在记录现有的LPD协议实现。从那时起,供应商进行了大量未记录的扩展,以支持特定于其打印解决方案的功能。所有这些扩展名都由附加的控制文件命令组成。本文档不涉及任何这些供应商扩展。相反,它在RFC 1179描述的特性的上下文中解决了现有实践。现有实践与RFC 1179的偏差如下所示。
Other LPD control file commands in RFC 1179 are obsolete. They are intended to work on "text" only formats and are inappropriate for many contemporary document formats that completely specify each page. This document does not address the support of these obsolete features.
RFC 1179中的其他LPD控制文件命令已过时。它们只用于“文本”格式,不适用于完全指定每页的许多当代文档格式。本文档不涉及对这些过时功能的支持。
In the area of document formats, also known as page description languages (PDL), RFC 1179 defines a fixed set with no capability for extension. Consequently, some new PDL's are not supported, and some of those that are supported are sufficiently unimportant now that they have not been registered for use with the Printer MIB [RFC1759] and IPP [RFC2566] [RFC2565], though they could be registered if desired. See the Printer MIB specification [RFC1759] and/or the IPP Model specification [RFC2566] for instructions for registration of document-formats with IANA. IANA lists the registered document-formats as "printer languages".
在文档格式(也称为页面描述语言(PDL))领域,RFC1179定义了一个固定集,没有扩展能力。因此,一些新的PDL不受支持,并且一些受支持的PDL已经足够不重要了,因为它们尚未注册用于打印机MIB[RFC1759]和IPP[RFC2566][RFC2565],尽管它们可以根据需要注册。请参阅打印机MIB规范[RFC1759]和/或IPP型号规范[RFC2566],了解在IANA中注册文档格式的说明。IANA将注册的文档格式列为“打印机语言”。
This document addresses the protocol mapping for both directions: mapping of the LPD protocol to the IPP protocol and mapping of the IPP protocol to the LPD protocol. The former is called the "LPD-to-IPP mapper" and the latter is called the "IPP-to-LPD mapper".
本文档介绍了两个方向的协议映射:LPD协议到IPP协议的映射和IPP协议到LPD协议的映射。前者称为“LPD到IPP映射器”,后者称为“IPP到LPD映射器”。
This document is an informational document that is not on the standards track. It is intended to help implementers of gateways between IPP and LPD. It also provides an example, which gives additional insight into IPP.
此文档是不在标准轨道上的信息性文档。它旨在帮助IPP和LPD之间网关的实现者。它还提供了一个示例,进一步深入了解IPP。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。
RFC 1179 uses the word "command" in two contexts: for over-the-wire operations and for command file functions. This document SHALL use the word "command" for the former and the phrase "functions" for the latter. The syntax of the LPD commands is given using ABNF [RFC2234].
RFC 1179在两种上下文中使用“命令”一词:用于在线操作和命令文件功能。本文件应使用“命令”一词表示前者,使用“功能”一词表示后者。LPD命令的语法使用ABNF[RFC2234]给出。
The following tokens are used in order to make the syntax more readable:
以下标记用于使语法更具可读性:
LF stands for %x0A (linefeed) SP stands for %x20. (space) DIGIT stands for %x30-39 ("0" to "9")
LF代表%x0A(换行符),SP代表%x20。(空格)数字表示%x30-39(“0”到“9”)
This section describes the mapping from LPD commands to IPP operations. Each of the following sub-sections appear as sub-sections of section 5 of RFC 1179.
本节介绍从LPD命令到IPP操作的映射。以下各小节均为RFC 1179第5节的小节。
The following table summarizes the IPP operation that the mapper uses when it receives an LPD command. Each section below gives more detail:
下表总结了映射程序在接收LPD命令时使用的IPP操作。以下各节提供了更多详细信息:
LPD command IPP operation
LPD命令IPP操作
print-any-waiting-jobs ignore receive-a-printer-job Print-Job or Create-Job/Send-Document send queue state Get-Printer-Attributes and Get-Jobs (short or long) remove-jobs Cancel-Job
打印任何等待的作业忽略接收打印机作业打印作业或创建作业/发送文档发送队列状态获取打印机属性和获取作业(短或长)删除作业取消作业
Command syntax:
命令语法:
print-waiting-jobs = %x01 printer-name LF
print-waiting-jobs = %x01 printer-name LF
This command causes the LPD daemon check its queue and print any waiting jobs. An IPP printer handles waiting jobs without such a nudge.
此命令使LPD守护进程检查其队列并打印任何等待的作业。IPP打印机处理等待的作业时不需要这样的轻推。
If the mapper receives this LPD command, it SHALL ignore it and send no IPP operation.
如果映射器接收到该LPD命令,它将忽略该命令并不发送IPP操作。
Command syntax:
命令语法:
receive-job = %x02 printer-name LF
receive-job = %x02 printer-name LF
The control file and data files mentioned in the following paragraphs are received via LPD sub-commands that follow this command. Their mapping to IPP commands and attributes is described later in this section.
以下段落中提到的控制文件和数据文件通过该命令后面的LPD子命令接收。本节后面将介绍它们到IPP命令和属性的映射。
The mapper maps the 'Receive a printer job' command to either:
映射器将“接收打印机作业”命令映射到:
- the Print-Job operation which includes a single data file or - the Create-Job operation followed by one Send-Document operation for each data file.
- 包含单个数据文件的打印作业操作或-创建作业操作,然后针对每个数据文件执行一次发送文档操作。
If the IPP printer supports both Create-Job and Send-Document, and if a job consists of:
如果IPP打印机同时支持创建作业和发送文档,并且作业包括:
- a single data file, the mapper SHOULD use the Print-Job operation, but MAY use the Create-Job and Send-Document operations. - more than one data file, the mapper SHALL use Create-Job followed by one Send-Document for each received LPD data file.
- 对于单个数据文件,映射程序应使用打印作业操作,但可以使用创建作业和发送文档操作。-对于多个数据文件,制图员应使用创建作业,然后为每个接收到的LPD数据文件发送一份文件。
If the IPP printer does not support both Create-Job and Send-Document, and if a job consists of:
如果IPP打印机不支持创建作业和发送文档,并且作业包括:
- a single data file, the mapper SHALL use the PrintJob operation. - more than one data file, the mapper SHALL submit each received LPD data file as a separate Print-Job operation (thereby converting a single LPD job into multiple IPP jobs).
- 对于单个数据文件,映射程序应使用PrintJob操作。-多个数据文件时,制图员应将收到的每个LPD数据文件作为单独的打印作业提交(从而将单个LPD作业转换为多个IPP作业)。
If the mapper uses Create-Job and Send-Document, it MUST send the Create-Job operation before it sends any Send-Document operations whether the LPD control file, which supplies attributes for Create-Job, arrives before or after all LPD data files.
如果映射程序使用创建作业和发送文档,则无论为创建作业提供属性的LPD控制文件在所有LPD数据文件之前或之后到达,它都必须在发送任何发送文档操作之前发送创建作业操作。
NOTE: This specification does not specify how the mapper maps: the LPD Printer-name operand to the IPP "printer-uri" operation attribute.
注意:此规范未指定映射器如何将LPD打印机名称操作数映射到IPP“打印机uri”操作属性。
The following three sub-sections gives further details about the mapping from LPD receive-a-printer-job sub-commands. Each of the following subsections appear as sub-sections of section 6 of RFC 1179.
以下三个子部分提供了有关LPD receive-a-printer-job子命令映射的更多详细信息。以下各小节均为RFC 1179第6节的小节。
Sub-command syntax:
子命令语法:
abort-job = %x1 LF
abort-job = %x1 LF
This sub-command of receive-a-printer-job is intended to abort any job transfer in process.
receive-a-printer-job的此子命令用于中止任何作业传入过程。
If the mapper receives this sub-command, it SHALL cancel the job that it is in the process of transmitting.
如果映射器收到此子命令,则应取消其正在传输的作业。
If the mapper is in the process of sending a Print-Job or Create-Job operation, it terminates the job either by closing the connection, or performing the Cancel-Job operation with the job-uri that it received from the Print-Job or Create-Job operation.
如果映射程序正在发送打印作业或创建作业操作,它将通过关闭连接或使用从打印作业或创建作业操作接收的作业uri执行取消作业操作来终止作业。
NOTE: This sub-command is implied if at any time the connection between the LPD client and server is terminated before an entire print job has been transferred via an LPD Receive-a-printer-job request.
注意:如果在通过LPD Receive-a-printer-job请求传输整个打印作业之前,LPD客户端和服务器之间的连接随时终止,则暗示此子命令。
Sub-command syntax:
子命令语法:
receive-control-file = %x2 number-of-bytes SP name-of-control-file LF number-of-bytes = 1*DIGIT name-of-control-file = "cfA" job-number client-host-name ; e.g. "cfA123woden" job-number = 3DIGIT client-host-name = <a host name>
receive-control-file = %x2 number-of-bytes SP name-of-control-file LF number-of-bytes = 1*DIGIT name-of-control-file = "cfA" job-number client-host-name ; e.g. "cfA123woden" job-number = 3DIGIT client-host-name = <a host name>
This sub-command is roughly equivalent to the IPP Create-Job operation.
此子命令大致相当于IPP创建作业操作。
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.
映射器应使用接收到的LPD控制文件的内容创建IPP操作属性和作业模板属性值,以便与打印作业或创建作业操作一起传输。
Sub-command syntax: %x3 number-of-bytes-in-data-file Name-of-data-file
子命令语法:%x3数据文件中的字节数数据文件的名称
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>
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.
此子命令大致相当于IPP发送文档操作。
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.
制图员应使用收到的LPD数据文件的内容作为数据,通过IPP打印作业或发送文件操作进行传输。
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.
尽管RFC1179提到了一种通过使用八位组计数为零来传递未指定长度数据文件的方法,但没有任何实现支持此功能。映射程序应拒绝字节数字段中值为0的作业。
Command syntax:
命令语法:
send-queue-short = %x03 printer-name *(SP(user-name / job-number)) LF
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.
映射程序对此命令的响应包括有关打印机及其作业的信息。RFC 1179既不指定信息也不指定其响应的格式。本文件要求制图员遵循本文件规定的现行做法。
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.
映射器应以以下格式生成响应,其中包括打印机状态行(可选)后跟标题行,以及作业列表。此格式由以下示例定义。附录A包含ABNF语法。
For an printer with no jobs, the response starts in column 1 and is:
对于没有作业的打印机,响应从第1列开始,为:
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
killtree已准备就绪,正在打印职级所有者工作文件总大小活动fred 123 stuff 1204字节第一个smith 124 resume,foo 34576字节第二个fred 125更多99字节第三个mary 126 mydoc 378字节第四个jones 127 statistics.ps 4567字节第五个fred 128 data.txt 9字节
The column numbers of above headings and job entries are:
上述标题和职务条目的列号为:
| | | | | 01 08 19 35 63
| | | | | 01 08 19 35 63
The mapper SHALL produce each field above from the following IPP attribute:
制图员应根据以下IPP属性生成上述各字段:
LPD field IPP attribute special conversion details
LPD字段IPP属性特殊转换详细信息
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.
打印机-打印机状态,对于打印机空闲状态或打印机状态原因处理,映射器应使用上述格式。对于停止,映射器应使用打印机状态原因生成错误的未指定格式。职级编号-映射器应采用上述格式进行干预作业所有者作业发起用户-未指定转换;作业名称来源用户名可能是映射者的用户名作业id映射者应使用作业id文件文件名映射者应创建一个以逗号分隔的文件名列表,然后将该列表截断为前24个字符总计-作业-k-映射者应将大小八位字节*份数*1024的作业-k-八位字节值乘以1024和通过“copies”属性的值。
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.
注意:打印机可以将作业发起用户名的值设置为经过身份验证的用户或“请求用户名”的值,具体取决于实现和配置。对于网关,经过身份验证的用户是网关的用户id,但“请求用户名”可能包含作为网关客户端的用户的名称。
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.
为获取上述信息,LPD至IPP映射器应使用“获取打印机属性”操作获取打印机状态,并应使用“获取作业”操作获取所有作业的信息。如果LPD命令包含作业编号或用户名,则映射程序可以处理响应的过滤。如果LPD命令包含作业编号但没有用户名,则映射程序可能会在每个转换的作业编号上使用“获取作业”属性,而不是“获取作业”。如果LPD命令包含单个用户名但没有作业编号,则如果服务器支持此选项,并且服务器允许客户端作为LPD用户的代理,则映射程序可以将Get Jobs与my Jobs选项一起使用。
NOTE: This specification does not define how the mapper maps the LPD Printer-name operand to the IPP "printer-uri" operation attribute.
注意:本规范未定义映射器如何将LPD打印机名称操作数映射到IPP“打印机uri”操作属性。
Command syntax:
命令语法:
send-queue-long = %x04 printer-name *(SP(user-name / job-number)) LF
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.
映射程序对此命令的响应包括有关打印机及其作业的信息。RFC 1179既不指定信息也不指定其响应的格式。本文件要求制图员遵循本文件规定的现行做法。
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.
映射器应生成以下格式的响应,该响应由打印机状态行(可选)和作业列表组成,其中每个作业包括一个空行、一个描述行和一个文件行。描述行包含用户名、职级、职务编号和主机。此格式由以下示例定义。附录B包含ABNF语法。
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
killtree已经准备好打印了
fred: active [job 123 tiger] 2 copies of stuff 602 bytes
fred:active[job 123 tiger]2份602字节的内容
smith: 1st [job 124 snail] 2 copies of resume 7088 bytes 2 copies of foo 10200 bytes
史密斯:第一份[工作124]2份简历7088字节2份foo 10200字节
fred: 2nd [job 125 tiger] more 99 bytes
弗雷德:第二个[任务125老虎]还有99字节
The column numbers of above headings and job entries are:
上述标题和职务条目的列号为:
| | | 01 09 41
| | | 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.
尽管长格式与短格式的格式不同,但它们的字段是相同的,除了a)副本和主机字段(仅为长格式)和b)“大小”字段包含每个文件的单个副本大小。因此,“大小”字段中的文件大小之和乘以“副本”字段的值将生成简短形式的“总大小”字段的值。有关“主机”和“副本”字段以外的字段,请参见上一节。有关主机字段,请参见下表。
LPD field IPP attribute special conversion details
LPD字段IPP属性特殊转换详细信息
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.
主机未指定转换;作业发起主机可能是映射程序的主机副本映射程序应假定副本的值在字符串“副本”之前;否则,副本的值为1。
NOTE: This specification does not define how the mapper maps the LPD Printer-name operand to the IPP printer-uri operation attribute.
注意:此规范不定义映射器如何将LPD打印机名称操作数映射到IPP打印机uri操作属性。
Command syntax:
命令语法:
remove-jobs = %x05 printer-name SP agent *(SP(user-name / job-number)) LF
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.
代理操作数是启动删除作业命令的用户的用户名。特殊用户名“root”表示可以删除用户名与代理不同的作业的特权用户。
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.
映射器应为“删除作业”命令引用的每个作业发出一个“取消作业”操作。“删除作业”命令中的每个作业编号都引用单个作业。“删除作业”命令中的每个用户名都隐式引用指定用户拥有的所有作业。当“删除作业”命令既不包含作业编号也不包含用户名时,将隐式引用活动作业。映射程序可以使用Get Jobs来确定隐式引用的作业的作业uri。
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.
当最终用户取消自己的作业时,映射程序不得使用代理名称“root”。违反此规则会造成潜在的安全违规,并可能导致打印机发出通知,误导用户认为其他人取消了作业。
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.
如果作业J的删除作业命令的代理与作业J的控制文件中使用“P”函数指定的用户名相同,则映射程序应确保作业J的取消作业命令的发起人与作业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.
注:这一要求意味着映射器必须在接收者认为谁是IPP操作的发起人方面保持一致。映射器要么作为自身,要么代表另一个用户。如果可能,后者更可取。打印作业/创建作业和取消作业之间的一致性是必要的,以便取消作业正常工作,但其他操作也需要这种一致性。例如,“获取作业”可能会提供有关此操作的启动器提交的作业的更多信息。
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".
注:本规范未定义映射器如何映射:(1)LPD打印机名称到IPP“打印机uri”或(2)LPD作业编号到IPP“作业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.
注意:本规范未指定映射器如何将LPD用户名映射到IPP作业发起用户,因为映射器可能在作业中使用自己的用户名。
4. Mapping of LPD Control File Lines to IPP Operation and Job Template Attributes
4. LPD控制文件行到IPP操作和作业模板属性的映射
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.
本节介绍从LPD控制文件行(称为“功能”)到IPP操作属性和作业模板属性的映射。映射器通过LPD receive control file子命令接收控制文件行。每个LPD功能显示为RFC 1179第7节的小节。
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.
在LPD控制文件行中,文本操作数的最大长度为31或99,而IPP操作属性和作业模板属性值的最大长度为255或1023个八位字节,具体取决于属性语法。因此,不会丢失任何数据。
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:
映射程序将每个受支持的LPD函数转换为其相应的IPP操作或作业模板属性,如以下小节中的表所定义。这些小节根据功能是否为:
- 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.
在下表中,每个LPD值都有一个名称,如“h”。如果IPP值使用LPD值,则IPP值列包含LPD名称,如“h”表示此名称。否则,IPP值列将指定文字值。
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功能必须在接收到的LPD作业中。映射器应接收以下每个LPD功能,并应将信息作为操作或作业模板属性包含在每个IPP作业中。函数的顺序应为“H”、“P”,并且它们应为控制文件中的前两个函数,但它们可以位于控制文件中的任何位置,也可以按任何顺序:
LPD function IPP name value description name value
LPD函数IPP名称值说明名称值
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
H发起主机H(在安全层中)P u用户标识请求-u(在安全用户名层中)无ipp-“true”属性保真度
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.
映射器可以发送自己的主机而不是客户端的主机,映射器可以发送自己的用户名作为用户标识而不是客户端用户。但在任何情况下,发送的值应与取消作业操作兼容。IPP操作可能无法指定原始主机名。
The mapper SHALL include ipp-attribute-fidelity = true so that it doesn't have to determine which attributes a printer supports.
映射器应包括ipp属性保真度=真,以便不必确定打印机支持哪些属性。
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.
接收到的作业中可能存在以下LPD功能。这些功能应遵循所需的作业功能,并位于文档功能之前,但它们可能位于控制文件中的任何位置。
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功能,映射器应包括相应的IPP属性,并按照下表中的规定转换值。如果映射器未收到此类LPD属性,则映射器不应包含相应的IPP属性,但“L”LPD函数除外,该函数的缺失具有表中所述的特殊含义。
LPD function IPP name value description name value
LPD函数IPP名称值说明名称值
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.
J J作业名称用于作业名称J横幅页L L打印横幅页作业表“标准”如果“L”存在“无”如果“L”存在打印IPP没有通知机制时M M邮件。要支持此LPD功能,网关必须使用Get Job Attributes操作进行轮询。
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.
制图员应在每份文件副本中接收一套所需的文件功能,并应将转换后的信息作为操作或作业模板属性包含在每份IPP文件中。
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
如果控制文件包含必需的和推荐的文档功能,则必需的功能应优先于推荐的功能;如果作业包含多个文档,则所有功能都应优先于推荐的功能
each document are grouped together as shown in the example of section 6.3 "Required Document Functions". However, the document functions MAY be in any order.
如第6.3节“所需文件功能”示例所示,将每个文件分组在一起。但是,文档功能可以是任何顺序。
LPD function IPP name value description name value
LPD函数IPP名称值说明名称值
f fff Print formatted document-format 'application/octet-file stream' l fff Print file leaving document-format 'application/octet-control characters stream' o fff Print Postscript document-format 'application/PostScri output file pt' copies see note
f fff打印格式化文档格式“应用程序/八位字节文件流”l fff打印文件离开文档格式“应用程序/八位字节控制字符流”o fff打印Postscript文档格式“应用程序/PostScri输出文件pt”副本见备注
Note: In practice, the 'f' LPD function is often overloaded. It is often used with any format of document data including PostScript and PCL data.
注意:在实践中,“f”LPD函数经常重载。它通常用于任何格式的文档数据,包括PostScript和PCL数据。
Note: In practice, the 'l' LPD function is often used as a rough equivalent to the 'f' function.
注:在实践中,“l”LPD函数通常用作“f”函数的粗略等价物。
Note: When RFC 1179 was written, no implementation supported the 'o' function; instead 'f' was used for PostScript. Windows NT now sends ' o' function for a PostScript file.
注:编写RFC1179时,没有任何实现支持“o”函数;相反,“f”用于PostScript。Windows NT现在为PostScript文件发送“o”函数。
Note: the value 'fff' of the 'f', 'l' and 'o' functions is the name of the data file as transferred, e.g. "dfA123woden".
注:“f”、“l”和“o”函数的值“fff”是传输的数据文件的名称,例如“dfA123woden”。
If the mapper receives any other lower case letter, the mapper SHALL reject the job because the document contains a format that the mapper does not support.
如果制图员收到任何其他小写字母,制图员应拒绝作业,因为文件包含制图员不支持的格式。
The mapper determines the number of copies by counting the number of occurrences of each 'fff' file with one of the lower-case functions above. For example, if 'f dfA123woden' occurs 4 times, then copies has a value of 4. Although the LPD protocol allows the value of copies to be different for each document, the commands and the receiving print systems don't support this.
映射器通过使用上面的一个小写函数计算每个“fff”文件的出现次数来确定副本数。例如,如果“f dfA123woden”出现4次,则copies的值为4。尽管LPD协议允许每个文档的副本值不同,但命令和接收打印系统不支持这一点。
The mapper SHOULD receive one set of the recommended document functions with each document, and SHOULD include the converted information as an operation or job template attribute with each IPP document. The functions SHOULD be received in the order 'U' and 'N', but they MAY arrive in any order.
映射器应在每个文档中接收一组推荐的文档功能,并应将转换后的信息作为操作或作业模板属性包含在每个IPP文档中。函数应按“U”和“N”的顺序接收,但它们可以按任何顺序到达。
LPD function IPP name value description name value
LPD函数IPP名称值说明名称值
U fff ignored N n Name of source file document-name n
U fff忽略了N源文件的名称文档名称N
Note: the value 'fff' of the 'U' function is the name of the data file as transferred, e.g. "dfA123woden".
注:“U”函数的值“fff”是传输的数据文件的名称,例如“dfA123woden”。
If the IPP-to-LPD mapper receives an IPP operation, the following table summarizes the LPD command that it uses. Each section below gives the detail. Each of the following sub-sections appear as sub-sections of section 3 in the document "Internet Printing Protocol/1.0: Model and Semantics" [RFC2566].
如果IPP到LPD映射器接收到IPP操作,下表总结了它使用的LPD命令。下面的每个部分都给出了详细信息。以下各小节作为第3节的小节出现在文件“互联网打印协议/1.0:模型和语义”[RFC2566]中。
IPP operation LPD command
IPP操作LPD命令
Print-Job or Print-URI or receive-a-printer-job Create-Job/Send-Document/Send-URI and then print-any-waiting-jobs Validate-Job implemented by the mapper Cancel-Job remove-jobs Get-Printer-Attributes, Get-Job- send queue state (short or long) Attributes or Get-Jobs
打印作业或打印URI或接收-打印机-作业创建作业/发送文档/发送URI,然后打印任何等待的作业验证映射程序执行的作业取消作业删除作业获取打印机属性、获取作业-发送队列状态(短或长)属性或获取作业
The mapper SHALL send the following commands in the order listed below:
制图员应按下列顺序发送以下命令:
- receive-a-printer-job command - both receive-control-file sub-command and receive-data-file sub-command (unspecified order, see Note below) - print-any-waiting-jobs command, except that if the mapper is sending a sequence of receive a printer-job commands, it MAY omit sending print-any-waiting-jobs after any receive a printer-job command that is neither the first nor last command in this sequence
- receive-a-printer-job命令-接收控制文件子命令和接收数据文件子命令(未指定顺序,请参见下面的注释)-打印任何等待的作业命令,除非映射程序正在发送一系列接收打印机作业命令,在接收到不是此序列中的第一个或最后一个命令的打印机作业命令后,它可能会忽略发送打印任何等待的作业
Note: it is recommended that the order of the receive-control-file subcommand and the receive-data-file sub-command be configurable because either order fails for some print systems. Some print systems assume that the control file follows all data files and start printing immediately on receipt of the control file. When such a print system tries to print a data file that has not arrived, it produces an error. Other print systems assume that the control file arrives before the data files and start printing when the first data file arrives. Such a system ignores the control information, such as banner page or copies.
注意:建议配置接收控制文件子命令和接收数据文件子命令的顺序,因为对于某些打印系统,这两个命令的顺序都失败。一些打印系统假定控制文件跟随所有数据文件,并在收到控制文件后立即开始打印。当这样的打印系统试图打印尚未到达的数据文件时,会产生错误。其他打印系统假定控制文件在数据文件之前到达,并在第一个数据文件到达时开始打印。这样的系统会忽略控制信息,例如标题页或副本。
NOTE: This specification does not define the mapping between the IPP printer-uri and the LPD printer-name.
注意:本规范未定义IPP打印机uri和LPD打印机名称之间的映射。
The mapper SHALL send the IPP operation attributes and job template attributes received from the operation to the LPD printer by using the LPD receive-control-file sub-command. The mapper SHALL create the LPD job-number for use in the control file name, but the receiving printer MAY, in some circumstances, assign a different job-number to the job. The mapper SHALL create the IPP job-id and IPP job-uri returned in the Print-Job response.
映射器应使用LPD接收控制文件子命令,将从操作中接收到的IPP操作属性和作业模板属性发送到LPD打印机。绘图员应创建LPD作业编号,以便在控制文件名中使用,但在某些情况下,接收打印机可能会为作业分配不同的作业编号。映射程序应创建打印作业响应中返回的IPP作业id和IPP作业uri。
NOTE: This specification does not specify how the mapper determines the LPD job-number, the IPP job-id or the IPP job-uri of a job that it creates nor does it specify the relationship between the IPP job-uri, IPP the job-id and the LPD job-number, both of which the mapper creates. However, it is likely that the mapper will use the same integer value for both the LPD job-number and the IPP job-id, and that the IPP Job-uri is the printer's URI with the job-id concatenated on the end.
注意:本规范未指定映射器如何确定其创建的作业的LPD作业编号、IPP作业id或IPP作业uri,也未指定映射器创建的IPP作业uri、IPP作业id和LPD作业编号之间的关系。但是,映射器很可能会对LPD作业编号和IPP作业id使用相同的整数值,并且IPP作业uri是打印机的uri,作业id在末尾连接。
The mapper SHALL send data received in the IPP operation to the LPD printer by using the LPD receive-data-file sub-command. The mapper SHALL specify the exact number of bytes being transmitted in the number-of-bytes field of the receive-data-file sub-command. It SHALL NOT use a value of 0 in this field.
映射器应使用LPD接收数据文件子命令将IPP操作中接收到的数据发送至LPD打印机。映射器应在接收数据文件子命令的字节数字段中指定传输的确切字节数。该字段中不得使用0值。
If the mapper, while it is transmitting a receive-a-printer-job command or sub-command, either detects that its IPP connection has closed or receives a Cancel-Job operation, the mapper SHALL terminate the LPD job either with the abort sub-command or the remove-jobs command.
如果映射器在发送接收打印机作业命令或子命令时检测到其IPP连接已关闭或接收到取消作业操作,则映射器应使用中止子命令或删除作业命令终止LPD作业。
This document does not address error code conversion.
此文档不处理错误代码转换。
The mapper SHALL handle this operation in the same way as a Print-Job operation except that it SHALL obtain data referenced by the "document-uri" operation attribute and SHALL then treat that data as if it had been received via a Print-Job operation.
映射器应以与打印作业操作相同的方式处理该操作,但其应获取“文档uri”操作属性引用的数据,然后将该数据视为通过打印作业操作接收的数据。
The mapper SHALL perform this operation directly. Because LPD supports very few attributes, this operation doesn't have much to check.
制图员应直接执行此操作。由于LPD支持的属性很少,因此此操作没有太多需要检查的内容。
The mapper SHALL handle this operation like Print-Job, except:
制图员应像处理打印作业一样处理此操作,但以下情况除外:
- the mapper SHALL send the control file after it has received the last Send-Document or Send-URI operation because the control file contains all the document-name and document-format values specified in the Send-Document and Send-URI operations. - the mapper SHALL perform one receive-data-file sub-command for each Send-Document or Send-URI operation received and in the same order received. - the mapper SHALL send the control file either before all data files or after all data files. (See the note in the section on Print-Job about the dilemma of sending the control file either before or after the data files.
- 映射程序应在收到上次发送文档或发送URI操作后发送控制文件,因为控制文件包含发送文档和发送URI操作中指定的所有文档名称和文档格式值。-映射程序应为接收到的每个发送文档或发送URI操作执行一个接收数据文件子命令,并以相同的接收顺序执行。-制图员应在所有数据文件之前或之后发送控制文件。(请参阅“打印作业”一节中关于在数据文件之前或之后发送控制文件这一难题的说明。
The mapper performs a receive-data-file sub-command on the received data. See the preceding section 5.4 "Create-Job" for the details.
映射程序对接收到的数据执行接收数据文件子命令。有关详细信息,请参见前面的第5.4节“创建作业”。
The mapper SHALL obtain the data referenced by the "document-uri" operation attribute, and SHALL then treat that data as if it had been received via a Send-Document operation. See the preceding section 5.5 "Send-Document" for the details.
映射器应获取“文档uri”操作属性引用的数据,然后将该数据视为通过发送文档操作接收的数据。有关详细信息,请参见上文第5.5节“发送文件”。
The mapper SHALL perform a remove-jobs command with the following operation attributes:
映射器应执行具有以下操作属性的删除作业命令:
- the printer is the one to which the job was submitted, that is the IPP printer-uri is mapped to an LPD printer-name by the same mechanism as for all commands - the agent is the authenticated user-name of the IPP client - the job-number is the job-id returned by the Print-Job command, that is, the LPD job-number has the same value as the IPP job-id for likely implementations
- 打印机是作业提交到的打印机,即IPP打印机uri通过与所有命令相同的机制映射到LPD打印机名称-代理是IPP客户端经过身份验证的用户名-作业编号是打印作业命令返回的作业id,即,对于可能的实施,LPD作业编号的值与IPP作业id的值相同
LPD severely limits the set of attributes that the mapper is able to return in its response for this operation. The mapper SHALL support, at most, the following printer attributes:
LPD严重限制映射程序在此操作的响应中能够返回的属性集。映射器最多应支持以下打印机属性:
- printer-state - printer-state-reasons
- 打印机状态-打印机状态原因
The mapper uses either the long or short form of the "send queue state" command.
映射器使用长或短形式的“发送队列状态”命令。
The mapper SHALL assume that the LPD response that it receives has the format and information specified in section 3.3 "Send queue state (short)" and section 3.4 "Send queue state (long)". The mapper SHALL determine the value of each requested attribute by using the inverse of the mapping specified in the two aforementioned sections.
映射器应假设其接收的LPD响应具有第3.3节“发送队列状态(短)”和第3.4节“发送队列状态(长)”中规定的格式和信息。制图员应使用上述两节中规定的映射的倒数来确定每个请求属性的值。
Note: the mapper can determine the response from the printer-status line without examining the rest of the LPD response.
注意:映射器可以从打印机状态行确定响应,而无需检查LPD响应的其余部分。
LPD severely limits the set of attributes that the mapper is able to return in its response for this operation. The mapper SHALL support, at most, the following job attributes:
LPD严重限制映射程序在此操作的响应中能够返回的属性集。映射器最多应支持以下作业属性:
- number-of-intervening-jobs - job-originating-user-name - job-id - document-name - job-k-octets - copies
- 干预作业数-作业发起用户名-作业id-文档名称-作业k-八位字节-副本
The mapper uses either the long or short form of the "send queue state" command. If it receives a request for the "job-k-octets" or "copies" and supports the attribute it SHALL use the long form; otherwise, it SHALL use the short form.
映射器使用长或短形式的“发送队列状态”命令。如果收到“作业k八位字节”或“副本”请求并支持该属性,则应使用长格式;否则,应使用缩写形式。
Note: the value of job-k-octets is the value in the short form divided by the number of "copies" which is on the long form only. Its value can also be determined by adding the "size" field values for each document in the job in the long form.
注:job-k-octets的值是短格式的值除以仅长格式的“拷贝数”。它的值也可以通过以长格式为作业中的每个文档添加“大小”字段值来确定。
The mapper SHALL assume that the LPD response that it receives has the format and information specified in section 3.3 "Send queue state (short)" and section 3.4 "Send queue state (long)". The mapper SHALL determine the value of each requested attribute by using the inverse of the mapping specified in the two aforementioned sections.
映射器应假设其接收的LPD响应具有第3.3节“发送队列状态(短)”和第3.4节“发送队列状态(长)”中规定的格式和信息。制图员应使用上述两节中规定的映射的倒数来确定每个请求属性的值。
Note: when the mapper uses the LPD short form, it can determine the response from the single LPD line that pertains to the job specified by the Get-Job-Attributes operation.
注意:当映射程序使用LPD缩写形式时,它可以确定来自单个LPD行的响应,该行属于Get job ATTRIBUTS操作指定的作业。
Note: the mapper can use its correspondence between the IPP job-id, job-uri and the LPD job-number.
注意:映射程序可以使用IPP作业id、作业uri和LPD作业编号之间的对应关系。
The mapper SHALL perform this operation in the same way as Get-Job-Attributes except that the mapper converts all the LPD job-lines, and the IPP response contains one job object for each job-line in the LPD response.
映射器应以与获取作业属性相同的方式执行此操作,但映射器转换所有LPD作业行,并且IPP响应包含LPD响应中每个作业行的一个作业对象。
This section describes the mapping from IPP operation attributes and job template attributes to LPD control file lines (called ' functions'). The mapper receives the IPP operation attributes and job template atributes via the IPP operation. Each of the IPP operation attributes and job template attributes appear as sub-sections of section 3 and 4.2 in the IPP model document [RFC2566].
本节介绍从IPP操作属性和作业模板属性到LPD控制文件行(称为“函数”)的映射。映射器通过IPP操作接收IPP操作属性和作业模板属性。每个IPP操作属性和作业模板属性在IPP模型文件[RFC2566]中显示为第3节和第4.2节的小节。
In the context of LPD control file lines, the text operands have a maximum length of 31 or 99 while IPP operation attributes and job template attributes have a maximum of 255 or 1023 octets, depending on the attribute syntax. Therefore, there may be some data loss if the IPP operation attribute and job template attribute values exceed the maximum length of the LPD equivalent operands.
在LPD控制文件行的上下文中,文本操作数的最大长度为31或99,而IPP操作属性和作业模板属性的最大长度为255或1023个八位字节,具体取决于属性语法。因此,如果IPP操作属性和作业模板属性值超过LPD等效操作数的最大长度,则可能会有一些数据丢失。
The mapper converts each supported IPP operation attribute and job template attribute to its corresponding LPD function as defined by tables in the subsections that follow. These subsections group functions according to whether they are:
映射器将每个受支持的IPP操作属性和作业模板属性转换为其相应的LPD函数,如以下小节中的表所定义。这些小节根据功能是否为:
- required with a job, - optional with a job - required with each document.
- 作业必需,-作业可选-每个文档必需。
In the tables below, each IPP value is given a name, such as 'h'. If an LPD value uses the IPP value, then the LPD value column contains the IPP name, such as 'h' to denote this. Otherwise, the LPD value column specifies the literal value.
在下表中,每个IPP值都有一个名称,如“h”。如果LPD值使用IPP值,则LPD值列包含IPP名称,如“h”表示此名称。否则,LPD value列将指定文字值。
The mapper SHALL include the following LPD functions with each job, and they SHALL have the specified value. They SHALL be the first functions in the control file and they SHALL be in the order "H" and then "P".
映射器应在每项作业中包括以下LPD功能,且应具有规定值。它们应为控制文件中的第一个功能,顺序应为“H”和“P”。
IPP LPD function name value name value description
IPP LPD函数名称值名称值说明
(perhaps in security h H gateway host Originating Host layer) requesting-user-name u P u User identification and in the security layer
(可能在安全网关主机发起主机层中)请求用户名u P u用户标识,并在安全层中
A mapper SHALL sends its own host rather than the client's host, because some LPD systems require that it be the same as the host from which the remove-jobs command comes. 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 LPD remove-jobs operation.
映射程序应发送其自己的主机,而不是客户端的主机,因为某些LPD系统要求它与执行删除作业命令的主机相同。映射程序可以发送自己的用户名作为用户标识,而不是客户端用户。但在任何情况下,发送的值应与LPD删除作业操作兼容。
The mapper MAY include the following LPD functions with each job. They SHALL have the specified value if they are sent. These functions, if present, SHALL follow the require job functions, and they SHALL precede the required document functions.
映射器在每个作业中可能包括以下LPD功能。如果发送,则应具有规定值。这些功能(如有)应遵循要求的工作功能,并应先于要求的文件功能。
IPP attribute LPD function name value name value description
IPP属性LPD函数名称值名称值说明
job-name j J j Job name for banner page job-sheets 'standard' L u Print banner page job-sheets 'none' omit 'L' function
作业名称j标题页作业表的作业名称“标准”L u打印标题页作业表“无”省略“L”功能
Note: 'L' has special meaning when it is omitted. If 'J' is omitted, some undefined behavior occurs with respect to the banner page.
注:“L”在省略时具有特殊含义。如果省略“J”,则标题页会出现一些未定义的行为。
The mapper SHALL include one set of the following LPD functions with each document, and they SHALL have the specified values. For each document, the order of the functions SHALL be 'f', 'U' and then 'N', where 'f' is replicated once for each copy.
映射器应在每个文件中包含一组以下LPD功能,且应具有规定值。对于每个文件,功能顺序应为“f”、“U”和“N”,其中“f”在每个副本中复制一次。
IPP attribute LPD function
IPP属性LPD函数
name value name value description
名称值名称值说明
document- 'application/octet- f fff Print formatted file format stream' or 'application/PostScript' copies c replicate 'f' 'c' times none U fff Unlink data file document- n N n Name of source file name
文档-“应用程序/八位字节-f fff打印格式文件格式流”或“应用程序/PostScript”复制c复制“f”“c”次无U fff取消链接数据文件文档-n源文件名的名称
Note: the value 'fff' of the 'f' and 'U' functions is the name of the data file as transferred, e.g. "dfA123woden".
注:“f”和“U”函数的值“fff”是传输的数据文件的名称,例如“dfA123woden”。
Note: the mapper SHALL not send the 'o' function
注:映射器不得发送“o”功能
ISSUE: should we register DVI, troff or ditroff?
问题:我们应该注册DVI、troff还是ditroff?
If the mapper receives no "ipp-attribute-fidelitybest-effort" or it has a value of false, then the mapper SHALL reject the job if it specifies attributes or attribute values that are not among those supported in the above tables.
如果映射器未收到“ipp属性fidelitybest努力”或其值为false,则如果映射器指定的属性或属性值不在上表支持的属性或属性值中,则映射器应拒绝作业。
Below is an example of the minimal control file for a job with three copies of two files 'foo' and 'bar':
下面是作业的最小控制文件示例,其中包含两个文件“foo”和“bar”的三个副本:
H tiger P jones f dfA123woden f dfA123woden f dfA123woden U dfA123woden N foo f dfB123woden f dfB123woden f dfB123woden
H tiger P jones f dfA123woden f dfA123woden f dfA123woden f dfA123woden f dfB123woden f dfB123woden f dfB123woden f dfB123woden f dfB123woden
U dfB123woden N bar
U dfB123woden棒
There are no security issues beyond those covered in the IPP Encoding and Transport document [RFC2565], the IPP model document [RFC2566] and the LPD document [RFC1179].
除IPP编码和运输文件[RFC2565]、IPP模型文件[RFC2566]和LPD文件[RFC1179]中所述的安全问题外,不存在其他安全问题。
[ipp-iig] Hasting, T., et al., "Internet Printing Protocol/1.0: Implementer's Guide", Work in Progress.
[ipp iig]Hasting,T.等人,“互联网打印协议/1.0:实施者指南”,正在进行的工作。
[RFC1759] Smith, R., Wright, F., Hastings, T., Zilles, S., and J. Gyllenskog, "Printer MIB", RFC 1759, March 1995.
[RFC1759]Smith,R.,Wright,F.,Hastings,T.,Zilles,S.,和J.Gylenskog,“打印机MIB”,RFC 1759,1995年3月。
[RFC1179] McLaughlin, L., "Line Printer Daemon Protocol", RFC 1179, August 1990.
[RFC1179]McLaughlin,L.,“线路打印机守护程序协议”,RFC1179,1990年8月。
[RFC2119] Bradner, S. "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC2234] D. Crocker et al., "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
[RFC2234]D.Crocker等人,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。
[RFC2565] Herriot, R., Butler, S., Moore, P. and R. Tuner, "Internet Printing Protocol/1.0: Encoding and Transport", RFC 2565, April 1999.
[RFC2565]Herriot,R.,Butler,S.,Moore,P.和R.Tuner,“互联网打印协议/1.0:编码和传输”,RFC 25651999年4月。
[RFC2566] deBry, R., Hastings, T., Herriot, R., Isaacson, S., and P. Powell, "Internet Printing Protocol/1.0: Model and Semantics", RFC 2566, April 1999.
[RFC2566]deBry,R.,Hastings,T.,Herriot,R.,Isaacson,S.,和P.Powell,“互联网打印协议/1.0:模型和语义”,RFC 2566,1999年4月。
[RFC2567] Wright, D., "Design Goals for an Internet Printing Protocol", RFC 2567, April 1999.
[RFC2567]Wright,D.,“互联网打印协议的设计目标”,RFC2567,1999年4月。
[RFC2568] Zilles, S., "Rationale for the Structure and Model and Protocol for the Internet Printing Protocol", RFC 2568, April 1999.
[RFC2568]Zilles,S.“互联网打印协议的结构、模型和协议的基本原理”,RFC 2568,1999年4月。
Robert Herriot (Editor) Xerox Corporation 3400 Hillview Ave., Bldg #1 Palo Alto, CA 94304
罗伯特·赫里奥特(编辑)施乐公司加利福尼亚州帕洛阿尔托市希尔维尤大道3400号1栋94304
Phone: 650-813-7696 Fax: 650-813-6860 EMail: rherriot@pahv.xerox.com
电话:650-813-7696传真:650-813-6860电子邮件:rherriot@pahv.xerox.com
Norm Jacobs Sun Microsystems Inc. 1430 Owl Ridge Rd. Colorado Springs, CO 80919
Norm Jacobs Sun Microsystems Inc.科罗拉多州斯普林斯市猫头鹰岭路1430号,邮编:80919
Phone: 719-532-9927 Fax: 719-535-0956 EMail: Norm.Jacobs@Central.sun.com
电话:719-532-9927传真:719-535-0956电子邮件:Norm。Jacobs@Central.sun.com
Thomas N. Hastings Xerox Corporation 701 S. Aviation Blvd., ESAE-231 El Segundo, CA 90245
托马斯·N·黑斯廷斯施乐公司加利福尼亚州塞贡多市南航空大道701号,ESAE-231,邮编90245
Phone: 310-333-6413 Fax: 310-333-5514 EMail: hastings@cp10.es.xerox.com
电话:310-333-6413传真:310-333-5514电子邮件:hastings@cp10.es.xerox.com
Jay Martin Underscore, Inc. 41-C Sagamore Park Road Hudson, NH 03051-4915
杰伊·马丁公司,地址:新罕布什尔州哈德逊市萨加莫尔公园路41-C号,邮编:03051-4915
Phone: 603-889-7000 Fax: 603-889-2699 EMail: jkm@underscore.com
电话:603-889-7000传真:603-889-2699电子邮件:jkm@underscore.com
The syntax in ABNF for the response to the LPD command 'send-queue-state (long)' is:
ABNF中响应LPD命令“发送队列状态(长)”的语法为:
status-response = empty-queue / nonempty-queue empty-queue = "no-entries" LF nonempty-queue = printer-status LF heading LF *(job LF) printer-status = OK-status / error-status OK-status = printer-name SP "ready and printing" LF error-status = < implementation dependent status information > heading = "Rank" 3SP "Owner" 6SP "Job" 13SP "Files" 23SP "Total Size" LF ; the column headings and their values below begin at the columns ; 1, 8, 19, 35 and 63 job = rank *SP owner *SP job *SP files *SP total-size "bytes" ; jobs are in order of oldest to newest rank = "active" / "1st" / "2nd" / "3rd" / integer "th" ; job that is printing is "active" ; other values show position in the queue owner = <user name of person who submitted the job> job = 1*3DIGIT ; job-number files = <file name> *( "," <file name>) ; truncated to 24 characters total-size = 1*DIGIT ; combined size in bytes of all documents
status-response = empty-queue / nonempty-queue empty-queue = "no-entries" LF nonempty-queue = printer-status LF heading LF *(job LF) printer-status = OK-status / error-status OK-status = printer-name SP "ready and printing" LF error-status = < implementation dependent status information > heading = "Rank" 3SP "Owner" 6SP "Job" 13SP "Files" 23SP "Total Size" LF ; the column headings and their values below begin at the columns ; 1, 8, 19, 35 and 63 job = rank *SP owner *SP job *SP files *SP total-size "bytes" ; jobs are in order of oldest to newest rank = "active" / "1st" / "2nd" / "3rd" / integer "th" ; job that is printing is "active" ; other values show position in the queue owner = <user name of person who submitted the job> job = 1*3DIGIT ; job-number files = <file name> *( "," <file name>) ; truncated to 24 characters total-size = 1*DIGIT ; combined size in bytes of all documents
The syntax in ABNF for the response to the LPD command 'send-queue-state (long)' is:
ABNF中响应LPD命令“发送队列状态(长)”的语法为:
status-response = empty-queue / nonempty-queue empty-queue = "no-entries" LF nonempty-queue = printer-status LF *job printer-status = OK-status / error-status OK-status = printer-name SP "ready and printing" LF error-status = < implementation dependent status information > job = LF line-1 LF line-2 LF line-1 = owner ":" SP rank 1*SP "[job" job SP host "]" line-2 = file-name 1*SP document-size "bytes" ; jobs are in order of oldest to newest rank = "active" / "1st" / "2nd" / "3rd" / integer "th" ; job that is printing is "active" ; other values show position in the queue owner = <user name of person who submitted the job> job = 1*3DIGIT file-name = [ 1*DIGIT "copies of" SP ] <file name> ; truncated to 24 characters document-size = 1*DIGIT ;size of single copy of the document.
status-response = empty-queue / nonempty-queue empty-queue = "no-entries" LF nonempty-queue = printer-status LF *job printer-status = OK-status / error-status OK-status = printer-name SP "ready and printing" LF error-status = < implementation dependent status information > job = LF line-1 LF line-2 LF line-1 = owner ":" SP rank 1*SP "[job" job SP host "]" line-2 = file-name 1*SP document-size "bytes" ; jobs are in order of oldest to newest rank = "active" / "1st" / "2nd" / "3rd" / integer "th" ; job that is printing is "active" ; other values show position in the queue owner = <user name of person who submitted the job> job = 1*3DIGIT file-name = [ 1*DIGIT "copies of" SP ] <file name> ; truncated to 24 characters document-size = 1*DIGIT ;size of single copy of the document.
The follow LPD functions have no IPP equivalent. The LPD-to-IPP mapper ignores them and the IPP-to-LPD mapper does not send them.
以下LPD功能没有IPP等效项。LPD到IPP映射器将忽略它们,IPP到LPD映射器不会发送它们。
LPD command name description
LPD命令名说明
C Class for banner page I Indent Printing H Host of client M Mail when printed S Symbolic link data T Title for pr W Width of output 1 troff R font 2 troff I font 3 troff B font 4 troff S font
C类横幅页I缩进打印H主机客户端M邮件打印时S符号链接数据T标题pr W宽度输出1 troff R字体2 troff I字体3 troff B字体4 troff S字体
The follow LPD functions specify document-formats which have no IPP equivalent, unless someone registers them. The LPD-to-IPP mapper rejects jobs that request such a document format, and the IPP-to-LPD mapper does not send them.
下面的LPD函数指定没有IPP等价物的文档格式,除非有人注册它们。LPD到IPP映射器拒绝请求这种文档格式的作业,IPP到LPD映射器不发送这些作业。
LPD command name description
LPD命令名说明
c Plot CIF file d Print DVI file g Plot file k reserved for Kerberized clients and servers n Print ditroff output file p Print file with 'pr' format r File to print with FORTRAN carriage control t Print troff output file v Print raster file z reserved for future use with the Palladium print system
c打印CIF文件d打印DVI文件g打印文件k为Kerberized客户端和服务器保留n打印ditroff输出文件p使用“pr”格式打印文件r文件使用FORTRAN回车控制打印t打印troff输出文件v打印光栅文件z保留供将来与钯打印系统一起使用
Copyright (C) The Internet Society (1999). All Rights Reserved.
版权所有(C)互联网协会(1999年)。版权所有。
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。