RFC 2910
Internet Printing Protocol/1.1: Encoding and Transport
Internet Printing Protocol/1.1: Encoding and Transport โจ
Bestie, the title block tea ๐ต๐ This is RFC 2910, a Standards Track doc from September 2000. Its editor is R. Herriot from Xerox Corporation, and the other authors are S. Butler (Hewlett-Packard), P. Moore (Peerless Systems Networking), R. Turner (2wire.com), and J. Wenn (Xerox Corporation). It obsoletes RFC 2565 ๐ฆ
Status of this Memo
Okay so this doc is an Internet standards track protocol for the Internet community ๐ธ It also wants discussion and suggestions for improvements, so bring your ideas! For the standardization state and status, check the current edition of "Internet Official Protocol Standards" (STD 1). And distribution of this memo is unlimited, so share away ๐
Copyright Notice
Copyright (C) The Internet Society (2000). All Rights Reserved. ๐
Abstract
This doc is one of a set that covers every part of the new Internet Printing Protocol (IPP) ๐จ๏ธโจ IPP is an application level protocol for distributed printing using Internet tools and technologies, and it's giving main character energy. RFC 2910 sets the rules for encoding IPP operations and IPP attributes into a brand new Internet MIME media type called "application/ipp". It also sets the rules for carrying a message body whose Content-Type is "application/ipp" over Hypertext Transfer Protocol (HTTP) ๐ And it defines a new scheme named 'ipp' for identifying IPP printers and jobs ๐ง
The full set of IPP docs is:
- 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.1: Model and Semantics [RFC2911]
- Internet Printing Protocol/1.1: Encoding and Transport (this document)
- Internet Printing Protocol/1.1: Implementer's Guide [ipp-iig]
- Mapping between LPD and IPP Protocols [RFC2569]
Here's the lowdown on each one ๐
"Design Goals for an Internet Printing Protocol" looks at distributed printing functionality with real-life scenarios, so you can see what a printing protocol for the Internet needs. It covers requirements for three kinds of users: end users, operators, and administrators. It calls out the subset of end user requirements that IPP/1.1 satisfies, and a few OPTIONAL operator operations have been added to IPP/1.1 ๐
"Rationale for the Structure and Model and Protocol for the Internet Printing Protocol" is the big-picture view. It maps out the roadmap for the whole IPP spec suite and explains the reasoning behind the IETF working group's major decisions ๐ง
"Internet Printing Protocol/1.1: Model and Semantics" is a simplified model with abstract objects, their attributes, and their operations, all independent of encoding and transport. It introduces a Printer and a Job object, and the Job object optionally supports multiple documents per Job. It also deals with security, internationalization, and directory issues ๐
"Internet Printing Protocol/1.1: Implementer's Guide" gives advice to IPP client and IPP object implementers ๐ ๏ธ
"Mapping between LPD and IPP Protocols" gives some advice to implementers of gateways between IPP and LPD (Line Printer Daemon) implementations ๐
Table of Contents
1. Introduction ...................................................4
2. Conformance Terminology ........................................4
3. Encoding of the Operation Layer ...............................4
3.1 Picture of the Encoding ...................................6
3.1.1 Request and Response...................................6
3.1.2 Attribute Group........................................6
3.1.3 Attribute..............................................7
3.1.4 Picture of the Encoding of an Attribute-with-one-value.7
3.1.5 Additional-value.......................................8
3.1.6 Alternative Picture of the Encoding of a Request Or a
Response...............................................9
3.2 Syntax of Encoding ........................................9
3.3 Attribute-group ..........................................11
3.4 Required Parameters ......................................12
3.4.1 Version-number........................................12
3.4.2 Operation-id..........................................12
3.4.3 Status-code...........................................12
3.4.4 Request-id............................................13
3.5 Tags .....................................................13
3.5.1 Delimiter Tags........................................13
3.5.2 Value Tags............................................14
3.6 Name-Length ..............................................16
3.7 (Attribute) Name .........................................16
3.8 Value Length .............................................16
3.9 (Attribute) Value ........................................17
3.10 Data .....................................................18
4. Encoding of Transport Layer ...................................18
4.1 Printer-uri and job-uri ..................................19
5. IPP URL Scheme ................................................20
6. IANA Considerations ...........................................22
7. Internationalization Considerations ...........................23
8. Security Considerations .......................................23
8.1 Security Conformance Requirements ........................23
8.1.1 Digest Authentication.................................23
8.1.2 Transport Layer Security (TLS)........................24
8.2 Using IPP with TLS .......................................25
9. Interoperability with IPP/1.0 Implementations .................25
9.1 The "version-number" Parameter ...........................25
9.2 Security and URL Schemes .................................26
10. References ...................................................27
11. Authors' Addresses ...........................................29
12. Other Participants: ..........................................31
13. Appendix A: Protocol Examples ................................33
13.1 Print-Job Request ........................................33
13.2 Print-Job Response (successful) ..........................34
13.3 Print-Job Response (failure) .............................35
13.4 Print-Job Response (success with attributes ignored) .....36
13.5 Print-URI Request ........................................38
13.6 Create-Job Request .......................................39
13.7 Get-Jobs Request .........................................40
13.8 Get-Jobs Response ........................................41
14. Appendix B: Registration of MIME Media Type Information for
"application/ipp".............................................42
15. Appendix C: Changes from IPP/1.0 .............................44
16. Full Copyright Statement .....................................45
1. Introduction ๐ฆ
Okay so this doc has the rules for encoding IPP operations, and it describes two layers: the transport layer and the operation layer ๐
The transport layer is an HTTP/1.1 request or response. RFC 2616 [RFC2616] describes HTTP/1.1, and this doc spells out which HTTP headers an IPP implementation supports ๐ธ
The operation layer is the message body inside an HTTP request or response. The document "Internet Printing Protocol/1.1: Model and Semantics" [RFC2911] defines what that message body means and which values are supported. This doc is about how an IPP operation gets encoded. The aforementioned [RFC2911] is from now on called the "IPP model document" or just "model document" ๐โจ
Note: the version number of IPP (1.1) and HTTP (1.1) are not linked. They both just happen to be 1.1. ๐
2. Conformance Terminology ๐
The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119] ๐
3. Encoding of the Operation Layer ๐ง
The operation layer is the message body part of the HTTP request or response, and it MUST contain a single IPP operation request or IPP operation response. ๐ญ Each request or response is a sequence of values and attribute groups. Attribute groups are a sequence of attributes, and each attribute is a name and a value. Names and values are ultimately sequences of octets ๐
Octets are the most primitive type. Several types are built from octets, but three important ones are integers, character strings, and octet strings, and most other data types are built on those ๐
Every character string in this encoding MUST be a sequence of characters, where each character is associated with some charset and some natural language. A character string MUST be in "reading order", with the first character in the value (according to reading order) being the first character in the encoding. A character string whose associated charset is US-ASCII and whose associated natural language is US English is from now on called a US-ASCII-STRING. A character string whose associated charset and natural language are specified in a request or response, as described in the model document, is from now on called a LOCALIZED-STRING โจ
An octet string MUST be in "IPP model document order", with the first octet in the value (according to the IPP model document order) being the first octet in the encoding ๐ฆ
Every integer in this encoding MUST be encoded as a signed integer using two's-complement binary encoding with big-endian format (also known as "network order" and "most significant byte first") ๐ฅ The number of octets for an integer MUST be 1, 2 or 4, depending on how it's used in the protocol. One-octet integers, from now on called SIGNED-BYTE, are used for the version-number and tag fields. Two-byte integers, from now on called SIGNED-SHORT, are used for the operation-id, status-code, and length fields. Four-byte integers, from now on called SIGNED-INTEGER, are used for value fields and the request-id ๐
The following two sections show the encoding of the operation layer in two ways:
- informally, through pictures and description
- formally, through Augmented Backus-Naur Form (ABNF), as specified by RFC 2234 [RFC2234]
An operation request or response MUST use the encoding described in these two sections. ๐ซถ
3.1 Picture of the Encoding ๐ธ
Next up: the pictures of the encoding, so stay tuned, bestie ๐
3.1.1 Request and Response โจ
okay so this is where an operation request or response gets packed up, bestie ๐ every piece has a fixed slot, and the first few are non-negotiable:
-----------------------------------------------
| version-number | 2 bytes - required
-----------------------------------------------
| operation-id (request) |
| or | 2 bytes - required
| status-code (response) |
-----------------------------------------------
| request-id | 4 bytes - required
-----------------------------------------------
| attribute-group | n bytes - 0 or more
-----------------------------------------------
| end-of-attributes-tag | 1 byte - required
-----------------------------------------------
| data | q bytes - optional
-----------------------------------------------
the first three fields hold the values of the attributes from section 3.1.1 of the Model document ๐
the fourth field is "attribute-group", and it can show up 0 or more times ๐ซถ each one is a single group of attributes, like an Operation Attributes group or a Job Attributes group (go check the Model document for the deets). the IPP model doc is the one that says which attribute groups are required and what order they go in for each operation request and response ๐
the "end-of-attributes-tag" is always there, even when there's no "data" ๐ญ the Model document is what tells you whether "data" shows up for each operation request and response. ngl it's giving organized ๐ธ
3.1.2 Attribute Group ๐ฆ
each "attribute-group" field is packed like this:
-----------------------------------------------
| begin-attribute-group-tag | 1 byte
----------------------------------------------------------
| attribute | p bytes |- 0 or more
----------------------------------------------------------
the "begin-attribute-group-tag" marks the start of an "attribute-group" field, and its value tells you what kind of group it is, like Operations Attributes versus Job Attributes ๐ it also closes the previous attribute group, except for the one in the very first "attribute-group" field of a request or response (no previous group to close, obviously ๐). it works as the terminator because an "attribute-group" can't nest inside another "attribute-group". main character energy for the tag, fr ๐
an "attribute-group" holds zero or more "attribute" fields.
quick note: the "begin-attribute-group-tag" and "end-of-attributes-tag" values are called "delimiter-tags" ๐ง
3.1.3 Attribute ๐
an "attribute" field is encoded like this:
-----------------------------------------------
| attribute-with-one-value | q bytes
----------------------------------------------------------
| additional-value | r bytes |- 0 or more
----------------------------------------------------------
so if an attribute has a single value (like "copies" with a value of 10) or it's multi-valued but only has one value (like "sides-supported" with just 'one-sided'), it's just one "attribute-with-one-value" field ๐ when it's multi-valued with n values (like "sides-supported" with 'one-sided' and 'two-sided-long-edge'), you get one "attribute-with-one-value" field followed by n-1 "additional-value" fields. it's giving math but make it cute ๐
3.1.4 Picture of the Encoding of an Attribute-with-one-value ๐ธ
each "attribute-with-one-value" field is encoded like this:
-----------------------------------------------
| value-tag | 1 byte
-----------------------------------------------
| name-length (value is u) | 2 bytes
-----------------------------------------------
| name | u bytes
-----------------------------------------------
| value-length (value is v) | 2 bytes
-----------------------------------------------
| value | v bytes
-----------------------------------------------
an "attribute-with-one-value" field has five subfields, and I'm obsessed with how clean they are ๐ญ
- "value-tag" says what the attribute syntax is, like 0x44 for the attribute syntax 'keyword' ๐ฅ
- "name-length" says how long the "name" field is in bytes. that's u in the diagram, or 15 for the name "sides-supported" ๐
- "name" is the attribute's text name, like "sides-supported" ๐ฆ
- "value-length" says how long the "value" field is in bytes. that's v in the diagram, or 9 for the (keyword) value 'one-sided' โจ
- "value" is the actual value of the attribute, like the text 'one-sided' ๐ซถ
3.1.5 Additional-value ๐ง
each "additional-value" field is encoded like this:
-----------------------------------------------
| value-tag | 1 byte
-----------------------------------------------
| name-length (value is 0x0000) | 2 bytes
-----------------------------------------------
| value-length (value is w) | 2 bytes
-----------------------------------------------
| value | w bytes
-----------------------------------------------
an "additional-value" has four subfields ๐
- "value-tag" says what the attribute syntax is, like 0x44 for the attribute syntax 'keyword' ๐
- "name-length" is always 0, which is how you know it's an "additional-value" ๐ that zero is what tells an "additional-value" field (name-length is 0) apart from an "attribute-with-one-value" field (name-length is not 0). it's literally the whole trick ๐ญ
- "value-length" says how long the "value" field is in bytes. that's w in the diagram, or 19 for the (keyword) value 'two-sided-long-edge' ๐
- "value" is the actual value, like the text 'two-sided-long-edge' ๐
3.1.6 Alternative Picture of the Encoding of a Request Or a Response ๐
if you're a parser that takes action based on a "tag" value, the encoding looks like this to you ๐ง
-----------------------------------------------
| version-number | 2 bytes - required
-----------------------------------------------
| operation-id (request) |
| or | 2 bytes - required
| status-code (response) |
-----------------------------------------------
| request-id | 4 bytes - required
-----------------------------------------------------------
| tag (delimiter-tag or value-tag) | 1 byte |
----------------------------------------------- |-0 or more
| empty or rest of attribute | x bytes |
-----------------------------------------------------------
| end-of-attributes-tag | 1 byte - required
-----------------------------------------------
| data | y bytes - optional
-----------------------------------------------
here's what the parser should expect after each type of "tag" ๐
- "begin-attribute-group-tag": expect zero or more "attribute" fields ๐ซถ
- "value-tag": expect the rest of an "attribute-with-one-value" or an "additional-value" ๐ฅ
- "end-of-attributes-tag": expect that the "attribute" fields are finished, and there's optional "data" ๐ฆ
3.2 Syntax of Encoding ๐
the grammar below is ABNF [RFC2234], with one twist: 'strings of literals' MUST be case sensitive ๐ so 'a' means lower case 'a', not upper case 'A'. no mixing it up, bestie. also, SIGNED-BYTE and SIGNED-SHORT fields are written as '%x' values that show their range ๐ธ
ipp-message = ipp-request / ipp-response
ipp-request = version-number operation-id request-id
*attribute-group end-of-attributes-tag data
ipp-response = version-number status-code request-id
*attribute-group end-of-attributes-tag data
attribute-group = begin-attribute-group-tag *attribute
version-number = major-version-number minor-version-number
major-version-number = SIGNED-BYTE
minor-version-number = SIGNED-BYTE
operation-id = SIGNED-SHORT ; mapping from model defined below
status-code = SIGNED-SHORT ; mapping from model defined below
request-id = SIGNED-INTEGER ; whose value is > 0
attribute = attribute-with-one-value *additional-value
attribute-with-one-value = value-tag name-length name
value-length value
additional-value = value-tag zero-name-length value-length value
name-length = SIGNED-SHORT ; number of octets of 'name'
name = LALPHA *( LALPHA / DIGIT / "-" / "_" / "." )
value-length = SIGNED-SHORT ; number of octets of 'value'
value = OCTET-STRING
data = OCTET-STRING
zero-name-length = %x00.00 ; name-length of 0
value-tag = %x10-FF ;see section 3.7.2
begin-attribute-group-tag = %x00-02 / %04-0F ; see section 3.7.1
end-of-attributes-tag = %x03 ; tag of 3
; see section 3.7.1
SIGNED-BYTE = BYTE
SIGNED-SHORT = 2BYTE
SIGNED-INTEGER = 4BYTE
DIGIT = %x30-39 ; "0" to "9"
LALPHA = %x61-7A ; "a" to "z"
BYTE = %x00-FF
OCTET-STRING = *BYTE
the syntax below defines extra terms that get referenced elsewhere in this document. it gives you an alternate grouping of the delimiter tags ๐ง
delimiter-tag = begin-attribute-group-tag / ; see section 3.7.1
end-of-attributes-tag
delimiter-tag = %x00-0F ; see section 3.7.1
begin-attribute-group-tag = %x00 / operation-attributes-tag /
job-attributes-tag / printer-attributes-tag /
unsupported-attributes-tag / %x06-0F
operation-attributes-tag = %x01 ; tag of 1
job-attributes-tag = %x02 ; tag of 2
printer-attributes-tag = %x04 ; tag of 4
unsupported-attributes-tag = %x05 ; tag of 5
3.3. Attribute-group โจ
okay so every "attribute-group" field MUST be encoded with the "begin-attribute-group-tag" field first, then zero or more "attribute" sub-fields tucked in after it ๐
here's the lookup table that maps each model document group name to its "begin-attribute-group-tag" value ๐
Model Document Group "begin-attribute-group-tag" field
values
Operation Attributes "operations-attributes-tag"
Job Template Attributes "job-attributes-tag"
Job Object Attributes "job-attributes-tag"
Unsupported Attributes "unsupported-attributes-tag"
Requested Attributes "job-attributes-tag"
(Get-Job-Attributes)
Requested Attributes "printer-attributes-tag"
(Get-Printer-Attributes)
Document Content in a special position as
described above
for every operation request and response, the model document decides which attribute groups are required and which are optional, and also their order ๐ง inside each group, it decides the same stuff for the attributes (required, optional, and the order too) ๐
now the empty group situation, which is kind of iconic ๐ when the model document requires an attribute group in a request or response but that group has zero attributes, the request or response SHOULD still encode the group with the "begin-attribute-group-tag" field followed by zero "attribute" fields. for example, if the client asks for a single unsupported attribute with the Get-Printer-Attributes operation, the Printer MUST return no "attribute" fields, and it SHOULD return a "begin-attribute-group-tag" field for the Printer Attributes Group. the Unsupported Attributes group is NOT the same deal though ๐ according to the model document, the Unsupported Attributes Group SHOULD be present only if it contains at least one attribute
a receiver of a request MUST be able to process these two things as equivalent empty attribute groups ๐ซถ
a) A "begin-attribute-group-tag" field with zero following "attribute" fields.
b) An expected but missing "begin-attribute-group-tag" field.
and when the model document requires a sequence of an unknown number of attribute groups, each of the same type, the encoding MUST contain one "begin-attribute-group-tag" field for each attribute group, even when an "attribute-group" field has zero "attribute" sub-fields ๐ฆ for example, the Get-Jobs operation may return zero attributes for some jobs and not others. that "begin-attribute-group-tag" field followed by zero "attribute" fields basically tells the recipient "hey, there's a job in the queue, we just don't have any info on it except that it's in the queue" ๐ธ
3.4. Required Parameters ๐
some operation elements are called parameters in the model document [RFC2911]. they MUST be encoded in a special position, and they MUST NOT appear as operation attributes. the subsections below explain each one ๐
3.4.1. Version-number
the "version-number" field MUST consist of a major and minor version-number, and each of those MUST be represented by a SIGNED-BYTE. the major version-number MUST be the first byte of the encoding, and the minor version-number MUST be the second byte. the protocol described in this document MUST have a major version-number of 1 (0x01) and a minor version-number of 1 (0x01). the ABNF for these two bytes MUST be %x01.01 โจ
%x01.01
3.4.2. Operation-id
the "operation-id" field MUST contain an operation-id value defined in the model document. the value MUST be encoded as a SIGNED-SHORT, and it MUST be in the third and fourth bytes of the encoding of an operation request ๐ฅ
3.4.3. Status-code
the "status-code" field MUST contain a status-code value defined in the model document. the value MUST be encoded as a SIGNED-SHORT, and it MUST be in the third and fourth bytes of the encoding of an operation response ๐
the status-code is an operation attribute in the model document, but in the protocol it lives in a special position, outside of the operation attributes. no drama, just a different spot ๐ง
if an IPP status-code is returned, then the HTTP Status-Code MUST be 200 (successful-ok). with ANY other HTTP Status-Code value, the HTTP response MUST NOT contain an IPP message-body, and so no IPP status-code gets returned at all ๐ญ
3.4.4. Request-id
the "request-id" field MUST contain a request-id value as defined in the model document. the value MUST be encoded as a SIGNED-INTEGER, and it MUST be in the fifth through eighth bytes of the encoding ๐
3.5. Tags ๐ฆ
there are two kinds of tags, and they have very different jobs ๐
- delimiter tags: delimit major sections of the protocol, namely attributes and data
- value tags: specify the type of each attribute value
3.5.1. Delimiter Tags
here's the table for the delimiter tag values ๐
Tag Value (Hex) Meaning
0x00 reserved for definition in a future IETF
standards track document
0x01 "operation-attributes-tag"
0x02 "job-attributes-tag"
0x03 "end-of-attributes-tag"
0x04 "printer-attributes-tag"
0x05 "unsupported-attributes-tag"
0x06-0x0f reserved for future delimiters in IETF
standards track documents
when a "begin-attribute-group-tag" field shows up in the protocol, it means that zero or more of the following attributes, up to the next delimiter tag, MUST be attributes belonging to the attribute group named by that tag's value. for example, if the value of "begin-attribute-group-tag" is 0x01, the following attributes MUST be members of the Operations Attributes group ๐ซถ
the "end-of-attributes-tag" (value 0x03) MUST occur exactly once in an operation. it MUST be the last "delimiter-tag". and if the operation has a document-content group, the document data in that group MUST follow the "end-of-attributes-tag" ๐ธ
the order and presence of the "attribute-group" fields (the ones whose beginning is marked by the "begin-attribute-group-tag" subfield) for each operation request and each operation response MUST be the one defined in the model document. for the full details, check out section 3.7 "(Attribute) Name" and 13 "Appendix A: Protocol Examples" ๐ง
a Printer MUST treat a "delimiter-tag" (values from 0x00 through 0x0F) differently from a "value-tag" (values from 0x10 through 0xFF). that way the Printer knows whether there's a whole attribute group it doesn't understand, or just a single value it doesn't understand. big brain move ๐ง โจ
3.5.2. Value Tags
the remaining tables show values for the "value-tag" field, which is the first octet of an attribute. the "value-tag" field tells you the type of the attribute's value ๐
here are the "out-of-band" values for the "value-tag" field ๐
Tag Value (Hex) Meaning
0x10 unsupported
0x11 reserved for 'default' for definition in a future
IETF standards track document
0x12 unknown
0x13 no-value
0x14-0x1F reserved for "out-of-band" values in future IETF
standards track documents.
and these are the integer values for the "value-tag" field ๐ข
Tag Value (Hex) Meaning
0x20 reserved for definition in a future IETF
standards track document
0x21 integer
0x22 boolean
0x23 enum
0x24-0x2F reserved for integer types for definition in
future IETF standards track documents
NOTE: 0x20 is reserved for "generic integer" if it should ever be needed ๐
the octetString values for the "value-tag" field look like this ๐
Tag Value (Hex) Meaning
0x30 octetString with an unspecified format
0x31 dateTime
0x32 resolution
0x33 rangeOfInteger
0x34 reserved for definition in a future IETF
standards track document
0x35 textWithLanguage
0x36 nameWithLanguage
0x37-0x3F reserved for octetString type definitions in
future IETF standards track documents
and the character-string values for the "value-tag" field ๐
Tag Value (Hex) Meaning
0x40 reserved for definition in a future IETF
standards track document
0x41 textWithoutLanguage
0x42 nameWithoutLanguage
0x43 reserved for definition in a future IETF
standards track document
0x44 keyword
0x45 uri
0x46 uriScheme
0x47 charset
0x48 naturalLanguage
0x49 mimeMediaType
0x4A-0x5F reserved for character string type definitions
in future IETF standards track documents
NOTE: 0x40 is reserved for "generic character-string" if it should ever be needed ๐
NOTE: an attribute value always has a type, which is explicitly specified by its tag, and one such tag value is "nameWithoutLanguage". an attribute's name has an implicit type, which is keyword ๐ซถ
the values 0x60-0xFF are reserved for future type definitions in IETF standards track documents ๐ฎ
the tag 0x7F is reserved for extending types beyond the 255 values available with a single byte. a tag value of 0x7F MUST signify that the first 4 bytes of the value field are interpreted as the tag value. quick note: this future extension doesn't affect parsers that don't know about this special tag. the tag is like any other unknown tag, and the value length tells you the length of a value, which contains a value the parser treats atomically ๐ฆ values from 0x00 to 0x37777777 are reserved for definition in future IETF standard track documents. the values 0x40000000 to 0x7FFFFFFF are reserved for vendor extensions ๐ธ
3.6. Name-Length ๐
the "name-length" field MUST consist of a SIGNED-SHORT. this field MUST specify the number of octets in the immediately following "name" field. the value of this field excludes the two bytes of the "name-length" field itself. for example, if the "name" field contains "sides", the value of this field is 5 โจ
if a "name-length" field has a value of zero, the following "name" field MUST be empty, and the following value MUST be treated as an additional value for the attribute encoded in the nearest preceding "attribute-with-one-value" field. within an attribute group, if two or more attributes have the same name, the attribute group is mal-formed (see [RFC2911] section 3.1.3). the zero-length name is the only mechanism for multi-valued attributes ๐
3.7. (Attribute) Name ๐
the "name" field MUST contain the name of an attribute. the model document [RFC2911] specifies such names ๐
3.8 Value Length โจ
okay so the value-length field MUST be a SIGNED-SHORT, bestie ๐
It MUST say how many octets are in the value field that comes right after it. And it doesn't count its own two bytes, so the number is just the value part. Example: if the value holds the keyword (text) value 'one-sided', then value-length is 9 ๐ฆ
Integers are strict. For any type that's a binary signed integer, the sender MUST encode it in exactly four octets. No flexing with the size ๐
Strings are strict too. For any type that's a character-string, the sender MUST encode every character in the string and MUST NOT add any padding characters. What you see is what you get ๐
Now the "out-of-band" vibes ๐ For the out-of-band value-tag values defined in this document, like unsupported, the value-length MUST be 0 and the value MUST be empty. The value means nothing when the value-tag is one of these, so it's giving nothing ๐ The same rule covers future out-of-band value-tag values too, UNLESS the definition explicitly says the value-length MAY be non-zero and the value non-empty ๐ง
3.9 (Attribute) Value ๐
okay so the syntax types (set by the value-tag field) and most of the details of how attribute values look are defined in the IPP model document ๐ This table is the glow-up. It adds to the model document and defines those syntax types in terms of the 5 basic types from section 3, "Encoding of the Operation Layer" ๐ The 5 basic types are US-ASCII-STRING, LOCALIZED-STRING, SIGNED-INTEGER, SIGNED-SHORT, SIGNED-BYTE, and OCTET-STRING.
Syntax of Attribute Encoding
Value
textWithoutLanguage, LOCALIZED-STRING.
nameWithoutLanguage
textWithLanguage OCTET-STRING consisting of 4 fields:
a. a SIGNED-SHORT which is the number of
octets in the following field
b. a value of type natural-language,
c. a SIGNED-SHORT which is the number of
octets in the following field,
d. a value of type textWithoutLanguage.
The length of a textWithLanguage value MUST be
4 + the value of field a + the value of field c.
nameWithLanguage OCTET-STRING consisting of 4 fields:
a. a SIGNED-SHORT which is the number of
octets in the following field
b. a value of type natural-language,
c. a SIGNED-SHORT which is the number of
octets in the following field
d. a value of type nameWithoutLanguage.
The length of a nameWithLanguage value MUST be
4 + the value of field a + the value of field c.
charset, US-ASCII-STRING.
naturalLanguage,
mimeMediaType,
keyword, uri, and
uriScheme
Syntax of Attribute Encoding
Value
boolean SIGNED-BYTE where 0x00 is 'false' and 0x01 is
'true'.
integer and enum a SIGNED-INTEGER.
dateTime OCTET-STRING consisting of eleven octets whose
contents are defined by "DateAndTime" in RFC
1903 [RFC1903].
resolution OCTET-STRING consisting of nine octets of 2
SIGNED-INTEGERs followed by a SIGNED-BYTE. The
first SIGNED-INTEGER contains the value of
cross feed direction resolution. The second
SIGNED-INTEGER contains the value of feed
direction resolution. The SIGNED-BYTE contains
the units
rangeOfInteger Eight octets consisting of 2 SIGNED-INTEGERs.
The first SIGNED-INTEGER contains the lower
bound and the second SIGNED-INTEGER contains
the upper bound.
1setOf X Encoding according to the rules for an
attribute with more than 1 value. Each value
X is encoded according to the rules for
encoding its type.
octetString OCTET-STRING
The attribute syntax type of the value decides both its encoding and the value of its value-tag. So the type is the boss here ๐
3.10 Data ๐
The data field MUST include any data the operation requires. No skipping the homework ๐
4. Encoding of Transport Layer ๐ฆ
HTTP/1.1 [RFC2616] is the transport layer for this protocol, so that's the foundation โจ
The operation layer was designed assuming the transport layer carries these two things: the URI of the target job or printer operation, and the total length of the data in the operation layer, either as one single length or as a sequence of chunks where each chunk has its own length ๐
It is REQUIRED that a printer implementation support HTTP over the IANA assigned Well Known Port 631 (the IPP default port). A printer implementation may also support HTTP over some other port, if it wants to be extra ๐ธ
Each HTTP operation MUST use the POST method, with the request-URI being the object target of the operation. The Content-Type of the message-body in every request and response MUST be application/ipp. The message-body MUST contain the operation layer, and it MUST follow the syntax in section 3.2 "Syntax of Encoding" ๐ซถ A client implementation MUST follow the client rules for HTTP1.1 [RFC2616]. A printer (server) implementation MUST follow the origin server rules for HTTP1.1 [RFC2616].
An IPP server sends a response for each request it receives. If an IPP server detects an error, it MAY send a response before it has read the entire request. And if the HTTP layer of the IPP server finishes processing the HTTP headers successfully, it MAY send an intermediate response, like 100 Continue, with no IPP data before the IPP response shows up. A client MUST expect that whole variety of responses from an IPP server ๐ฅ For more on HTTP/1.1, check the HTTP documents [RFC2616] ๐
Chunking is a must-have too. An HTTP server MUST support chunking for IPP requests, and an IPP client MUST support chunking for IPP responses, according to HTTP/1.1 [RFC2616]. Note: this rule causes a conflict with non-compliant implementations of HTTP/1.1 that don't support chunking for POST methods, and this rule may cause a conflict with non-compliant implementations of HTTP/1.1 that don't support chunking for CGI scripts ๐
4.1 Printer-uri and job-uri ๐
All Printer and Job objects are identified by a Uniform Resource Identifier (URI) [RFC2396], so they can be referenced persistently and unambiguously ๐ง Since every URL is a specialized form of a URI, even though the rest of this document just says URI, that word is meant to cover URL too โจ
Some operation elements get encoded twice: once as the request-URI on the HTTP Request-Line, and again as a REQUIRED operation attribute in the application/ipp entity. These attributes are the target URI for the operation, and they're called printer-uri and job-uri ๐ฆ Note: the target URI shows up twice in an operation that references the same IPP object, but the two URIs NEED NOT be literally identical. One can be a relative URI and the other an absolute URI. HTTP/1.1 lets clients generate and send a relative URI instead of an absolute one. A relative URI identifies a resource within the scope of the HTTP server, but doesn't include the scheme, host, or port. Here's how URLs should be used when mapping IPP onto HTTP/1.1 ๐
- Even though it might be redundant, a client MUST supply the target of the operation both as an operation attribute and as a URI at the HTTP layer. The reason is to keep one consistent set of rules for mapping application/ipp onto many possible communication layers, even ones where URLs aren't the addressing mechanism in the transport layer ๐
- Even though the two URLs might not be literally identical (one relative, one absolute), they MUST both reference the same IPP object. However, a Printer NEED NOT verify that the two URLs reference the same IPP object, and NEED NOT take any action if it decides the two URLs are different ๐คทโโ๏ธ
- The URI at the HTTP layer is either relative or absolute, and the HTTP server uses it to route the HTTP request to the correct resource relative to that server. The HTTP server doesn't need to know about the URI inside the operation request ๐
- Once the HTTP server resource starts processing the HTTP request, it can get the reference to the right IPP Printer object from either the HTTP URI (using the context of the HTTP server for relative URLs) or from the URI inside the operation request. The choice is up to the implementation ๐
- HTTP URIs can be relative or absolute, but the target URI in the operation MUST be an absolute URI. No compromises on that one ๐
5. IPP URL Scheme โจ
okay so IPP/1.1 makes up a brand new scheme called ipp ๐ It's the value of a URL that points to either an IPP printer object or an IPP job object. Every IPP attribute that uses the ipp scheme is listed below. Here's the catch: the HTTP layer doesn't know what ipp is, so a client MUST map ipp URLs to http URLs first, and then follow the HTTP [RFC2616][RFC2617] rules for building a Request-Line and HTTP headers. The mapping is honestly simple, bestie, because ipp carries all the same protocol semantics as http [RFC2616]. The only differences are that it's for a print service, and the implicit (default) port clients connect to is port 631 ๐จ๏ธ๐
In the rest of this section, an ipp-URL means a URL with the ipp scheme whose implicit (default) port is 631. An http-URL means a URL with the http scheme, and an https-URL means a URL with the https scheme ๐ธ
A client and an IPP object (aka the server) MUST support the ipp-URL value in these IPP attributes:
job attributes:
job-uri
job-printer-uri
printer attributes:
printer-uri-supported
operation attributes:
job-uri
printer-uri
Each of those attributes identifies a printer or a job object. The ipp-URL is meant for the attributes in this list and no others, so don't go using it everywhere ๐
โโ๏ธ All of these attributes have a syntax type of uri, but plenty of uri attributes don't use the ipp scheme. job-more-info is one of them โจ
If a printer registers its URL with a directory service, the printer MUST register an ipp-URL. Non-negotiable ๐
User interfaces are out of scope for this document. But if software shows any of those five attributes' ipp-URL values to a human, it is REQUIRED that the human sees the ipp-URL exactly as is ๐ no editing it on the way out!
When a client sends a request, it MUST convert a target ipp-URL into a target http-URL for the HTTP layer, following these rules:
- change the
ippscheme tohttp - add an explicit port 631 if the URL doesn't already have an explicit port. Note: port 631 is the IANA assigned Well Known Port for the
ippscheme ๐ฆ
The client MUST use the target http-URL in both the HTTP Request-Line and the HTTP headers, as HTTP [RFC2616] [RFC2617] specifies. BUT (and this is the plot twist ๐ญ) the client MUST use the target ipp-URL as the value of the "printer-uri" or "job-uri" operation attribute inside the application/ipp body of the request. The server MUST use the ipp-URL for the value of the "printer-uri", "job-uri" or "printer-uri-supported" attributes inside the application/ipp body of the response. Two URLs, two jobs, iconic ๐
Here's an example. An IPP client sending a request directly (no proxy) to the ipp-URL "ipp://myhost.com/myprinter/myqueue" opens a TCP connection to port 631 (the ipp implicit port) on the host "myhost.com" and sends this data:
POST /myprinter/myqueue HTTP/1.1
Host: myhost.com:631
Content-type: application/ipp
Transfer-Encoding: chunked
...
"printer-uri" "ipp://myhost.com/myprinter/myqueue"
(encoded in application/ipp message body)
...
Another example: same request, but now it goes through a proxy "myproxy.com". The client opens a TCP connection to proxy port 8080 on the proxy host "myproxy.com" and sends this data:
POST http://myhost.com:631/myprinter/myqueue HTTP/1.1
Host: myhost.com:631
Content-type: application/ipp
Transfer-Encoding: chunked
...
"printer-uri" "ipp://myhost.com/myprinter/myqueue"
(encoded in application/ipp message body)
...
Then the proxy connects to the IPP origin server with headers that match the "no-proxy" example above. The proxy is just the middle person, bestie ๐ง
6. IANA Considerations ๐
This section explains how to allocate encodings for the following IETF standards track extensions and vendor extensions to the IPP/1.1 Encoding and Transport document:
- attribute syntaxes - see [RFC2911] section 6.3
- attribute groups - see [RFC2911] section 6.5
- out-of-band attribute values - see [RFC2911] section 6.7
These extensions follow the "type2" registration procedures defined in [RFC2911] section 6. Extensions registered for use with IPP/1.1 are OPTIONAL for client and IPP object conformance to the IPP/1.1 Encoding and Transport document. Optional means optional, babe ๐ซถ
These extension procedures line up with the guidelines the IESG sets out [IANA-CON]. [RFC2911] Section 11 describes how to propose new registrations. IANA will reject registration proposals that leave out required information or don't follow the format described in [RFC2911] Section 11. The IPP/1.1 Encoding and Transport document may also be extended by an appropriate RFC that specifies any of the above extensions ๐
7. Internationalization Considerations ๐
Check the section on "Internationalization Considerations" in the document "Internet Printing Protocol/1.1: Model and Semantics" [RFC2911] for info on internationalization. This document adds no additional issues, so you're covered โจ
8. Security Considerations ๐๐
Okay, this part is serious, so pay attention. The IPP Model and Semantics document [RFC2911] talks about high-level security requirements: Client Authentication, Server Authentication, and Operation Privacy. Client Authentication is how the client proves its identity to the server in a secure manner. Server Authentication is how the server proves its identity to the client in a secure manner. Operation Privacy is a mechanism for protecting operations from eavesdropping ๐ Someone is always lurking, so don't skip this.
8.1 Security Conformance Requirements
This section defines the security requirements for IPP clients and IPP objects. No skipping, periodt ๐
8.1.1 Digest Authentication
IPP clients MUST support:
Digest Authentication [RFC2617].
MD5 and MD5-sess MUST be implemented and supported.
The Message Integrity feature NEED NOT be used.
IPP Printers SHOULD support:
Digest Authentication [RFC2617].
MD5 and MD5-sess MUST be implemented and supported.
The Message Integrity feature NEED NOT be used.
Printers are SHOULD (not MUST) for Digest Authentication for these reasons:
- Client Authentication matters, but there's a whole class of printers where it just doesn't make sense. Specifically, a low-end device with limited ROM space and low paper throughput might not need Client Authentication. This class of device usually forces firmware designers to trade protocols off against functionality to hit the lowest possible cost. The designer weighs not just the code size, but also the testing, maintenance, usefulness, and time-to-market impact of every feature shipped to the customer. Forcing those low-end devices to provide security just to claim IPP/1.1 conformance wouldn't make business sense and could stall adoption of the standard ๐
- Print devices with high-volume throughput and available ROM space have a strong case for supporting Client Authentication, which protects the device from unauthorized access. These devices can lose a lot of consumables and paper if unauthorized access happens ๐
8.1.2 Transport Layer Security (TLS)
IPP Printers SHOULD support Transport Layer Security (TLS) [RFC2246] for Server Authentication and Operation Privacy. IPP Printers MAY also support TLS for Client Authentication. If an IPP Printer supports TLS, it MUST support the TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA cipher suite, as mandated by RFC 2246 [RFC2246]. All other cipher suites are OPTIONAL. An IPP Printer MAY support Basic Authentication (described in HTTP/1.1 [RFC2617]) for Client Authentication if the channel is secure. TLS with the above mandated cipher suite can provide that secure channel ๐
If an IPP client supports TLS, it MUST support the TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA cipher suite, as mandated by RFC 2246 [RFC2246]. All other cipher suites are OPTIONAL.
The IPP Model and Semantics document defines two printer attributes, uri-authentication-supported and uri-security-supported, that the client can use to discover a printer's security policy ๐ต๏ธโโ๏ธ That document also outlines IPP-specific security considerations and should be the primary reference for security implications of the IPP protocol itself. For backward compatibility with IPP version 1.0, IPP clients and printers may also support SSL3 [ssl]. That's in addition to the security required in this document.
8.2 Using IPP with TLS
IPP/1.1 uses the "Upgrading to TLS Within HTTP/1.1" mechanism [RFC2817]. An initial IPP request never uses TLS. The client requests a secure TLS connection by using the HTTP "Upgrade" header, and the server agrees in the HTTP response. The switch to TLS happens either because the server grants the client's upgrade request, or because a server asks to switch to TLS in its response. Secure communication begins with the server's response to switch to TLS ๐ฆ
9. Interoperability with IPP/1.0 Implementations ๐
It's outside this specification's scope to mandate conformance with previous versions. IPP/1.1 was deliberately designed, though, to make supporting previous versions easy. Worth noting: when this specification was written (1999), we would expect IPP/1.1 Printer implementations to:
understand any valid request in the format of IPP/1.0, or 1.1;
respond appropriately with a response containing the same "version-number" parameter value the client used in the request.
And we would expect IPP/1.1 clients to:
understand any valid response in the format of IPP/1.0, or 1.1.
9.1 The "version-number" Parameter
These are the rules for the "version-number" parameter (see section 3.3):
- Clients MUST send requests containing a "version-number" parameter with a '1.1' value, and SHOULD try supplying alternate version numbers if they receive a 'server-error-version-not-supported' error return in a response.
- IPP objects MUST accept requests containing a "version-number" parameter with a '1.1' value (or reject the request for reasons other than 'server-error-version-not-supported').
- It is recommended that IPP objects accept any request with the major version '1' (or reject the request for reasons other than 'server-error-version-not-supported'). See [RFC2911] "versions" sub-section.
- In any case, security MUST NOT be compromised when a client supplies a lower "version-number" parameter in a request. For example, if an IPP/1.1 conforming Printer object accepts version '1.0' requests and is configured to enforce Digest Authentication, it MUST do the same for a version '1.0' request. Downgrade attacks are not a vibe ๐ซ๐
9.2 Security and URL Schemes ๐
okay so this part is all about the URL schemes ๐ธ and how they connect to security, the version-number parameter, and what the scheme is in target attributes and responses. bestie, these rules are lowkey the backbone of the whole vibe โจ
- when a client sends a request, the
printer-uriorjob-uritarget operation attribute MUST have the same scheme as one of the values in theprinter-uri-supportedPrinter attribute. no exceptions, periodt ๐ - when the server hands back the
job-printer-uriorjob-uriJob Description attributes, it SHOULD return the same scheme ('ipp', 'https', 'http', etc.) that the client used inprinter-uriorjob-uriin the Get-Job-Attributes or Get-Jobs request. so not the scheme that was used when the job was created ๐ฆ but here's the twist: when a client asks for job attributes with Get-Job-Attributes or Get-Jobs, what the server returns depends on three things: (1) the security that was in effect when the job was created, (2) the security in the query request, and (3) the security policy in force. it's giving complicated, but it's also giving fair ๐ - it is recommended that if a server registers a non-secure ipp-URL with a directory service (see [RFC2911] "Generic Directory Schema" Appendix), it also registers an http-URL for interoperability with IPP/1.0 clients (see section 9). this one is a vibe-check for backwards compatibility ๐
- in any case, security MUST NOT be compromised when a client supplies an 'http' or other non-secure URL scheme in the target
printer-uriandjob-urioperation attributes in a request. this one is non-negotiable bestie ๐ฅ security is the main character here ๐
10. References ๐
okay here's the whole reading list, every single source ๐ง
- [dpa] ISO/IEC 10175 Document Printing Application (DPA), June 1996.
- [iana] IANA Registry of Coded Character Sets: ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets.
- [IANA-CON] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
- [ipp-iig] Hastings, Tom, et al., "Internet Printing Protocol/1.1: Implementer's Guide", Work in Progress.
- [RFC822] Crocker, D., "Standard for the Format of ARPA Internet Text Messages", STD 11, RFC 822, August 1982.
- [RFC1123] Braden, S., "Requirements for Internet Hosts - Application and Support", STD 3, RFC 1123, October, 1989.
- [RFC1179] McLaughlin, L. III, (editor), "Line Printer Daemon Protocol", RFC 1179, August 1990.
- [RFC2223] Postel, J. and J. Reynolds, "Instructions to RFC Authors", RFC 2223, October 1997.
- [RFC1738] Berners-Lee, T., Masinter, L. and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994.
- [RFC1759] Smith, R., Wright, F., Hastings, T., Zilles, S. and J. Gyllenskog, "Printer MIB", RFC 1759, March 1995.
- [RFC1766] Alvestrand, H., "Tags for the Identification of Languages", RFC 1766, March 1995.
- [RFC1808] Fielding, R., "Relative Uniform Resource Locators", RFC 1808, June 1995.
- [RFC1903] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser, "Textual Conventions for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1903, January 1996.
- [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.
- [RFC2048] Freed, N., Klensin, J. and J. Postel, "Multipurpose Internet Mail Extension (MIME) Part Four: Registration Procedures", BCP 13, RFC 2048, November 1996.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC2184] Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations", RFC 2184, August 1997.
- [RFC2234] Crocker, D. and P. Overall, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.
- [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol", RFC 2246. January 1999.
- [RFC2396] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.
- [RFC2565] Herriot, R., Butler, S., Moore, P. and R. Turner, "Internet Printing Protocol/1.0: Encoding and Transport", RFC 2565, April 1999.
- [RFC2566] deBry, R., Hastings, T., Herriot, R., Isaacson, S. and P. Powell, "Internet Printing Protocol/1.0: Model and Semantics", RFC 2566, April 1999.
- [RFC2567] Wright, D., "Design Goals for an Internet Printing Protocol", RFC2567, April 1999.
- [RFC2568] Zilles, S., "Rationale for the Structure and Model and Protocol for the Internet Printing Protocol", RFC 2568, April 1999.
- [RFC2569] Herriot, R., Hastings, T., Jacobs, N. and J. Martin, "Mapping between LPD and IPP Protocols", RFC 2569, April 1999.
- [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol - HTTP/1.1", RFC 2616, June 1999.
- [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A. and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999.
- [RFC2817] Khare, R. and S. Lawrence, "Upgrading to TLS Within HTTP/1.1", RFC 2817, May 2000.
- [RFC2910] Herriot, R., Butler, S., Moore, P., Turner, R. and J. Wenn, "Internet Printing Protocol/1.1: Encoding and Transport", RFC 2910, September 2000.
- [RFC2911] Hastings, T., Herriot, R., deBry, R., Isaacson, S. and P. Powell, "Internet Printing Protocol/1.1: Model and Semantics", RFC 2911, September 2000.
- [SSL] Netscape, The SSL Protocol, Version 3, (Text version 3.02), November 1996.
11. Authors' Addresses ๐
these are the people who made this happen, so here are their contact details, verbatim ๐ซถ
Robert Herriot, Editor
Xerox Corporation
3400 Hillview Ave., Bldg #1
Palo Alto, CA 94304
Phone: 650-813-7696
Fax: 650-813-6860
EMail: robert.herriot@pahv.xerox.com
Sylvan Butler
Hewlett-Packard
11311 Chinden Blvd.
Boise, ID 83714
Phone: 208-396-6000
Fax: 208-396-3457
EMail: sbutler@boi.hp.com
Paul Moore
Peerless Systems Networking
10900 NE 8th St #900
Bellevue, WA 98004
Phone: 425-462-5852
EMail: pmoore@peerless.com
Randy Turner
2Wire, Inc.
694 Tasman Dr.
Milpitas, CA 95035
Phone: 408-546-1273
John Wenn
Xerox Corporation
737 Hawaii St
El Segundo, CA 90245
Phone: 310-333-5764
Fax: 310-333-5514
EMail: jwenn@cp10.es.xerox.com
IPP Web Page: http://www.pwg.org/ipp/
IPP Mailing List: ipp@pwg.org
To subscribe to the ipp mailing list, send the following email:
1) send it to majordomo@pwg.org
2) leave the subject line blank
3) put the following two lines in the message body:
subscribe ipp
end
12. Other Participants: ๐
the whole squad who helped shape IPP, listed exactly as written ๐
Chuck Adams - Tektronix Shivaun Albright - HP
Stefan Andersson - Axis Jeff Barnett - IBM
Ron Bergman - Hitachi Koki Imaging Dennis Carney - IBM
Systems
Keith Carter - IBM Angelo Caruso - Xerox
Rajesh Chawla - TR Computing Nancy Chen - Okidata
Solutions
Josh Cohen - Microsoft Jeff Copeland - QMS
Andy Davidson - Tektronix Roger deBry - IBM
Maulik Desai - Auco Mabry Dozier - QMS
Lee Farrell - Canon Information Satoshi Fujitami - Ricoh
Systems
Steve Gebert - IBM Sue Gleeson - Digital
Charles Gordon - Osicom Brian Grimshaw - Apple
Jerry Hadsell - IBM Richard Hart - Digital
Tom Hastings - Xerox Henrik Holst - I-data
Stephen Holmstead Zhi-Hong Huang - Zenographics
Scott Isaacson - Novell Babek Jahromi - Microsoft
Swen Johnson - Xerox David Kellerman - Northlake
Software
Robert Kline - TrueSpectra Charles Kong - Panasonic
Carl Kugler - IBM Dave Kuntz - Hewlett-Packard
Takami Kurono - Brother Rick Landau - Digital
Scott Lawrence - Agranot Systems Greg LeClair - Epson
Dwight Lewis - Lexmark Harry Lewis - IBM
Tony Liao - Vivid Image Roy Lomicka - Digital
Pete Loya - HP Ray Lutz - Cognisys
Mike MacKay - Novell, Inc. David Manchala - Xerox
Carl-Uno Manros - Xerox Jay Martin - Underscore
Stan McConnell - Xerox Larry Masinter - Xerox
Sandra Matts - Hewlett Packard Peter Michalek - Shinesoft
Ira McDonald - High North Inc. Mike Moldovan - G3 Nova
Tetsuya Morita - Ricoh Yuichi Niwa - Ricoh
Pat Nogay - IBM Ron Norton - Printronics
Hugo Parra, Novell Bob Pentecost - Hewlett-Packard
Patrick Powell - Astart Jeff Rackowitz - Intermec
Technologies
Eric Random - Peerless Rob Rhoads - Intel
Xavier Riley - Xerox Gary Roberts - Ricoh
David Roach - Unisys Stuart Rowley - Kyocera
Yuji Sasaki - Japan Computer Richard Schneider - Epson
Industry
Kris Schoff - HP Katsuaki Sekiguchi - Canon
Information Systems
Bob Setterbo - Adobe Gail Songer - Peerless
Hideki Tanaka - Cannon Information Devon Taylor - Novell, Inc.
Systems
Mike Timperman - Lexmark Atsushi Uchino - Epson
Shigeru Ueda - Canon Bob Von Andel - Allegro Software
William Wagner - NetSilicon/DPI Jim Walker - DAZEL
Chris Wellens - Interworking Labs Trevor Wells - Hewlett Packard
Craig Whittle - Sharp Labs Rob Whittle - Novell, Inc.
Jasper Wong - Xionics Don Wright - Lexmark
Michael Wu - Heidelberg Digital Rick Yardumian - Xerox
Michael Yeung - Canon Information Lloyd Young - Lexmark
Systems
Atsushi Yuki - Kyocera Peter Zehler - Xerox
William Zhang - Canon Information Frank Zhao - Panasonic
Systems
Steve Zilles - Adobe Rob Zirnstein - Canon Information
Systems
13. Appendix A: Protocol Examples ๐ง
ok the examples are next bestie, this is where we see the protocol in action ๐ฆ
13.1 Print-Job Request ๐จ๏ธโจ
okay so this example is a Print-Job request with a job-name, copies, and sides all specified ๐ . The "ipp-attribute-fidelity" attribute is set to 'true', which means the print request is going to fail if the "copies" or "sides" attribute isn't supported, or if their values aren't supported either. no cap, that's strict but iconic ๐ฅ
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x0002 Print-Job operation-id
0x00000001 1 request-id
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
0x48 natural-language type value-tag
0x001B name-length
attributes- name
natural- attributes-natural-language
language
0x0005 value-length
en-us en-US value
0x45 uri type value-tag
0x000B name-length
printer-uri printer-uri name
0x0015 value-length
ipp://forest/ printer pinetree value
pinetree
0x42 nameWithoutLanguage type value-tag
0x0008 name-length
job-name job-name name
0x0006 value-length
foobar foobar value
0x22 boolean type value-tag
0x0016 name-length
ipp-attribute- ipp-attribute-fidelity name
fidelity
0x0001 value-length
0x01 true value
Octets Symbolic Value Protocol field
0x02 start job-attributes job-attributes-tag
0x21 integer type value-tag
0x0006 name-length
copies copies name
0x0004 value-length
0x00000014 20 value
0x44 keyword type value-tag
0x0005 name-length
sides sides name
0x0013 value-length
two-sided- two-sided-long-edge value
long-edge
0x03 end-of-attributes end-of-attributes-tag
%!PS... <PostScript> data
13.2 Print-Job Response (successful) ๐
here's a successful Print-Job response to that previous request ๐ฆ the printer was happy to support both the "copies" and "sides" attributes with the values that were sent, so the status code is 'successful-ok' ๐ธ
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x0000 successful-ok status-code
0x00000001 1 request-id
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural- name
natural-language language
0x0005 value-length
en-us en-US value
0x41 textWithoutLanguage type value-tag
0x000E name-length
status-message status-message name
0x000D value-length
Octets Symbolic Value Protocol field
successful-ok successful-ok value
0x02 start job-attributes job-attributes-tag
0x21 integer value-tag
0x0006 name-length
job-id job-id name
0x0004 value-length
147 147 value
0x45 uri type value-tag
0x0007 name-length
job-uri job-uri name
0x0019 value-length
ipp://forest/ job 123 on pinetree value
pinetree/123
0x23 enum type value-tag
0x0009 name-length
job-state job-state name
0x0004 value-length
0x0003 pending value
0x03 end-of-attributes end-of-attributes-tag
13.3 Print-Job Response (failure) ๐
now the drama ๐ญ this is an unsuccessful Print-Job response to that same request. it fails because the printer doesn't support the "sides" attribute, and because the value '20' for "copies" isn't supported either. so no job gets created, and you won't see a "job-id" or "job-uri" operation attribute come back at all ๐ the error code is 'client-error-attributes-or-values-not-supported' (0x040B). rip ๐ฅ
0x0101 1.1 version-number
0x040B client-error-attributes-or- status-code
values-not-supported
0x00000001 1 request-id
0x01 start operation-attributes operation-attributes tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
Octets Symbolic Value Protocol field
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural-language name
natural-
language
0x0005 value-length
en-us en-US value
0x41 textWithoutLanguage type value-tag
0x000E name-length
status- status-message name
message
0x002F value-length
client-error- value
attributes- values-not-supported
or-values- client-error-attributes-or-
not-supported
0x05 start unsupported-attributes unsupported-attributes tag
0x21 integer type value-tag
0x0006 name-length
copies copies name
0x0004 value-length
0x00000014 20 value
0x10 unsupported (type) value-tag
0x0005 name-length
sides sides name
0x0000 value-length
0x03 end-of-attributes end-of-attributes-tag
13.4 Print-Job Response (success with attributes ignored) ๐
plot twist ๐ง this is a successful Print-Job response to a request like the previous one, except the 'ipp-attribute-fidelity' value is false this time. the print request succeeds even though the printer supports neither the "sides" attribute nor the value '20' for "copies" ๐ซถ so a job does get created, and both a "job-id" and a "job-uri" operation attribute come back. the unsupported attributes get returned too, tucked into an Unsupported Attributes Group. the error code is 'successful-ok-ignored-or-substituted-attributes' (0x0001) โจ
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x0001 successful-ok-ignored-or- status-code
Octets Symbolic Value Protocol field
substituted-attributes
0x00000001 1 request-id
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural- name
natural-language language
0x0005 value-length
en-us en-US value
0x41 textWithoutLanguage type value-tag
0x000E name-length
status-message status-message name
0x002F value-length
successful-ok- successful-ok-ignored-or- value
ignored-or- substituted-attributes
substituted-
attributes
0x05 start unsupported- unsupported-attributes
attributes tag
0x21 integer type value-tag
0x0006 name-length
copies copies name
0x0004 value-length
0x00000014 20 value
0x10 unsupported (type) value-tag
0x0005 name-length
sides sides name
0x0000 value-length
0x02 start job-attributes job-attributes-tag
0x21 integer value-tag
0x0006 name-length
job-id job-id name
0x0004 value-length
147 147 value
0x45 uri type value-tag
0x0007 name-length
job-uri job-uri name
0x0019 value-length
ipp://forest/ job 123 on pinetree value
pinetree/123
Octets Symbolic Value Protocol field
0x23 enum type value-tag
0x0009 name-length
job-state job-state name
0x0004 value-length
0x0003 pending value
0x03 end-of-attributes end-of-attributes-tag
13.5. Print-URI Request โจ
okay so this one is a Print-URI request with copies and job-name params ๐จ๏ธ๐ the printer gets told where the document lives instead of getting the bytes sent over, and the whole thing is laid out octet by octet below ๐ฆ
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x0003 Print-URI operation-id
0x00000001 1 request-id
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural-language name
natural-
language
0x0005 value-length
en-us en-US value
0x45 uri type value-tag
0x000B name-length
printer-uri printer-uri name
0x0015 value-length
ipp://forest/ printer pinetree value
pinetree
0x45 uri type value-tag
0x000C name-length
document-uri document-uri name
0x0011 value-length
ftp://foo.com ftp://foo.com/foo value
Octets Symbolic Value Protocol field
/foo
0x42 nameWithoutLanguage type value-tag
0x0008 name-length
job-name job-name name
0x0006 value-length
foobar foobar value
0x02 start job-attributes job-attributes-tag
0x21 integer type value-tag
0x0006 name-length
copies copies name
0x0004 value-length
0x00000001 1 value
0x03 end-of-attributes end-of-attributes-tag
13.6. Create-Job Request ๐
this one is the bare-bones version: no parameters and no attributes at all, just the basics to get a job created on pinetree ๐ธ the only thing in the body is the printer-uri, then it's the end-of-attributes tag and we are DONE ๐
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x0005 Create-Job operation-id
0x00000001 1 request-id
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural-language name
natural-
language
0x0005 value-length
en-us en-US value
0x45 uri type value-tag
0x000B name-length
printer-uri printer-uri name
0x0015 value-length
ipp://forest/ printer pinetree value
pinetree
Octets Symbolic Value Protocol field
inetree
0x03 end-of-attributes end-of-attributes-tag
13.7. Get-Jobs Request ๐ฆ
this is a Get-Jobs request with parameters but no attributes ๐ซถ the printer is asked for up to 50 jobs (0x32 is 50, obvious, iykyk), and the requested-attributes list says which bits of info we want back: job-id, job-name, and document-format ๐ง
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x000A Get-Jobs operation-id
0x00000123 0x123 request-id
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x0008 value-length
us-ascii US-ASCII value
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural-language name
natural-
language
0x0005 value-length
en-us en-US value
0x45 uri type value-tag
0x000B name-length
printer-uri printer-uri name
0x0015 value-length
ipp://forest/ printer pinetree value
pinetree
0x21 integer type value-tag
0x0005 name-length
limit limit name
0x0004 value-length
0x00000032 50 value
0x44 keyword type value-tag
0x0014 name-length
requested- requested-attributes name
attributes
0x0006 value-length
Octets Symbolic Value Protocol field
job-id job-id value
0x44 keyword type value-tag
0x0000 additional value name-length
0x0008 value-length
job-name job-name value
0x44 keyword type value-tag
0x0000 additional value name-length
0x000F value-length
document-format document-format value
0x03 end-of-attributes end-of-attributes-tag
13.8. Get-Jobs Response ๐
and here's the reply to that last request! โจ the printer comes back with successful-ok and echoes the request-id, then lists 3 jobs ๐
plot twist ๐ญ the printer returns no information about the second job, and that's on purpose, for security reasons ๐ so you'll see the 2nd job-attributes group is just an empty start tag, nothing else. wild, respect ๐
Octets Symbolic Value Protocol field
0x0101 1.1 version-number
0x0000 successful-ok status-code
0x00000123 0x123 request-id (echoed
back)
0x01 start operation-attributes operation-attributes-tag
0x47 charset type value-tag
0x0012 name-length
attributes- attributes-charset name
charset
0x000A value-length
ISO-8859-1 ISO-8859-1 value
0x48 natural-language type value-tag
0x001B name-length
attributes- attributes-natural-language name
natural-
language
0x0005 value-length
en-us en-US value
0x41 textWithoutLanguage type value-tag
0x000E name-length
status-message status-message name
0x000D value-length
successful-ok successful-ok value
0x02 start job-attributes (1st job-attributes-tag
Octets Symbolic Value Protocol field
object)
0x21 integer type value-tag
0x0006 name-length
job-id job-id name
0x0004 value-length
147 147 value
0x36 nameWithLanguage value-tag
0x0008 name-length
job-name job-name name
0x000C value-length
0x0005 sub-value-length
fr-ca fr-CA value
0x0003 sub-value-length
fou fou name
0x02 start job-attributes (2nd job-attributes-tag
object)
0x02 start job-attributes (3rd job-attributes-tag
object)
0x21 integer type value-tag
0x0006 name-length
job-id job-id name
0x0004 value-length
148 149 value
0x36 nameWithLanguage value-tag
0x0008 name-length
job-name job-name name
0x0012 value-length
0x0005 sub-value-length
de-CH de-CH value
0x0009 sub-value-length
isch guet isch guet name
0x03 end-of-attributes end-of-attributes-tag
14. Appendix B: Registration of MIME Media Type Information for "application/ipp" ๐
okay bestie, this appendix is the paperwork bit ๐ it's the info IANA needs to register the application/ipp MIME type. the body is defined in Section 3 "Encoding of the Operation Layer" of this doc, so it's giving full circle energy ๐
MIME type name: application
MIME subtype name: ipp
a Content-Type of application/ipp means the body is an Internet Printing Protocol message (a request or a response) ๐จ๏ธ rn there's only one version, IPP/1.1. its syntax lives in Section 3 "Encoding of the Operation Layer" of [RFC2910], and its semantics are in [RFC2911]. iconic, honestly โจ
Required parameters: none
Optional parameters: none
Encoding considerations:
IPP/1.1 requests and responses MAY contain long lines and always contain binary data (for example, attribute value lengths). so yeah, the binary stuff is non-negotiable ๐
Security considerations:
IPP/1.1 requests and responses don't add any security risks beyond the ones already baked into the underlying transport protocols ๐ the mixed-version interworking rules in [RFC2911] and the encoding rules in [RFC2910] are both complete and unambiguous. no notes, no gaps, the security girlies are thriving ๐
Interoperability considerations:
IPP/1.1 requests (from clients) and responses (from servers) MUST comply with every conformance requirement in the normative specs [RFC2911] and [RFC2910] ๐ the encoding rules in [RFC2910] are comprehensive, so interop between conforming implementations is guaranteed. just know that support for specific optional features is not ensured ๐ and both the "charset" and "natural-language" of every IPP/1.1 attribute value that's a LOCALIZED-STRING are spelled out right inside the IPP request or response. you don't have to dig into HTTP, SMTP, or any other transport headers for that info. main character energy for self-contained messages ๐ธ
Published specifications:
[RFC2911] Hastings, T., Herriot, R., deBry, R., Isaacson, S. and P.
Powell, "Internet Printing Protocol/1.1: Model and
Semantics", RFC 2911, September 2000.
[RFC2910] Herriot, R., Butler, S., Moore, P., Turner, R. and J.
Wenn, "Internet Printing Protocol/1.1: Encoding and
Transport", RFC 2910, September 2000.
Applications which use this media type:
IPP print clients and print servers ๐จ๏ธโจ talk to each other over HTTP/1.1 (see [RFC2910]), SMTP/ESMTP, FTP, or any other transport protocol. messages of type application/ipp are self-contained and transport-independent, carrying their own "charset" and "natural-language" context for any LOCALIZED-STRING value. no outside help needed, they're independent queens ๐
Person & email address to contact for further information:
Tom Hastings
Xerox Corporation
737 Hawaii St. ESAE-231
El Segundo, CA
Phone: 310-333-6413
Fax: 310-333-5514
EMail: hastings@cp10.es.xerox.com
or
Robert Herriot
Xerox Corporation
3400 Hillview Ave., Bldg #1
Palo Alto, CA 94304
Phone: 650-813-7696
Fax: 650-813-6860
EMail: robert.herriot@pahv.xerox.com
Intended usage: COMMON
15. Appendix C: Changes from IPP/1.0 ๐ฆ
okay so IPP/1.1 is basically IPP/1.0 [RFC2565] with a glow-up. here's what changed, no cap ๐
- attribute values that identify a printer or job object now use a new
ippscheme. thehttpandhttpsschemes are only kept around for backward compatibility. see section 5 ๐ - Clients MUST support Digest Authentication, and IPP Printers SHOULD support Digest Authentication too. see Section 8.1.1 ๐
- TLS is recommended for channel security. SSL3 may also be supported for backward compatibility. see Section 8.1.2 ๐ก๏ธ
- it is recommended that IPP/1.1 objects accept any request with major version number '1'. see section 9.1 ๐ง
- IPP objects SHOULD return the URL scheme requested for "job-printer-uri" and "job-uri" Job Attributes, rather than the URL scheme used to create the job. see section 9.2 ๐ฏ
- the IANA and Internationalization sections got added ๐ the terms "private use" and "experimental" are now "vendor extension". the reserved allocations for attribute group tags, attribute syntax tags, and out-of-band attribute values were clarified, so it's clear which ones are reserved for future IETF standards track documents and which are reserved for vendor extension. both kinds of extensions use the type2 registration procedures defined in [RFC2911] ๐
- clarified that future "out-of-band" value definitions may use the value field if they need extra info ๐
Full Copyright Statement โ๏ธ
the legal bit, kept complete so nobody gets confused:
Copyright (C) The Internet Society (2000). All Rights Reserved.
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.
Acknowledgement ๐ซถ
funding for the RFC Editor function is currently provided by the Internet Society. ily Internet Society ๐
๐ฆ where this page comes from
- ietf: rfc2910 2000-09
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms