home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_i / draft-ietf-ipp-protocol-01.txt < prev    next >
Text File  |  1997-10-28  |  61KB  |  1,613 lines

  1.  
  2.  
  3.  
  4. INTERNET-DRAFT
  5.  
  6.  
  7.                                                  Robert Herriot (editor)
  8.                                                         Sun Microsystems
  9.                                                            Sylvan Butler
  10.                                                          Hewlett-Packard
  11.                                                               Paul Moore
  12.                                                               Microsoft.
  13.                                                             Randy Turner
  14.                                                               Sharp Labs
  15.                                                            July 30, 1997
  16.  
  17.          Internet Printing Protocol/1.0: Protocol Specification
  18.                      draft-ietf-ipp-protocol-01.txt
  19.  
  20. Status of this Memo
  21.  
  22. This document is an Internet-Draft.  Internet-Drafts are working
  23. documents of the Internet Engineering Task Force (IETF), its areas, and
  24. its working groups.  Note that other groups may also distribute working
  25. documents as Internet-Drafts.
  26.  
  27. Internet-Drafts are draft documents valid for a maximum of six months
  28. and may be updated, replaced, or obsoleted by other documents at any
  29. time.  It is inappropriate to use Internet-Drafts as reference material
  30. or to cite them other than as "work in progress".
  31.  
  32. To learn the current status of any Internet-Draft, please check the
  33. "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  34. Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  35. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  36. ftp.isi.edu (US West Coast).
  37.  
  38. Abstract
  39.  
  40. This document is one of a set of documents, which together describe all
  41. aspects of a new Internet Printing Protocol (IPP).  IPP is an
  42. application level protocol that can be used for distributed printing
  43. using Internet tools and technology.  The protocol is heavily influenced
  44. by the printing model introduced in the Document Printing Application
  45. (ISO/IEC 10175 DPA) standard.  Although DPA specifies both end user and
  46. administrative features, IPP version 1.0 is focused only on end user
  47. functionality.
  48.  
  49. The full set of IPP documents includes:
  50.  
  51.   Internet Printing Protocol: Requirements
  52.   Internet Printing Protocol/1.0: Model and Semantics
  53.   Internet Printing Protocol/1.0: Security
  54.   Internet Printing Protocol/1.0: Protocol Specification
  55.   Internet Printing Protocol/1.0: Directory Schema
  56.  
  57. The requirements document takes a broad look at distributed printing
  58. functionality, and it enumerates real-life scenarios that help to
  59. clarify the features that need to be included in a printing protocol for
  60. the Internet.  It identifies requirements for three types of users: end
  61. Herriot, Butler,             July 14, 1997,                    [Page 1]
  62. Moore and Turner        Expires January 30, 1998
  63.  
  64.  
  65. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  66.  
  67.  
  68. users, operators, and administrators.  The requirements document calls
  69. out a subset of end user requirements that MUST be satisfied in the
  70. first version of IPP.  Operator and administrator requirements are out
  71. of scope for v1.0. The model and semantics document describes a
  72. simplified model with abstract objects, their attributes, and their
  73. operations. The model introduces a Printer object and a Job object.  The
  74. Job object supports multiple documents per job.  The security document
  75. covers potential threats and proposed counters to those threats.  The
  76. protocol specification is formal document which incorporates the ideas
  77. in all the other documents into a concrete mapping using clearly defined
  78. data representations and transport protocol mappings that real
  79. implementers can use to develop interoperable client and server side
  80. components. Finally, the directory schema document shows a generic
  81. schema for directory service entries that represent instances of IPP
  82. Printers.
  83.  
  84. This document is the ''Internet Printing Protocol/1.0: Protocol
  85. Specification'' document.
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123. Herriot, Butler,             July 30, 1997,                    [Page 2]
  124. Moore and Turner        Expires January 30, 1998
  125.  
  126.  
  127. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  128.  
  129.  
  130.                            Table of Contents
  131.  
  132. 1. Introduction........................................................4
  133. 2. Conformance Terminology.............................................4
  134. 3. Encoding of  the Operation Layer....................................4
  135.    3.1 Picture of the Encoding.........................................5
  136.    3.2 Syntax of Encoding..............................................7
  137.    3.3 Version.........................................................8
  138.    3.4 Mapping of Operations...........................................8
  139.    3.5 Mapping of Status-code..........................................8
  140.    3.6 Tags............................................................9
  141.       3.6.1 Delimiter Tags.............................................9
  142.       3.6.2 Value Tags................................................10
  143.    3.7 Name-Lengths...................................................11
  144.    3.8 Mapping of Parameter Names.....................................11
  145.    3.9 Value Lengths..................................................13
  146.    3.10 Mapping of Attribute and Parameter Values.....................13
  147.    3.11 Data..........................................................14
  148. 4. Encoding of Transport Layer........................................14
  149.    4.1 General Headers................................................15
  150.    4.2 Request  Headers...............................................16
  151.    4.3 Response Headers...............................................17
  152.    4.4 Entity  Headers................................................17
  153. 5. Security Considerations............................................18
  154. 6. References.........................................................19
  155. 7. Author's Address...................................................20
  156. 8. Other Participants:................................................20
  157. 9. Appendix A: Protocol Examples......................................21
  158.    9.1 Print-Job Request..............................................21
  159.    9.2 Print-Job Response (successful)................................21
  160.    9.3 Print-Job Response (failure)...................................22
  161.    9.4 Print-URI Request..............................................23
  162.    9.5 Create-Job Request.............................................23
  163.    9.6 Get-Jobs Request...............................................23
  164.    9.7 Get-Jobs Response..............................................24
  165. 10. Appendix B: Mapping of Each Operation in the Encoding.............25
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185. Herriot, Butler,             July 30, 1997,                    [Page 3]
  186. Moore and Turner        Expires January 30, 1998
  187.  
  188.  
  189. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  190.  
  191.  
  192.  
  193. 1. Introduction
  194.  
  195. This document contains the rules for encoding IPP operations and
  196. describes two layers: the transport layer and the operation layer.
  197.  
  198. The transport layer consists of an  HTTP/1.1 request or response. RFC
  199. 2068 [27] describes HTTP/1.1. This document specifies the HTTP headers
  200. that an IPP implementation supports.
  201.  
  202. The operation layer consists of  a message body in an HTTP request or
  203. response.  The document "Internet Printing Protocol/1.0: Model and
  204. Semantics" [21] defines the semantics of such a message body and the
  205. supported values. This document specifies the encoding of an IPP
  206. operation. The aforementioned document [21] is henceforth referred to as
  207. the "IPP model document"
  208.  
  209.  
  210. 2. Conformance Terminology
  211.  
  212. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  213. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and  "OPTIONAL" in this
  214. document are to be interpreted as described in RFC 2119 [25].
  215.  
  216.  
  217. 3. Encoding of  the Operation Layer
  218.  
  219. The operation layer SHALL contain a single operation request or
  220. operation response.
  221.  
  222. The encoding consists of octet as the most primitive type. There are
  223. several types built from octets, but two important  types are integers
  224. and characters, on which most  other data types are built. Every
  225. character in this encoding SHALL be a member of the UCS-2 coded
  226. character set and SHALL be encoded using UTF-8 which uses 1 to 3 octets
  227. per character. Every integer in this encoding SHALL be encoded as a
  228. signed integer using two's-complement binary encoding with big-endian
  229. format (also known as "network order" and "most significant byte
  230. first"). The number of octets for an integer SHALL be 1, 2 or 4,
  231. depending on usage in the protocol. Such one-octet integers, henceforth
  232. called SIGNED-BYTE, are used for the version and tag fields. Such two-
  233. byte integers, henceforth called SIGNED-SHORT are used for the
  234. operation, status-code and length fields. Four byte integers, henceforth
  235. called SIGNED-INTEGER, are used for values fields.
  236.  
  237. The following two sections present the operation layer in two ways
  238.  
  239.   .  informally through pictures and description
  240.   .  formally through Augmented Backus-Naur Form (ABNF), as specified by
  241.      draft-ietf-drums-abnf-02.txt [29]
  242.  
  243.  
  244.  
  245.  
  246.  
  247. Herriot, Butler,             July 30, 1997,                    [Page 4]
  248. Moore and Turner        Expires January 30, 1998
  249.  
  250.  
  251. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  252.  
  253.  
  254. 3.1 Picture of the Encoding
  255.  
  256. The encoding for an operation request or response consists of:
  257.  
  258.   -----------------------------------------------
  259.   |                    version                  |   2 bytes  - required
  260.   -----------------------------------------------
  261.   |operation (request) or status-code (response)|   2 bytes  - required
  262.   -----------------------------------------------------------
  263.   |                 parameter-tag               |   1 byte  |
  264.   -----------------------------------------------           |- optional
  265.   |               parameter-sequence            |   m bytes |
  266.   -----------------------------------------------------------
  267.   |                 attribute-tag               |   1 byte  |
  268.   -----------------------------------------------           |-0 or more
  269.   |               attribute-sequence            |   n bytes |
  270.   -----------------------------------------------------------
  271.   |                  data-tag                   |   1 byte   - required
  272.   -----------------------------------------------
  273.   |                     data                    |   q bytes  - optional
  274.   -----------------------------------------------
  275.  
  276. The parameter-tag and parameter-sequence may be omitted if the operation
  277. has no parameters. The attribute-tag and attribute-sequence may be
  278. omitted if the operation has no attributes or it may be replicated for
  279. an operation that contains attributes for multiple objects. The data is
  280. omitted from some operations, but the data-tag is present even when the
  281. data is omitted. Note, the parameter-tag, attribute-tag and data-tag are
  282. called `delimiter-tags'.
  283.  
  284. A parameter-sequence consists of  a sequence of zero or more compound-
  285. parameters.
  286.  
  287.   -----------------------------------------------
  288.   |               compound-parameter            |   r bytes - 0 or more
  289.   -----------------------------------------------
  290.  
  291. An attributes-sequence consists of zero or more compound-attributes.
  292.  
  293.   -----------------------------------------------
  294.   |              compound-attribute             |   s bytes - 0 or more
  295.   -----------------------------------------------
  296.  
  297. A compound-parameter consists of a parameter with a single value
  298. optionally followed by zero or more additional values. A compound-
  299. attribute consists an attribute with a single value followed by zero or
  300. more additional values.
  301.  
  302. Each parameter or attribute consists of:
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309. Herriot, Butler,             July 30, 1997,                    [Page 5]
  310. Moore and Turner        Expires January 30, 1998
  311.  
  312.  
  313. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  314.  
  315.  
  316.   -----------------------------------------------
  317.   |                   value-tag                 |   1 byte
  318.   -----------------------------------------------
  319.   |               name-length  (value is u)     |   2 bytes
  320.   -----------------------------------------------
  321.   |                     name                    |   u bytes
  322.   -----------------------------------------------
  323.   |              value-length  (value is v)     |   2 bytes
  324.   -----------------------------------------------
  325.   |                     value                   |   v bytes
  326.   -----------------------------------------------
  327.  
  328. An additional value consists of:
  329.  
  330.   -----------------------------------------------------------
  331.   |                   value-tag                 |   1 byte  |
  332.   -----------------------------------------------           |
  333.   |            name-length  (value is 0x0000)   |   2 bytes |
  334.   -----------------------------------------------           |-0 or more
  335.   |              value-length (value is w)      |   2 bytes |
  336.   -----------------------------------------------           |
  337.   |                     value                   |   w bytes |
  338.   -----------------------------------------------------------
  339.  
  340. Note: an additional value is like a parameter or attribute whose name-
  341. length is 0.
  342.  
  343. From the standpoint of a parsing loop, the encoding consists of:
  344.  
  345.   -----------------------------------------------
  346.   |                    version                  |   2 bytes  - required
  347.   -----------------------------------------------
  348.   |operation (request) or status-code (response)|   2 bytes  - required
  349.   -----------------------------------------------------------
  350.   |        tag (delimiter-tag or value-tag)     |   1 byte  |
  351.   -----------------------------------------------           |-0 or more
  352.   |      empty or rest of parameter/attribute   |   x bytes |
  353.   -----------------------------------------------------------
  354.   |                   data-tag                  |   2 bytes  - required
  355.   -----------------------------------------------
  356.   |                     data                    |   y bytes  - optional
  357.   -----------------------------------------------
  358.  
  359.  
  360. The value of the tag determines whether the bytes following the tag are:
  361.  
  362.   .  parameters
  363.   .  attributes
  364.   .  data
  365.   .  the remainder of a single parameter or attribute where the tag
  366.      specifies the type of the value.
  367.  
  368.  
  369.  
  370.  
  371. Herriot, Butler,             July 30, 1997,                    [Page 6]
  372. Moore and Turner        Expires January 30, 1998
  373.  
  374.  
  375. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  376.  
  377.  
  378. 3.2 Syntax of Encoding
  379.  
  380. The syntax below is ABNF except `strings of literals' SHALL be case
  381. sensitive. For example `a' means lower case  `a' and not upper case `A'.
  382. In addition, SIGNED-BYTE and SIGNED-SHORT fields are represented as `%x'
  383. values which show their range of values.
  384.  
  385.   ipp-message = ipp-request / ipp-response
  386.   ipp-request = version operation
  387.             [parameter-tag parameter-sequence ]
  388.            *(attribute-tag  attribute-sequence) data-tag data
  389.   ipp-response = version status-code
  390.             [parameter-tag parameter-sequence ]
  391.            *(attribute-tag attribute-sequence)  data-tag  data
  392.  
  393.   version = major-version minor-version
  394.   major-version = SIGNED-BYTE  ; initially %d1
  395.   minor-version = SIGNED-BYTE  ; initially %d0
  396.  
  397.   operation = SIGNED-SHORT    ; mapping from model defined below
  398.   status-code = SIGNED-SHORT  ; mapping from model defined below
  399.  
  400.   parameter-sequence = *compound-parameter
  401.   attribute-sequence = *compound-attribute
  402.   compound-parameter = parameter *additional-values
  403.   compound-attribute = attribute *additional-values
  404.  
  405.   parameter = value-tag name-length name value-length value
  406.   attribute = value-tag name-length name value-length value
  407.   additional-values = value-tag zero-name-length value-length value
  408.  
  409.   name-length = SIGNED-SHORT    ; number of octets of `name'
  410.   name = LALPHA *( LALPHA / DIGIT / "-" / "_" / "." )
  411.   value-length = SIGNED-SHORT  ; number of octets of `value'
  412.   value = OCTET-STRING
  413.  
  414.   data = OCTET-STRING
  415.  
  416.   zero-name-length = %x00.00  ; name-length of 0
  417.   parameter-tag =  %x01           ; tag of 1
  418.   attribute-tag     =  %x02        ; tag of 2
  419.   data-tag = %x03                  ; tag of 3
  420.   value-tag = %x10-FF
  421.  
  422.   SIGNED-BYTE = BYTE
  423.   SIGNED-SHORT = 2BYTE
  424.   DIGIT = %x30-39    ;  "0" to "9"
  425.   LALPHA = %x61-7A   ;  "a" to "z"
  426.   BYTE = %x00-FF
  427.   OCTET-STRING = *BYTE
  428.  
  429. The syntax allows a parameter-tag to be present when the parameter-
  430. sequence that follows is empty. The same is true for the attribute-tag
  431. and the attribute-sequence that follows. The syntax is defined this way
  432.  
  433. Herriot, Butler,             July 30, 1997,                    [Page 7]
  434. Moore and Turner        Expires January 30, 1998
  435.  
  436.  
  437. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  438.  
  439.  
  440. to allow for the response of Get-Jobs where no attributes are returned
  441. for some job-objects.  Although it is RECOMMENDED that the sender not
  442. send a parameter-tag if there are no parameters and not send an
  443. attribute-tag if there are no attributes (except in the Get-Jobs
  444. response just mentioned), the receiver MUST be able to decode such
  445. syntax.
  446.  
  447.  
  448. 3.3 Version
  449.  
  450. The version SHALL consist of a major and minor version, each of which
  451. SHALL be represented by a SIGNED-BYTE. The protocol described in this
  452. document SHALL have a major version of 1 (0x01) and a minor version of
  453. 0 (0x00).  The ABNF for these two bytes SHALL be %x01.00.
  454.  
  455.  
  456. 3.4 Mapping of Operations
  457.  
  458. The following SHALL be the mapping of operations names to integer values
  459. which are encoded as a SIGNED-SHORT. The operations are defined in the
  460. IPP model document  The table below includes a range of values for
  461. future extensions to the protocol and a separate range for private
  462. extensions.  It is RECOMMENDED that the private extension values be used
  463. for temporary experimental implementations and not for deployed
  464. products.
  465.  
  466.  
  467.    Encoding (hex) Operation
  468.  
  469.    0x0            reserved (not used)
  470.    0x1            Get-Operations
  471.    0x2            Print-Job
  472.    0x3            Print-URI
  473.    0x4            Validate-Job
  474.    0x5            Create-Job
  475.    0x6            Send-Document
  476.    0x7            Send-URI
  477.    0x8            Cancel-Job
  478.    0x9            Get-Attributes
  479.    0xA            Get-Jobs
  480.    0xB-0x3FFF     reserved for future operations
  481.    0x4000-0xFFFF  reserved for private extensions
  482.  
  483. 3.5 Mapping of Status-code
  484.  
  485. The following SHALL be the mapping of status-code names to integer
  486. values which are encoded as a SIGNED-SHORT. The status-code names are
  487. defined in the IPP model document.
  488.  
  489. If an IPP status-code is returned, then the HTTP Status-Code MUST be 200
  490. (OK). With any other HTTP Status-Code value, the HTTP response SHALL NOT
  491. contain an IPP message-body, and thus no IPP status-code is returned.
  492.  
  493.  
  494.  
  495. Herriot, Butler,             July 30, 1997,                    [Page 8]
  496. Moore and Turner        Expires January 30, 1998
  497.  
  498.  
  499. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  500.  
  501.  
  502. Note: the integer encodings below were chosen to be similar to
  503. corresponding Status-Code values in HTTP. The IPP client and server
  504. errors have the same relative offset to their base as corresponding HTTP
  505. errors, but the IPP base is a multiple of 0x100 whereas the HTTP base is
  506. a multiple of 100. Despite this similarity,  the Status-Code returned at
  507. the HTTP level will always be different except in the case where `OK' is
  508. returned at both levels, 200 (OK) in HTTP and 0 (successful-OK) in IPP.
  509.  
  510. Note: some status-code values, such as client-error-unauthorized, may
  511. be returned at the transport (HTTP) level rather than the operation
  512. level.
  513.  
  514. ISSUE: as implementations proceed, we will learn what error code need to
  515. be supported at the IPP level.
  516.  
  517.  
  518.    Encoding (hex)  Status-Code Name
  519.  
  520.    0               successful-OK
  521.    0x400           client-error-bad-request
  522.    0x401           client-error-unauthorized
  523.    0x403           client-error-forbidden
  524.    0x404           client-error-not-found
  525.    0x405           client-error-method-not-allowed
  526.    0x408           client-error-timeout
  527.    0x40A           client-error-gone
  528.    0x40D           client-error-request-entity-too-large
  529.    0x40E           client-error-request-URI-too-long
  530.    0x40F           client-error-unsupported-document-format
  531.    0x410           client-error-attribute-not-supported
  532.    0x500           server-error-internal-server-error
  533.    0x501           server-error-operation-not-implemented
  534.    0x503           server-error-service-unavailable
  535.    0x504           server-error-timeout
  536.    0x505           server-error-version-not-supported
  537.    0x506           server-error-printer-error
  538.    0x507           server-error-temporary-error
  539.  
  540. 3.6 Tags
  541.  
  542. There are two kinds of tags:
  543.  
  544.   .  delimiter tags: delimit major sections of the protocol, namely
  545.      parameters, attributes and data
  546.   .  value tags: specify the type of each parameter or attribute value
  547.  
  548. 3.6.1 Delimiter Tags
  549.  
  550.  
  551. The following table specifies the values for the delimiter tags:
  552.  
  553.  
  554.    Tag Value (Hex)    Delimiter
  555.  
  556.  
  557. Herriot, Butler,             July 30, 1997,                    [Page 9]
  558. Moore and Turner        Expires January 30, 1998
  559.  
  560.  
  561. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  562.  
  563.  
  564.  
  565.    Tag Value (Hex)    Delimiter
  566.  
  567.    0x00               reserved
  568.    0x01               parameter-tag
  569.    0x02               attribute-tag
  570.    0x03               data-tag
  571.    0x04-0x0F          reserved for future delimiters
  572.  
  573. 3.6.2 Value Tags
  574.  
  575.  
  576. The remaining tables show values for the value-tag, which is the first
  577. octet of  a parameter or attribute. The value-tag specifies the type of
  578. the value of the parameter or attribute. The value of the value-tag of a
  579. parameter or attribute SHALL either be a type value specified in the
  580. model document or an "out-of-band" value, such as "unsupported" or
  581. "default". If  the value of value-tag for a attribute or parameter is
  582. not "out-of-band" and differs from the value type specified by the model
  583. document, then a server receiving such a request MAY reject it, and  a
  584. client receiving such a response MAY ignore the attribute or parameter.
  585.  
  586. The following table specifies the "out-of-band" values for the value-
  587. tag.
  588.  
  589.  
  590.    Tag Value (Hex)  Meaning
  591.  
  592.    0x10             unsupported
  593.    0x11             default
  594.    0x12             no-value
  595.    0x13-0x1F        reserved for future "out-of-band" values.
  596.  
  597. The "unsupported" value SHALL be used in the attribute-sequence of an
  598. error response for those attributes which the server does not support.
  599. The "default" value is reserved for future use of setting value back to
  600. their default value. The "no-value" value is used for the "no-value"
  601. value in model, e.g. when a document-attribute is returned as a set of
  602. values and an attribute has no specified value for one or more of the
  603. documents.
  604.  
  605. The following table specifies the integer values for the value-tag
  606.  
  607.  
  608.    Tag Value (Hex)   Meaning
  609.  
  610.    0x20              reserved
  611.    0x21              integer
  612.    0x22              boolean
  613.    0x23              enum
  614.    0x24-0x2F         reserved for future integer types
  615.  
  616. NOTE: 0x20 is reserved for "generic integer" if should ever be needed.
  617.  
  618.  
  619. Herriot, Butler,             July 30, 1997,                   [Page 10]
  620. Moore and Turner        Expires January 30, 1998
  621.  
  622.  
  623. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  624.  
  625.  
  626. The following table specifies the octet-string values for the value-tag
  627.  
  628.  
  629.    Tag Value (Hex)   Meaning
  630.  
  631.    0x30              reserved
  632.    0x31              dateTime
  633.    0x32              resolution
  634.    0x33-0x3F         reserved for future octet-string types
  635.  
  636. The following table specifies the character-string values for the value-
  637. tag
  638.  
  639.  
  640.    Tag Value (Hex)   Meaning
  641.  
  642.    0x40              reserved
  643.    0x41              text
  644.    0x42              name
  645.    0x43              language
  646.    0x44              keyword
  647.    0x45              uri
  648.    0x46              uriScheme
  649.    0x47-0x5F         reserved for future character string types
  650.  
  651. NOTE: 0x40 is reserved for "generic character-string" if should ever be
  652. needed.
  653.  
  654. The values 0x60-0xFF are reserved for future types. There are no values
  655. allocated for private extensions. A new type must be registered via the
  656. type 2 process.
  657.  
  658. Issue: should this be a type 1 process.
  659.  
  660.  
  661. 3.7 Name-Lengths
  662.  
  663. The name-length field SHALL consist of a SIGNED-SHORT. This field SHALL
  664. specify the number of octets in the name field which follows the name-
  665. length field, excluding the two bytes of the name-length field.
  666.  
  667. If a name-length field has a value of zero, the following name field
  668. SHALL be empty, and the following value SHALL be treated as an
  669. additional value for the preceding parameter. Within a parameter-
  670. sequence, if two parameters have the same name, the first occurrence
  671. SHALL be ignored. Within an attribute-sequence, if two attributes have
  672. the same name, the first occurrence SHALL be ignored. The zero-length
  673. name is the only mechanism for multi-valued parameters and attributes.
  674.  
  675.  
  676. 3.8 Mapping of Parameter Names
  677.  
  678. Some parameters are encoded in a special position.  These parameters
  679. are:
  680.  
  681. Herriot, Butler,             July 30, 1997,                   [Page 11]
  682. Moore and Turner        Expires January 30, 1998
  683.  
  684.  
  685. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  686.  
  687.  
  688.   .  "printer-uri": The printer-uri of each printer object operation in
  689.      the IPP model document SHALL be specified both as a parameter named
  690.      "printer-uri" in the operation layer ,and outside of  the operation
  691.      layer as the request-URI on the Request-Line at the HTTP level,.
  692.   .  "job-uri": The job -uri of each job object operation in the IPP
  693.      model document SHALL be specified both as a parameter named "job -
  694.      uri" in the operation layer ,and outside of  the operation layer as
  695.      the request-URI on the Request-Line at the HTTP level,.
  696.   .  
  697.   .  "document-content": The parameter named "document-content" in the
  698.      IPP model document SHALL become the "data" in the operation layer.
  699.   .  "status-code": The parameter named "status-code" in the IPP model
  700.      document SHALL become the "status-code" field in the operation
  701.      layer response.
  702.  
  703. The remaining parameters are encoded in the parameter-sequence or the
  704. attribute-sequence.  The parameter-sequence is for actual operation
  705. parameters and the attribute-sequence is for object attributes. Of the
  706. parameters defined in the IPP model document, some represent an actual
  707. operation parameters and others represent a collection of object
  708. attributes.
  709.  
  710. A parameter in the IPP model document SHALL represent a collection of
  711. object attributes if its name contains the word "attributes"
  712. immediately preceded by a space; otherwise it SHALL represent an actual
  713. operation parameter. Note, some actual operation parameters contain the
  714. word "attributes" preceded by a hyphen ("-").  They are not a collection
  715. of attributes.
  716.  
  717. If a parameter in IPP model document represents an actual operation
  718. parameter and is not in a special position, it SHALL be encoded in the
  719. parameter-sequence using the text name of the parameter specified in the
  720. IPP model document.
  721.  
  722. If a parameter in IPP model document represents a collection of object
  723. attributes, the attributes SHALL be encoded in the attribute-sequence
  724. using the text names of the attributes specified in the IPP model
  725. document. The IPP model document specifies the members of such attribute
  726. collections, but  does not require that all members of a collection be
  727. present in an operation.
  728.  
  729. If an operation contain attributes from exactly one object, there SHALL
  730. be exactly one attribute-sequence. If an operation contains attributes
  731. from more than one object (e.g. Get-Jobs response), the attributes from
  732. each object SHALL be in a separate attribute-sequence, such that the
  733. attributes from the ith object are in the ith attribute-sequence.
  734.  
  735. See  Section 10 "Appendix B: Mapping of Each Operation in the Encoding"
  736. for table showing the application of the rules above.
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743. Herriot, Butler,             July 30, 1997,                   [Page 12]
  744. Moore and Turner        Expires January 30, 1998
  745.  
  746.  
  747. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  748.  
  749.  
  750. 3.9 Value Lengths
  751.  
  752. Each parameter value SHALL be preceded by a SIGNED-SHORT which SHALL
  753. specify the number of octets in the value which follows this length,
  754. exclusive of the two bytes specifying the length.
  755.  
  756. For any of the types represented by binary signed integers, the sender
  757. MUST encode the value in exactly four octets..
  758.  
  759. For any of the types represented by character-strings, the sender MUST
  760. encode the value with all the characters of the string and without any
  761. padding characters.
  762.  
  763. If a value-tag contains an "out-of-band" value, such as "unsupported",
  764. the value-length SHALL be 0 and the value empty " the value has no
  765. meaning when the value-tag has an "out-of-band" value. If a server or
  766. client receives an operation with a nonzero value-length in this case,
  767. it SHALL ignore the value field.
  768.  
  769.  
  770. 3.10 Mapping of Attribute and Parameter Values
  771.  
  772. The following SHALL be the mapping of attribute and parameter values to
  773. their IPP encoding in the value field. The syntax types are defined in
  774. the IPP model document.
  775.  
  776.  
  777.    Syntax of        Encoding
  778.    Attribute Value
  779.  
  780.    text             an octet string where each character is a member
  781.                     of the UCS-2 coded character set and is encoded
  782.                     using UTF-8. The text is encoded in "network byte
  783.                     order" with the first character in the text
  784.                     (according to reading order) being the first
  785.                     character in the encoding.
  786.    name             same as text
  787.    language         same as text but with a syntax specified by RFC
  788.                     1766
  789.    keyword          same as text. Allowed text values are defined in
  790.                     the IPP model document
  791.    uri              same as text
  792.    uriScheme        same as text
  793.    boolean          one binary octet where 0x00 is `false' and 0x01
  794.                     is `true'
  795.    integer          a SIGNED-INTEGER, defined previously as a signed
  796.                     integer using two's-complement binary encoding in
  797.                     four octets with big-endian format (also known as
  798.                     "network order" and "most significant byte
  799.                     first").
  800.    enum             same as integer. Allowed integer values are
  801.                     defined in the IPP model document
  802.    dateTime         eleven octets whose contents are defined by
  803.                     "DateAndTime" in RFC 1903. Although RFC 1903 also
  804.  
  805. Herriot, Butler,             July 30, 1997,                   [Page 13]
  806. Moore and Turner        Expires January 30, 1998
  807.  
  808.  
  809. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  810.  
  811.  
  812.  
  813.    Syntax of        Encoding
  814.    Attribute Value
  815.  
  816.                     defines an eight octet format which omits the
  817.                     time zone, a value of this type in the IPP
  818.                     protocol MUST use the eleven octet format.
  819.    resolution       nine octets consisting of  2 SIGNED-INTEGERs
  820.                     followed by a SIGNED-BYTE. The values are the
  821.                     same as those specified in draft-ietf-printmib-
  822.                     mib-info-02.txt [30]. The first SIGNED-INTEGER
  823.                     contains the value of
  824.                     prtMarkerAddressabilityXFeedDir. The second
  825.                     SIGNED-INTEGER contains the value of
  826.                     prtMarkerAddressabilityFeedDir. The SIGNED-BYTE
  827.                     contains the value of
  828.                     prtMarkerAddressabilityUnit.  Note: the latter
  829.                     value is either 3 (tenThousandsOfInches) or 4
  830.                     (micrometers) and the addressability is in 10,000
  831.                     units of measure. Thus the SIGNED-INTEGERS
  832.                     represent integral values in either dots-per-inch
  833.                     or dots-per-centimeter.
  834.    1setOf  X        encoding according to the rules for a parameter
  835.                     with more than more value.  Each value X is
  836.                     encoded according to the rules for encoding its
  837.                     type.
  838.    rangeOf  X       same 1setOf  X where the number of values is 2.
  839.  
  840. The type of the value in the model document determines the encoding in
  841. the value and the value of the value-tag.
  842.  
  843.  
  844. 3.11 Data
  845.  
  846. The data part SHALL include any data required by the operation
  847.  
  848.  
  849. 4. Encoding of Transport Layer
  850.  
  851. HTTP/1.1 shall be the transport layer for this protocol.
  852.  
  853. The operation layer has been designed with the assumption that the
  854. transport layer contains the following information:
  855.  
  856.   .  the URI of the target job or printer operation
  857.   .  the total length of the data in the operation layer, either as a
  858.      single length or as a sequence of chunks each with a length.
  859.   .  the client's language, the character-set and the transport
  860.      encoding.
  861.  
  862. Each HTTP operation shall use the POST method where the request-URI is
  863. the object target of the operation, and where the "Content-Type" of the
  864. message-body in each request and response shall be "application/ipp".
  865. The message-body shall contain the operation layer and shall have the
  866.  
  867. Herriot, Butler,             July 30, 1997,                   [Page 14]
  868. Moore and Turner        Expires January 30, 1998
  869.  
  870.  
  871. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  872.  
  873.  
  874. syntax described in section 3.2 "Syntax of Encoding". A client
  875. implementation SHALL adhere to the rules for a client described in RFC
  876. 2068. A server implementation SHALL adhere the rules for an origin
  877. server described in RFC 2068.In the following sections, there are a
  878. tables of all HTTP headers which describe their use in an IPP client or
  879. server.  The following is an explanation of each column in these tables.
  880.  
  881.   .  the "header" column contains the name of a header
  882.   .  the "request/client" column indicates whether a client sends the
  883.      header.
  884.   .  the "request/server" column indicates whether a server supports the
  885.      header when received.
  886.   .  the "response/server" column indicates whether a server sends the
  887.      header.
  888.   .  the "response /client" column indicates whether a client supports
  889.      the header when received.
  890.   .  the "values and conditions" column specifies the allowed header
  891.      values and the conditions for the header to be present in a
  892.      request/response.
  893.  
  894. The table for "request headers" does not have columns for responses, and
  895. the table for "response headers" does not have columns for requests.
  896.  
  897. The following is an explanation of the values in the "request/client"
  898. and "response/server" columns.
  899.  
  900.   .  must: the client or server MUST send the header,
  901.   .  must-if: the client or server MUST send the header when the
  902.      condition described in the "values and conditions" column is met,
  903.   .  may: the client or server MAY send the header
  904.   .  not: the client or server SHOULD NOT send the header. It is not
  905.      relevant to an IPP implementation.
  906.  
  907. The following is an explanation of the values in the "response/client"
  908. and "request/server" columns.
  909.  
  910.   .  must: the client or server MUST support the header,
  911.   .  may: the client or server MAY support the header
  912.   .  not: the client or server SHOULD NOT support the header. It is not
  913.      relevant to an IPP implementation.
  914.  
  915. 4.1 General Headers
  916.  
  917. The following is a table for the general headers.
  918.  
  919. ISSUE: an HTTP expert should review these tables for accuracy.
  920.  
  921.  
  922. General-     Request         Response        Values and Conditions
  923. Header
  924.  
  925.  
  926.              Client   Server Server  Client
  927.  
  928.  
  929. Herriot, Butler,             July 30, 1997,                   [Page 15]
  930. Moore and Turner        Expires January 30, 1998
  931.  
  932.  
  933. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  934.  
  935.  
  936.  
  937. General-     Request         Response        Values and Conditions
  938. Header
  939.  
  940.  
  941.              Client   Server Server  Client
  942.  
  943. Cache-       must     not    must    not     "no-cache" only
  944. Control
  945. Connection   must-if  must   must-   must    "close" only. Both
  946.                              if              client and server
  947.                                              SHOULD keep a
  948.                                              connection for the
  949.                                              duration of a sequence
  950.                                              of operations. The
  951.                                              client and server MUST
  952.                                              include this header
  953.                                              for the last operation
  954.                                              in such a sequence.
  955. Date         may      may    must    may     per RFC 1123 [9]
  956. Pragma`      must     not    must    not     "no-cache" only
  957. Transfer-    must-if  must   must-   must    "chunked" only .
  958. Encoding                     if              Header MUST be present
  959.                                              if Content-Length is
  960.                                              absent.
  961. Upgrade      not      not    not     not
  962. Via          not      not    not     not
  963.  
  964.  
  965. 4.2 Request  Headers
  966.  
  967. The following is a table for the request headers.
  968.  
  969.  
  970. Request-Header   Client    Server  Request Values and Conditions
  971.  
  972. Accept           may       must    "application/ipp" only.  This
  973.                                    value is the default if the
  974.                                    client omits it
  975. Accept-Charset   may       must    per IANA Character Set registry.
  976.                                    ISSUE: is this useful for IPP?
  977. Accept-Encoding  may       must    empty and per RFC 2068 [27] and
  978.                                    IANA registry for content-codings
  979. Accept-Language  may       must    see RFC 1766 [26]. A server
  980.                                    SHOULD honor language requested
  981.                                    by returning the values status-
  982.                                    message, job-state-message and
  983.                                    printer-state-reason in one of
  984.                                    requested languages.
  985. Authorization    must-if   must    per RFC 2068. A client MUST send
  986.                                    this header when it receives a
  987.                                    401 "Unauthorized" response and
  988.                                    does not receive a  "Proxy-
  989.                                    Authenticate" header.
  990.  
  991. Herriot, Butler,             July 30, 1997,                   [Page 16]
  992. Moore and Turner        Expires January 30, 1998
  993.  
  994.  
  995. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  996.  
  997.  
  998.  
  999. Request-Header   Client    Server  Request Values and Conditions
  1000.  
  1001. From             not       not     per RFC 2068. Because RFC
  1002.                                    recommends sending this header
  1003.                                    only with the user's approval, it
  1004.                                    is not very useful
  1005. Host             must      must    per RFC 2068
  1006. If-Match         not       not
  1007. If-Modified-     not       not
  1008. Since
  1009. If-None-Match    not       not
  1010. If-Range         not       not
  1011. If-Unmodified-   not       not
  1012. Since
  1013. Max-Forwards     not       not
  1014. Proxy-           must-if   not     per RFC 2068. A client MUST send
  1015. Authorization                      this header when it receives a
  1016.                                    401 "Unauthorized" response and a
  1017.                                    "Proxy-Authenticate" header.
  1018. Range            not       not
  1019. Referer          not       not
  1020. User-Agent       not       not
  1021.  
  1022. 4.3 Response Headers
  1023.  
  1024. The following is a table for the request headers.
  1025.  
  1026.  
  1027. Response-      Server  Client   Response Values and Conditions
  1028. Header
  1029.  
  1030. Accept-Ranges  not     not
  1031. Age            not     not
  1032. Location       must-if may      per RFC 2068. When URI needs
  1033.                                 redirection.
  1034. Proxy-         not     must     per RFC 2068
  1035. Authenticate
  1036. Public         may     may      per RFC 2068
  1037. Retry-After    may     may      per RFC 2068
  1038. Server         not     not
  1039. Vary           not     not
  1040. Warning        may     may      per RFC 2068
  1041. WWW-           must-if must     per RFC 2068. When a server needs to
  1042. Authenticate                    authenticate a client.
  1043.  
  1044. 4.4 Entity  Headers
  1045.  
  1046. The following is a table for the entity headers.
  1047.  
  1048.  
  1049. Entity-Header  Request         Response        Values and Conditions
  1050.  
  1051.  
  1052.  
  1053. Herriot, Butler,             July 30, 1997,                   [Page 17]
  1054. Moore and Turner        Expires January 30, 1998
  1055.  
  1056.  
  1057. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1058.  
  1059.  
  1060.  
  1061.                Client  Server  Server   Client
  1062.  
  1063. Allow          not     not     not      not
  1064. Content-Base   not     not     not      not
  1065. Content-       may     must    must     must   per RFC 2068 and IANA
  1066. Encoding                                       registry for content
  1067.                                                codings.
  1068. Content-       may     must    must     must   see RFC 1766 [26].
  1069. Language
  1070. Content-       must-if must    must-if  must   the length of the
  1071. Length                                         message-body per RFC
  1072.                                                2068. Header MUST be
  1073.                                                present if Transfer-
  1074.                                                Encoding is absent..
  1075. Content-       not     not     not      not
  1076. Location
  1077. Content-MD5    may     may     may      may    per RFC 2068
  1078. Content-Range  not     not     not      not
  1079. Content-Type   must    must    must     must   "application/ipp"
  1080.                                                only
  1081. ETag           not     not     not      not
  1082. Expires        not     not     not      not
  1083. Last-Modified  not     not     not      not
  1084.  
  1085. 5. Security Considerations
  1086.  
  1087. When utilizing HTTP 1.1 as a transport of IPP, the security
  1088. considerations outlined in RFC 2068 apply.  Specifically, IPP servers
  1089. can generate a 401 "Unauthorized" response code to request client
  1090. authentication and IPP clients should correctly respond with the proper
  1091. "Authorization" header.  Both Basic Authentication (RFC 2068) and Digest
  1092. Authentication (RFC 2069) flavors of authentication should be supported.
  1093. The server chooses which type(s) of authentication to accept.  Digest
  1094. Authentication is a more secure method, and is always preferred to Basic
  1095. Authentication.
  1096.  
  1097. For secure communication (privacy in particular), IPP should be run
  1098. using a secure communications channel.  Both Transport Layer Security -
  1099. TLS (draft-ietf-tls-protocol-03) and IPSec (RFC 1825) provide necessary
  1100. features for security.  It is possible to combine the two techniques,
  1101. HTTP 1.1 client authentication (either basic or digest) with secure
  1102. communications channel (either TLS or IPSec).  Together the two are more
  1103. secure than client authentication and they perform user authentication.
  1104.  
  1105. Complete discussion of IPP security considerations can be found in the
  1106. IPP  Security document
  1107.  
  1108. ISSUE: how does each security mechanism supply the job-originating-user
  1109. and job-originating-host values?
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115. Herriot, Butler,             July 30, 1997,                   [Page 18]
  1116. Moore and Turner        Expires January 30, 1998
  1117.  
  1118.  
  1119. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1120.  
  1121.  
  1122. 6. References
  1123.  
  1124. [1]  Smith, R., Wright, F., Hastings, T., Zilles, S., and Gyllenskog,
  1125.      J., "Printer MIB", RFC 1759, March 1995.
  1126.  
  1127. [2]  Berners-Lee, T, Fielding, R., and Nielsen, H., "Hypertext Transfer
  1128.      Protocol - HTTP/1.0", RFC 1945, August 1995.
  1129.  
  1130. [3]  Crocker, D., "Standard for the Format of ARPA Internet Text
  1131.      Messages", RFC 822, August 1982.
  1132.  
  1133. [4]  Postel, J., "Instructions to RFC Authors", RFC 1543, October 1993.
  1134.  
  1135. [5]  ISO/IEC 10175 Document Printing Application (DPA), June 1996.
  1136.  
  1137. [6]  Herriot, R. (editor), X/Open A Printing System Interoperability
  1138.      Specification (PSIS), August 1995.
  1139.  
  1140. [7]  Kirk, M. (editor), POSIX System Administration - Part 4: Printing
  1141.      Interfaces, POSIX 1387.4 D8, 1994.
  1142.  
  1143. [8]  Borenstein, N., and Freed, N., "MIME (Multi-purpose Internet Mail
  1144.      Extensions) Part One: Mechanism for Specifying and Describing the
  1145.      Format of Internet Message Bodies", RFC 1521, September, 1993.
  1146.  
  1147. [9]  Braden, S., "Requirements for Internet Hosts - Application and
  1148.      Support", RFC 1123, October, 1989,
  1149.  
  1150. [10] McLaughlin, L. III, (editor), "Line Printer Daemon Protocol" RFC
  1151.      1179, August 1990.
  1152.  
  1153. [11] Berners-Lee, T., Masinter, L., McCahill, M. , "Uniform Resource
  1154.      Locators (URL)", RFC 1738, December, 1994.
  1155.  
  1156. [20] Wright, F. D., "Requirements for an Internet Printing Protocol:"
  1157.  
  1158. [21] Isaacson, S, deBry, R, Hasting, T, Herriot, R, Powell, P, "Internet
  1159.      Printing Protocol/1.0: Model and Semantics"
  1160.  
  1161. [22] Internet Printing Protocol/1.0: Security
  1162.  
  1163. [23] Herriot, R, Butler, S, Moore, P, Turner, R, "Internet Printing
  1164.      Protocol/1.0: Protocol Specification"  (This document)
  1165.  
  1166. [24] Carter, K, Isaacson, S, "Internet Printing Protocol/1.0: Directory
  1167.      Schema"
  1168.  
  1169. [25] S. Bradner, "Key words for use in RFCs to Indicate Requirement
  1170.      Levels", RFC 2119 , March 1997
  1171.  
  1172. [26] H. Alvestrand, " Tags for the Identification of Languages", RFC
  1173.      1766, March 1995.
  1174.  
  1175.  
  1176.  
  1177. Herriot, Butler,             July 30, 1997,                   [Page 19]
  1178. Moore and Turner        Expires January 30, 1998
  1179.  
  1180.  
  1181. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1182.  
  1183.  
  1184. [27]       R Fielding, et al, "Hypertext Transfer Protocol " HTTP/1.1"
  1185.      RFC 2068, January 1997
  1186.  
  1187. [28]       J. Case, et al. "Textual Conventions for Version 2 of the
  1188.      Simple Network Managment Protocol (SNMPv2)", RFC 1903, January
  1189.      1996.
  1190.  
  1191. [29] D. Crocker et al., "Augmented BNF for Syntax Specifications: ABNF",
  1192.      draft-ietf-drums-abnf-03.txt.
  1193.  
  1194. [30]       R. Turner, "Printer MIB", draft-ietf-printmib-mib-info-
  1195.      02.txt, July 12, 1997.
  1196.  
  1197.  
  1198. 7. Author's Address
  1199.  
  1200.  
  1201. Robert Herriot (editor)             Paul Moore
  1202. Sun Microsystems Inc.               Microsoft
  1203. 901 San Antonio.Road, MPK-17        One Microsoft Way
  1204. Palo Alto, CA 94303                 Redmond, WA 98053
  1205.  
  1206. Phone: 650-786-8995                 Phone: 425-936-0908
  1207. Fax:  650-786-7077                  Fax: 425-93MS-FAX
  1208. Email: robert.herriot@eng.sun.com   Email: paulmo@microsoft.com
  1209.  
  1210. Sylvan Butler                       Randy Turner
  1211. Hewlett-Packard                     Sharp Laboratories
  1212. 11311 Chinden Blvd.                 5750 NW Pacific Rim Blvd
  1213. Boise, ID 83714                     Camas, WA 98607
  1214.  
  1215. Phone: 208-396-6000                 Phone: 360-817-8456
  1216. Fax:  208-396-3457                  Fax: : 360-817-8436
  1217. Email: sbutler@boi.hp.com           Email: rturner@sharplabs.com
  1218.  
  1219.  
  1220. IPP Mailing List:  ipp@pwg.org
  1221. IPP Mailing List Subscription:  ipp-request@pwg.org
  1222. IPP Web Page:  http://www.pwg.org/ipp/
  1223.  
  1224.  
  1225. 8. Other Participants:
  1226.  
  1227. Chuck Adams - Tektronix             Harry Lewis - IBM
  1228. Ron Bergman - Data Products         Tony Liao - Vivid Image
  1229. Keith Carter - IBM                  David Manchala - Xerox
  1230. Angelo Caruso - Xerox               Carl-Uno Manros - Xerox
  1231. Jeff Copeland - QMS                 Jay Martin - Underscore
  1232. Roger Debry - IBM                   Larry Masinter - Xerox
  1233. Lee Farrell - Canon                 Bob Pentecost - Hewlett-Packard
  1234. Sue Gleeson - Digital               Patrick Powell - SDSU
  1235. Charles Gordon - Osicom             Jeff Rackowitz - Intermec
  1236. Brian Grimshaw - Apple              Xavier Riley - Xerox
  1237. Jerry Hadsell - IBM                 Gary Roberts - Ricoh
  1238.  
  1239. Herriot, Butler,             July 30, 1997,                   [Page 20]
  1240. Moore and Turner        Expires January 30, 1998
  1241.  
  1242.  
  1243. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1244.  
  1245.  
  1246. Richard Hart - Digital              Stuart Rowley - Kyocera
  1247. Tom Hastings - Xerox                Richard Schneider - Epson
  1248. Stephen Holmstead                   Shigern Ueda - Canon
  1249. Zhi-Hong Huang - Zenographics       Bob Von Andel - Allegro Software
  1250. Scott Isaacson - Novell             William Wagner - Digital Products
  1251. Rich Lomicka - Digital              Jasper Wong - Xionics
  1252. David Kellerman - Northlake         Don Wright - Lexmark
  1253. Software
  1254. Robert Kline - TrueSpectra          Rick Yardumian - Xerox
  1255. Dave Kuntz - Hewlett-Packard        Lloyd Young - Lexmark
  1256. Takami Kurono - Brother             Peter Zehler - Xerox
  1257. Rich Landau - Digital               Frank Zhao - Panasonic
  1258. Greg LeClair - Epson                Steve Zilles - Adobe
  1259.  
  1260. 9. Appendix A: Protocol Examples
  1261.  
  1262.  
  1263. 9.1 Print-Job Request
  1264.  
  1265. The following is an example of a Print-Job request with job-name,
  1266. copies, and sides specified.
  1267.  
  1268.  
  1269. Octets                Symbolic Value       Protocol field
  1270.  
  1271. 0x0100                1.0                  version
  1272. 0x0002                PrintJob             operation
  1273. 0x02                  start attributes     attribute tag
  1274. 0x42                  name type            value-tag
  1275. 0x0008                                     name-length
  1276. job-name              job-name             name
  1277. 0x0006                                     value-length
  1278. foobar                foobar               value
  1279. 0x21                  integer type         value-tag
  1280. 0x0005                                     name-length
  1281. copies                copies               name
  1282. 0x0004                                     value-length
  1283. 0x00000014            20                   value
  1284. 0x44                  keyword type         value-tag
  1285. 0x0005                                     name-length
  1286. sides                 sides                name
  1287. 0x0001                                     value-length
  1288. two-sided-long-edge   two-sided-long-edge  value
  1289. 0x03                  start-data           data-tag
  1290. %!PS...               <PostScript>         data
  1291.  
  1292. 9.2 Print-Job Response (successful)
  1293.  
  1294. Here is an example of a Print-Job response which is successful:
  1295.  
  1296.  
  1297. Octets           Symbolic Value   Protocol field
  1298.  
  1299. 0x0100           1.0              version
  1300.  
  1301. Herriot, Butler,             July 30, 1997,                   [Page 21]
  1302. Moore and Turner        Expires January 30, 1998
  1303.  
  1304.  
  1305. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1306.  
  1307.  
  1308.  
  1309. Octets           Symbolic Value   Protocol field
  1310.  
  1311. 0x0000           OK (successful)  status-code
  1312. 0x01             start parameters parameter tag
  1313. 0x41             text type        value-tag
  1314. 0x000E                            name-length
  1315. status-message   status-message   name
  1316. 0x0002                            value-length
  1317. OK               OK               value
  1318. 0x45             uri type         value-tag
  1319. 0x0008                            name-length
  1320. job-uri          job-uri          name
  1321. 0x000E                            value-length
  1322. http://foo/123   http://foo/123   value
  1323. 0x02             start attributes attribute tag
  1324. 0x25             name type        value-tag
  1325. 0x0008                            name-length
  1326. job-state        job-state        name
  1327. 0x0001                            value-length
  1328. 0x03             pending          value
  1329. 0x03             start-data       data-tag
  1330.  
  1331. 9.3 Print-Job Response (failure)
  1332.  
  1333. Here is an example of a Print-Job response which fails because the
  1334. printer does not support sides and because the value 20 for copies is
  1335. not supported:
  1336.  
  1337.  
  1338. Octets          Symbolic Value            Protocol field
  1339.  
  1340. 0x0100          1.0                       version
  1341. 0x0400          client-error-bad-request  status-code
  1342. 0x01            start parameters          parameter tag
  1343. 0x41            text type                 value-tag
  1344. 0x000E                                    name-length
  1345. status-message  status-message            name
  1346. 0x000D                                    value-length
  1347. bad-request     bad-request               value
  1348. 0x02            start attributes          attribute tag
  1349. 0x21            integer type              value-tag
  1350. 0x0005                                    name-length
  1351. copies          copies                    name
  1352. 0x0004                                    value-length
  1353. 0x00000014      20                        value
  1354. 0x10            unsupported  (type)       value-tag
  1355. 0x0005                                    name-length
  1356. sides           sides                     name
  1357. 0x0000                                    value-length
  1358. 0x03            start-data                data-tag
  1359.  
  1360.  
  1361.  
  1362.  
  1363. Herriot, Butler,             July 30, 1997,                   [Page 22]
  1364. Moore and Turner        Expires January 30, 1998
  1365.  
  1366.  
  1367. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1368.  
  1369.  
  1370. 9.4 Print-URI Request
  1371.  
  1372. The following is an example of Print-URI request with copies and job-
  1373. name parameters.
  1374.  
  1375. Octets              Symbolic Value      Protocol field
  1376. 0x0100              1.0                 version
  1377. 0x0003              Print-URI           operation
  1378. 0x01                start-parameters    parameter tag
  1379. 0x45                uri type            value-tag
  1380. 0x000A                                  name-length
  1381. document-uri        document-uri        name
  1382. 0x11                                    value-length
  1383. ftp://foo.com/foo   ftp://foo.com/foo   value
  1384. 0x02                start-attributes    attribute tag
  1385. 0x42                name type           value-tag
  1386. 0x0008                                  name-length
  1387. job-name            job-name            name
  1388. 0x0006                                  value-length
  1389. foobar              foobar              value
  1390. 0x21                integer type        value-tag
  1391. 0x0005                                  name-length
  1392. copies              copies              name
  1393. 0x0004                                  value-length
  1394. 0x00000001          1                   value
  1395. 0x03                start-data          data-tag
  1396. %!PS...             <PostScript>        data
  1397.  
  1398. 9.5 Create-Job Request
  1399.  
  1400. The following is an example of Create-Job request with no parameters and
  1401. no attributes
  1402.  
  1403. Octets       Symbolic    Protocol field
  1404.              Value
  1405. 0x0100       1.0         version
  1406. 0x0005       Create-Job  operation
  1407. 0x03         start-data  data-tag
  1408.  
  1409. 9.6 Get-Jobs Request
  1410.  
  1411. The following is an example of Get-Jobs request with parameters but no
  1412. attributes.
  1413.  
  1414. Octets                Symbolic Value       Protocol field
  1415. 0x0100                1.0                  version
  1416. 0x000A                Get-Jobs             operation
  1417. 0x01                  start-parameters     parameter-tag
  1418. 0x21                  integer type         value-tag
  1419. 0x0005                                     name-length
  1420. limit                 limit                name
  1421. 0x0004                                     value-length
  1422. 0x00000032            50                   value
  1423. 0x44                  keyword type         value-tag
  1424.  
  1425. Herriot, Butler,             July 30, 1997,                   [Page 23]
  1426. Moore and Turner        Expires January 30, 1998
  1427.  
  1428.  
  1429. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1430.  
  1431.  
  1432. Octets                Symbolic Value       Protocol field
  1433. 0x0014                                     name-length
  1434. requested-attributes  requested-attributes name
  1435. 0x0007                                     value-length
  1436. job-uri               job-uri              value
  1437. 0x44                  keyword type         value-tag
  1438. 0x0000                additional value     name-length
  1439. 0x0008                                     value-length
  1440. job-name              job-name             value
  1441. 0x03                  start-data           data-tag
  1442.  
  1443. 9.7 Get-Jobs Response
  1444.  
  1445. The following is an of Get-Jobs response from previous request with 3
  1446. jobs. The Printer returns no information about the second job.
  1447.  
  1448. Octets            Symbolic Value        Protocol field
  1449. 0x0100            1.0                   version
  1450. 0x0000            OK (successful)       status-code
  1451. 0x01              start-parameters      parameter-tag
  1452. 0x41              text type             value-tag
  1453. 0x000E                                  name-length
  1454. status-message    status-message        name
  1455. 0x0002                                  value-length
  1456. OK                OK                    value
  1457. 0x02              start-attributes      attribute-tag
  1458.                   (1st  object)
  1459. 0x45              uri type              value-tag
  1460. 0x0007                                  name-length
  1461. job-uri           job-uri               name
  1462. 0x000E                                  value-length
  1463. http://foo/123    http://foo/123        value
  1464. 0x42              name type             value-tag
  1465. 0x0008                                  name-length
  1466. job-name          job-name              name
  1467. 0x0003                                  name-length
  1468. foo               foo                   name
  1469. 0x02              start-attributes      attribute-tag
  1470.                   (2nd object)
  1471. 0x02              start-attributes      attribute-tag
  1472.                   (3rd object)
  1473. 0x45              uri type              value-tag
  1474. 0x0007                                  name-length
  1475. job-uri           job-uri               name
  1476. 0x000E                                  value-length
  1477. http://foo/124    http://foo/124        value
  1478. 0x42              name type             value-tag
  1479. 0x0008                                  name-length
  1480. job-name          job-name              name
  1481. 0x0003                                  name-length
  1482. bar               bar                   name
  1483. 0x03              start-data            data-tag
  1484.  
  1485.  
  1486.  
  1487. Herriot, Butler,             July 30, 1997,                   [Page 24]
  1488. Moore and Turner        Expires January 30, 1998
  1489.  
  1490.  
  1491. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1492.  
  1493.  
  1494. 10. Appendix B: Mapping of Each Operation in the Encoding
  1495.  
  1496. The next three tables show the results of applying the rules above to
  1497. the operations defined in the IPP model document. There is no
  1498. information in these tables that cannot be derived from the rules
  1499. presented in Section 3.8 "Mapping of Parameter Names".
  1500.  
  1501. The following table shows the mapping of all IPP model document request
  1502. parameters to a parameter-sequence, attribute-sequence  or special
  1503. position in the protocol.
  1504.  
  1505.  
  1506. Operation        parameter-      attribute-       special position
  1507.                  sequence        sequence
  1508.  
  1509. Get-Operations   printer-uri
  1510. Print-Job        printer-uri     job-template     document-content
  1511.                  best-effort     attributes
  1512.                  job-name        document
  1513.                                  attributes
  1514. Print-URI        printer-uri     job-template
  1515.                  best-effort     attributes
  1516.                  job-name        document
  1517.                  document-uri    attributes
  1518. Validate-Job or  printer-uri     job-template
  1519. Create-Job       best-effort     attributes
  1520.                  job-name
  1521. Send-Document    job-uri         document         document-content
  1522.                  last-document   attributes
  1523. Send-URI         job-uri         document
  1524.                  last-document   attributes
  1525.                  document-uri
  1526. Cancel-Job       job-uri
  1527.                  message
  1528. Get-Attributes   printer-uri
  1529. (for a Printer)  document-
  1530.                  format
  1531.                  requested-
  1532.                  attributes
  1533. Get-Attributes   job-uri
  1534. (for a Job)      document-
  1535.                  format
  1536.                  requested-
  1537.                  attributes
  1538. Get-Jobs         printer-uri
  1539.                  limit
  1540.                  requested-
  1541.                  attributes
  1542.  
  1543. The following table shows the mapping of all IPP model document response
  1544. parameters to a parameter-sequence, attribute-sequence or special
  1545. position in the protocol.
  1546.  
  1547.  
  1548.  
  1549. Herriot, Butler,             July 30, 1997,                   [Page 25]
  1550. Moore and Turner        Expires January 30, 1998
  1551.  
  1552.  
  1553. INTERNET-DRAFT      IPP/1.0: Protocol Specification       July 30, 1997
  1554.  
  1555.  
  1556.  
  1557. Operation      parameter-sequence    attribute-sequence    special
  1558.                                                            position
  1559.  
  1560. Get-Operations status-message                              status-code
  1561.                supported-operations
  1562.  
  1563. Print-Job,     status-message        job-status            status-code
  1564. Print-URI or   job-uri               attributes
  1565. Create-Job
  1566.  
  1567. Send-Document  status-message        job-status            status-code
  1568. or Send-URI                          attributes
  1569.  
  1570. Validate-Job   status-message                              status-code
  1571.  
  1572. Cancel-Job     status-message                              status-code
  1573.  
  1574. Get-Attributes status-message        requested attributes  status-code
  1575.  
  1576. Get-Jobs       status-message        requested attributes  status-code
  1577.                                      (see the Note below)
  1578.  
  1579.  
  1580. Note for Get-Jobs: there is a separate attribute-sequence containing
  1581. requested-attributes for each job object in the response
  1582.  
  1583. The following table shows the mapping of all IPP model document error
  1584. response parameters to a parameter-sequence, attribute-sequence or
  1585. special position in the protocol. Those operations omitted don't have
  1586. special parameters for an error return.
  1587.  
  1588.  
  1589. Operation        parameter-      attribute-sequence       special
  1590.                  sequence                                 position
  1591.  
  1592. Print-Job,       status-message  unsupported attributes   status-code
  1593. Print-URI,
  1594. Validate-Job,
  1595. Create-Job,
  1596. Send-Document or
  1597. Send-URI
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611. Herriot, Butler,             July 30, 1997,                   [Page 26]
  1612. Moore and Turner        Expires January 30, 1998
  1613.