INTERNET-DRAFT                                   Robert Herriot (editor)
                                                        Sun Microsystems
<draft-ietf-ipp-protocol-04.txt>                           Sylvan Butler
                                                         Hewlett-Packard
                                                              Paul Moore
                                                              Microsoft.
                                                               Microsoft
                                                            Randy Turner
                                                              Sharp Labs
                                                        November 7,
                                                       December 19, 1997

         Internet Printing Protocol/1.0: Protocol Specification
                     draft-ietf-ipp-protocol-03.txt
     Copyright c The Internet Society (date). All Rights Reserved.

Status of this Memo

This document is an Internet-Draft.  Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, and
its working groups.  Note that other groups may also distribute working
documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time.  It is inappropriate to use Internet-Drafts as reference material
or to cite them other than as "work in progress".

To learn the current status of any Internet-Draft, please check the
"1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
ftp.isi.edu (US West Coast).

Copyright Notice

Copyright (C)The Internet Society (1997). All Rights Reserved.

Abstract

This document is one of a set of documents, which together describe all
aspects of a new Internet Printing Protocol (IPP).  IPP is an
application level protocol that can be used for distributed printing
using Internet tools and technology.  The protocol is heavily influenced
by the printing model introduced in the Document Printing Application
(ISO/IEC 10175 DPA) standard [dpa].  Although DPA specifies both end
user and administrative features, IPP version 1.0 is focused only on end
user functionality.

The full set of IPP documents includes:

  Requirements for an Internet Printing Protocol [ipp-req]
  Internet Printing Protocol/1.0: Model and Semantics [ipp-mod]
  Internet Printing Protocol/1.0: Protocol Specification (this
     document)

Moore and Turner         Expires June 19, 1998

The requirements document takes a broad look at distributed printing
functionality, and it enumerates real-life scenarios that help to
clarify the features that need to be included in a printing protocol for
the Internet.  It identifies requirements for three types of users: end
Moore and Turner          Expires May 7, 1998
users, operators, and administrators.  The requirements document calls
out a subset of end user requirements that MUST be satisfied in the
first version of IPP.  Operator and administrator requirements are out
of scope for v1.0. The model and semantics document describes a
simplified model with abstract objects, their attributes, and their
operations. The model introduces a Printer object and a Job object.  The
Job object supports multiple documents per job. The protocol
specification is formal document which incorporates the ideas in all the
other documents into a concrete mapping using clearly defined data
representations and transport protocol mappings that real implementers
can use to develop interoperable client and printer (server) side
components.

This document is the ''Internet Printing Protocol/1.0: Protocol
Specification'' document.

Notice

The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary rights
which may cover technology that may be required to practice this
standard.  Please address the information to the IETF Executive
Director.

Moore and Turner         Expires May 7, June 19, 1998
                           Table of Contents

1. Introduction........................................................4
2. Conformance Terminology.............................................4
3. Encoding of  the Operation Layer....................................4
   3.1 Picture of the Encoding.........................................5
   3.2 Syntax of Encoding..............................................6 Encoding..............................................7
   3.3 Version.........................................................8
   3.4 Mapping of Operations...........................................8
   3.5 Mapping of Status-code..........................................8
   3.6 Request-id......................................................9
   3.7 Tags.............................................................
      3.6.1
      3.7.1 Delimiter Tags.............................................8
      3.6.2 Tags.............................................9
      3.7.2 Value Tags.................................................9
   3.7 Name-Lengths...................................................11 Tags................................................10
   3.8 Name-Lengths...................................................12
   3.9 Mapping of Attribute  Names....................................11
   3.9 Value Lengths..................................................12  Names....................................12
   3.10 Value Lengths.................................................13
   3.11 Mapping of Attribute Values...................................12
   3.11 Values...................................13
   3.12 Data............................................................
4. Encoding of Transport Layer........................................14 Layer........................................15
   4.1 General Headers................................................15 Headers................................................16
   4.2 Request  Headers...............................................16  Headers...............................................17
   4.3 Response Headers...............................................16 Headers...............................................18
   4.4 Entity  Headers................................................17  Headers................................................18
5. Security Considerations............................................17 Considerations............................................19
6. Copyright..........................................................18
7. References.........................................................19
8.
7. Author's Address...................................................20
9. Address...................................................21
8. Other Participants:................................................20
10. Participants:................................................21
9. Appendix A: Protocol Examples.....................................21
   10.1 Examples......................................22
   9.1 Print-Job Request.............................................21
   10.2 Request..............................................22
   9.2 Print-Job Response (successful)...............................22
   10.3 (successful)................................23
   9.3 Print-Job Response (failure)..................................23
   10.4 (failure)...................................24
   9.4 Print-URI Request.............................................24
   10.5 Request..............................................25
   9.5 Create-Job Request............................................25
   10.6 Request.............................................25
   9.6 Get-Jobs Request..............................................25
   10.7 Request...............................................26
   9.7 Get-Jobs Response.............................................26
11. Response..............................................27
10. Appendix B: Mapping of Each Operation in the Encoding.............27
12. Appendix C: Hints to implementors using IPP with SSL3.............32 SSL3.............28
11. Appendix C: Registration of MIME Media Type Information for
"application/ipp".....................................................29
12. Appendix D: Full Copyright Statement..............................31

Moore and Turner         Expires May 7, June 19, 1998

1. Introduction

This document contains the rules for encoding IPP operations and
describes two layers: the transport layer and the operation layer.

The transport layer consists of an  HTTP/1.1 request or response. RFC
2068 [rfc2068] describes HTTP/1.1. This document specifies the HTTP
headers that an IPP implementation supports.

The operation layer consists of  a message body in an HTTP request or
response.  The document "Internet Printing Protocol/1.0: Model and
Semantics" [ipp-mod] defines the semantics of such a message body and
the supported values. This document specifies the encoding of an IPP
operation. The aforementioned document [ipp-mod] is henceforth referred
to as the "IPP model document"

2. Conformance Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and  "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [rfc2119].

3. Encoding of  the Operation Layer

The operation layer SHALL contain a single operation request or
operation response.  Each request or response consists of a sequence of
values and attribute groups. Attribute groups consist of a sequence of
attributes each of which is a name and value.  Names and values are
ultimately sequences of octets

The encoding consists of octets as the most primitive type. There are
several types built from octets, but three important  types are
integers,  character strings and octet strings, on which most  other
data types are built. Every character string in this encoding SHALL be a
sequence of characters where the characters are associated with some
charset and some natural language. . A character string MUST be in
"network byte
"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 whose associated natural
language is US English is henceforth 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
henceforth called a LOCALIZED-STRING.   . An octet string MUST be in
"network byte "IPP
model document order" with the first octet in the value (according to
reading
the IPP model document  order) being the first octet in the encoding
Every integer in this encoding SHALL be encoded as a signed integer
using two's-
complement 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 SHALL be 1, 2 or 4, depending on usage in the
protocol. Such one-octet integers, henceforth called SIGNED-BYTE, are
used for the version and tag fields. Such two-byte integers, henceforth

Moore and Turner         Expires June 19, 1998

called SIGNED-SHORT are used for the operation, status-code and length
fields. Four byte integers, henceforth called SIGNED-INTEGER, are used
for values fields.

Moore fields and Turner          Expires May 7, 1998 the sequence number.

The following two sections present the operation layer in two ways

  .  informally through pictures and description
  .  formally through Augmented Backus-Naur Form (ABNF), as specified by
     draft-ietf-drums-abnf-02.txt [abnf]
     RFC 2234 [rfc2234]

3.1 Picture of the Encoding

The encoding for an operation request or response consists of:

  -----------------------------------------------
  |                    version                  |   2 bytes  - required
  -----------------------------------------------
  |operation (request) or status-code (response)|   2 bytes  - required
  -----------------------------------------------
  |                   request-id                |   4 bytes  - required
  -----------------------------------------------------------
  |               xxx-attributes-tag            |   1 byte  |
  -----------------------------------------------           |-0 or more
  |             xxx-attribute-sequence          |   n bytes |
  -----------------------------------------------------------
  |                  data-tag              end-of-attributes-tag          |   1 byte   - required
  -----------------------------------------------
  |                     data                    |   q bytes  - optional
  -----------------------------------------------

The xxx-attributes-tag and xxx-attribute-sequence represents four
different values of "xxx", namely, operation, job, printer and
unsupported-job.
unsupported. The xxx-attributes-tag and an xxx-attribute-sequence may
be omitted if
represent attribute groups in the model document. The xxx-attributes-tag
identifies the attribute group and the xxx-attribute-sequence contains
the attributes.

The expected sequence of  xxx-attributes-tag and xxx-attribute-sequence
is specified in the IPP model document for each operation has request and
operation response.

A request or response SHOULD contain each xxx-attributes-tag defined for
that request or response even if there are no attributes or it may except for the
unsupported-attributes-tag which SHOULD be repeated with present only if the same or different values
unsupported-attribute-sequence is non-empty. A receiver of "xxx" in ways that are specific a request
SHALL be able to each
operation. process as equivalent empty attribute groups:

  a) an xxx-attributes-tag with an empty xxx-attribute-sequence,

  b) an expected but missing xxx-attributes-tag.

The data is omitted from some operations, but the data-tag end-of-attributes-tag
is present even when the data is omitted. Note, the xxx-attributes-tags

Moore and Turner         Expires June 19, 1998

and
data-tag end-of-attributes-tag are called `delimiter-tags'. Note: the xxx-attribute-sequence, xxx-
attribute-sequence, shown above may consist of 0 bytes, according to the
rule below.

An xxx-attributes-sequence consists of zero or more compound-attributes.

  -----------------------------------------------
  |              compound-attribute             |   s bytes - 0 or more
  -----------------------------------------------

A compound-attribute consists of an attribute with a single value
followed by zero or more additional values.

Note: a `compound-attribute' represents a single attribute in the model
document.  The `additional value' syntax is for attributes with 2 or
more values.

Each attribute consists of:

Moore and Turner          Expires May 7, 1998

  -----------------------------------------------
  |                   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 additional value consists of:

  -----------------------------------------------------------
  |                   value-tag                 |   1 byte  |
  -----------------------------------------------           |
  |            name-length  (value is 0x0000)   |   2 bytes |
  -----------------------------------------------           |-0 or more
  |              value-length (value is w)      |   2 bytes |
  -----------------------------------------------           |
  |                     value                   |   w bytes |
  -----------------------------------------------------------

Note: an additional value is like an attribute whose name-length is 0.

From the standpoint of a parsing loop, the encoding consists of:

  -----------------------------------------------
  |

Moore and Turner         Expires June 19, 1998
  -----------------------------------------------
  |                    version                  |   2 bytes  - required
  -----------------------------------------------
  |operation (request) or status-code (response)|   2 bytes  - required
  -----------------------------------------------
  |                   request-id                |   4 bytes  - required
  -----------------------------------------------------------
  |        tag (delimiter-tag or value-tag)     |   1 byte  |
  -----------------------------------------------           |-0 or more
  |           empty or rest of attribute        |   x bytes |
  -----------------------------------------------------------
  |                   data-tag              end-of-attributes-tag          |   2 bytes  - required
  -----------------------------------------------
  |                     data                    |   y bytes  - optional
  -----------------------------------------------

The value of the tag determines whether the bytes following the tag are:

  .  attributes
  .  data
  .  the remainder of a single attribute where the tag specifies the
     type of the value.

3.2 Syntax of Encoding

The syntax below is ABNF [abnf] [rfc2234] except `strings of literals' SHALL be
case sensitive. For example `a' means lower case  `a' and not upper case

Moore and Turner          Expires May 7, 1998
`A'.   In addition, SIGNED-BYTE and SIGNED-SHORT fields are represented
as `%x' values which show their range of values.

  ipp-message = ipp-request / ipp-response
  ipp-request = version operation request-id
           *(xxx-attributes-tag  xxx-attribute-sequence) data-tag end-of-
  attributes-tag data
  ipp-response = version status-code request-id
           *(xxx-attributes-tag xxx-attribute-sequence)  data-tag  end-of-
  attributes-tag  data
  xxx-attribute-sequence = *compound-attribute
       ; where "xxx" in the three rules above stands for any of the
  following
       ; values:  "operation",  "job", "printer" or "unsupported-job".

  xxx-attributes-tag = operation-attributes-tag / job-attributes-tag /
        printer-attributes-tag / unsupported-attributes-tag

  version = major-version minor-version
  major-version = SIGNED-BYTE  ; initially %d1
  minor-version = SIGNED-BYTE  ; initially %d0

  operation = SIGNED-SHORT    ; mapping from model defined below
  status-code = SIGNED-SHORT  ; mapping from model defined below

  compound-attribute = attribute *additional-values

  attribute = value-tag name-length name value-length value
  additional-values = value-tag zero-name-length value-length value

Moore and Turner         Expires June 19, 1998
  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
  operation-attributes-tag =  %x01              ; tag of 1
  job-attributes-tag    =  %x02                 ; tag of 2
  printer-attributes-tag =  %x04                ; tag of 4
  unsupported-job-attributes-tag
  unsupported- attributes-tag =  %x05           ; tag of 5
  data-tag
  end-of-attributes-tag = %x03                  ; tag of 3
  value-tag = %x10-FF

  SIGNED-BYTE = BYTE
  SIGNED-SHORT = 2BYTE
  DIGIT = %x30-39    ;  "0" to "9"
  LALPHA = %x61-7A   ;  "a" to "z"
  BYTE = %x00-FF
  OCTET-STRING = *BYTE

The syntax allows an xxx-attributes-tag to be present when the xxx-
attribute-sequence that follows is empty. The syntax is defined this way
to allow for the response of Get-Jobs where no attributes are returned
for some job-objects.  Although it is RECOMMENDED that the sender not
send an xxx-attributes-tag if there are no attributes (except in the

Moore and Turner          Expires May 7, 1998
Get-Jobs response just mentioned), the receiver MUST be able to decode
such syntax.

3.3 Version

The version SHALL consist of a major and minor version, each of which
SHALL be represented by a SIGNED-BYTE. The protocol described in this
document SHALL have a major version of 1 (0x01) and a minor version of
0 (0x00).  The ABNF for these two bytes SHALL be %x01.00.

3.4 Mapping of Operations

Operations are defined as enums in the model document. An operations
enum value SHALL be encoded as a SIGNED-SHORT

Note: the values 0x4000 to 0xFFFF are reserved for private extensions.

3.5 Mapping of Status-code

Status-codes are defined as enums in the model document. A status-code
enum value SHALL be encoded as a SIGNED-SHORT

Moore and Turner         Expires June 19, 1998

The status-code is an operation attribute in the model document. In the
protocol, the status-code is in a special position, outside of the
operation attributes.

If an IPP status-code is returned, then the HTTP Status-Code MUST be 200
(OK). With any other HTTP Status-Code value, the HTTP response SHALL NOT
contain an IPP message-body, and thus no IPP status-code is returned.

3.6 Request-id

The request-id allows a client to match a response with a request.  This
mechanism is unnecessary in HTTP, but may be useful when application/ipp
entity bodies are used in another context.

The request-id in a response SHALL be the value of the request-id
received in the corresponding request.  A client can set the request-id
in each request to a unique value or a constant value, such as 1,
depending on what the client does with the request-id returned in the
response.

3.7 Tags

There are two kinds of tags:

  .  delimiter tags: delimit major sections of the protocol, namely
     attributes and data
  .  value tags: specify the type of each attribute value

3.6.1

3.7.1 Delimiter Tags

The following table specifies the values for the delimiter tags:

   Tag Value (Hex)    Delimiter

   0x00               reserved
   0x01               operation-attributes-tag
   0x02               job-attributes-tag
   0x03               data-tag               end-of-attributes-tag
   0x04               printer-attributes-tag
   0x05               unsupported-job-attributes-tag
   0x06-0x0F               unsupported-attributes-tag
   0x06-0x0e          reserved for future delimiters

Moore and Turner          Expires May 7, 1998
   0x0F               reserved for future chunking-end-of-attributes-
                      tag

When an xxx-attributes-tag occurs in the protocol, it SHALL mean that
the
zero or more following attributes up to the next delimiter tag are
xxx
attributes belonging to group xxx as defined in the model document,
where xxx is operation, job, printer, unsupported-job. unsupported.

Moore and Turner         Expires June 19, 1998

Doing substitution for xxx in the above paragraph, this means the
following. When an operation-attributes-tag occurs in the protocol, it
SHALL mean that the zero or more following attributes up to the next
delimiter tag are operation attributes as defined in the model document.
When an job-attributes-tag occurs in the protocol, it SHALL mean that
the zero or more following attributes up to the next delimiter tag are
job attributes as defined in the model document. When an printer-
attributes-tag occurs in the protocol, it SHALL mean that the zero or
more following attributes up to the next delimiter tag are printer
attributes as defined in the model document. When an unsupported-job- unsupported-
attributes-tag occurs in the protocol, it SHALL mean that the zero or
more following attributes up to the next delimiter tag are unsupported-
job unsupported
attributes as defined in the model document.

The  operation-attributes-tag and data-tag end-of-attributes-tag SHALL each occur
exactly once in an operation. The operation-attributes-tag SHALL be the
first tag delimiter, and  the data-tag end-of-attributes-tag SHALL be the last
tag delimiter. If the operation has a document-content group, the
document data in that group SHALL follow the end-of-attributes-tag

Each of the  other three  xxx-attributes-tags defined above is OPTIONAL
in an operation and each SHALL occur at most once in an operation,
except for job-attributes-tag in a Get-Jobs response which may occur
zero or more times.

The order and presence of delimiter tags for each operation request and
each operation response SHALL be that defined in the model document. For
further details, see Section 3.8 3.9 Mapping of Attribute  Names and
Appendix B: Mapping of Each Operation in Error!
Reference source not found..

A Printer SHALL treat the reserved delimiter tags differently from
reserved value tags so that the Encoding.

3.6.2 Printer knows that there is an entire
attribute group that it doesn't understand as opposed to a single value
that it doesn't understand.

3.7.2 Value Tags

The remaining tables show values for the value-tag, which is the first
octet of  an attribute. The value-tag specifies the type of the value of
the attribute. If  the value-tag specifies a type of compoundValue, it
represents a compound value whose type is the that of the last member of
the compound value. The following table specifies the "out-of-band" values
for the value-tag.

   Tag Value (Hex)  Meaning

   0x10             unsupported
   0x11             reserved for future `default'
   0x12             unknown
   0x13             compoundValue             no-value
   0x14-0x1F        reserved for future "out-of-band" values.

The "unsupported" value SHALL be used in the attribute-sequence of an
error response for those attributes which the printer does not support.

Moore and Turner         Expires May 7, June 19, 1998

The "default" value is reserved for future use of setting value back to
their default value. The "unknown" value is used for the value of a
supported attribute when its value is temporarily unknown. . The
"compoundValue"  SHALL be used to form a single value from a collection
of values, and its "no-
value" value is the number of members forming the compound
value, excluding the compoundValue.  For example, a text value with a
naturalLanguage override consists of 3 "values": used for a compoundValue with supported attribute to which no value 2, a naturalLanguage has
been assigned, e.g. "job-k-octets-supported" has no value and if an
implementation supports this attribute, but an administrator has not
configured the printer to have a text value. limit.

The following table specifies the integer values for the value-tag

   Tag Value (Hex)   Meaning

   0x20              reserved
   0x21              integer
   0x22              boolean
   0x23              enum
   0x24-0x2F         reserved for future integer types

NOTE: 0x20 is reserved for "generic integer" if should ever be needed.

The following table specifies the octetString values for the value-tag

   Tag Value (Hex)   Meaning

   0x30              octetString with an  unspecified format
   0x31              dateTime
   0x32              resolution
   0x33              rangeOfInteger
   0x34              reserved for dictionary (in the future)
   0x35-0x3F
   0x35              textWithLanguage
   0x36              nameWithLanguage
   0x37-0x3F         reserved for future octetString types

The following table specifies the character-string values for the value-
tag

   Tag Value (Hex)   Meaning

   0x40              reserved
   0x41              text
   0x42              name
   0x43              reserved
   0x44              keyword
   0x45              uri
   0x46              uriScheme
   0x47              charset
   0x48              naturalLanguage
   0x49              mimeMediaType
   0x4A-0x5F         reserved for future character string types

Moore and Turner         Expires June 19, 1998

NOTE: 0x40 is reserved for "generic character-string" if should ever be
needed.

Moore and Turner          Expires May 7, 1998

The values 0x60-0xFF are reserved for future types. There are no values
allocated for private extensions. A new type must be registered via the
type 2 process.

3.7

3.8 Name-Lengths

The name-length field SHALL consist of a SIGNED-SHORT. This field SHALL
specify the number of octets in the name field which follows the name-
length field, excluding the two bytes of the name-length field.

If a name-length field has a value of zero, the following name field
SHALL be empty, and the following value SHALL be treated as an
additional value for the preceding attribute. Within an attribute-
sequence, if two attributes have the same name, the first occurrence
SHALL be ignored. The zero-length name is the only mechanism for multi-
valued attributes.

3.8

3.9 Mapping of Attribute  Names

Some attributes are encoded in a special position.  These attribute are:

  .  "printer-uri": The When the target is a printer and the transport is
     HTTP or HTTP (for TLS), the target printer-uri of defined in  each
     operation in the IPP model document SHALL be an operation attribute
     called "printer-uri" and it SHALL also be specified outside of  the
     operation layer as the request-URI on the Request-Line at the HTTP
     level.  This
  .  "job-uri": The When the target is a job and the transport is HTTP or
     HTTPS (for TLS), the target job-uri of each operation in the IPP
     model document SHALL be an operation attribute called "job-uri" and
     it SHALL also be specified outside of  the operation layer as the
     request-URI on the Request-Line at the HTTP level.
  .   "document-content": The attribute named "document-content" in the
     IPP model document SHALL become the "data" in the operation layer.
  .  "status-code": The attribute named "status-code" in the IPP model
     document SHALL become the "status-code" field in the operation
     layer response. It SHALL NOT appear as an operation attribute.

The model document arranges the remaining attributes into groups for
each operation request and response. Each such group SHALL be
represented in the protocol by an xxx-attribute-sequence preceded by the
appropriate xxx-attributes-tag (See the table below and Appendix B:
Mapping of Each Operation in the Encoding). Error! Reference
source not found.). In addition, the order of these xxx-attributes-tags
and xxx-attribute-sequences in the protocol SHALL be the same as in the
model document, but the order of attributes within each xxx-attribute-sequence xxx-attribute-
sequence SHALL be unspecified. The table below maps the model document
group name to xxx-attributes-sequence

Model Document Group           xxx-attributes-sequence

Moore and Turner         Expires June 19, 1998

Operation Attributes           operations-attributes-sequence
Job Template Attributes        job-attributes-sequence
Job Object Attributes          job-attributes-sequence
Unsupported Attributes         unsupported-job-attributes-sequence         unsupported- attributes-sequence
Requested Attributes (Get-     job-attributes-sequence
Attributes of job object)

Moore and Turner          Expires May 7, 1998
Job-Attributes)
Requested Attributes (Get-     printer-attributes-sequence
Attributes of printer object)
Printer-Attributes)
Document Content               in a special position as described above
ISSUE: coordinate this with the model document.

If an operation contains attributes from more than one job object (e.g.
Get-Jobs response), the attributes from each job object SHALL be in a
separate job-attribute-sequence, such that the attributes from the ith
job object are in the ith job-attribute-sequence. See  Section 11
"Appendix B: Mapping of Each Operation in the Encoding" Error!
Reference source not found. "Error! Reference source not found." for
table showing the application of the rules above.

3.9

3.10 Value Lengths

Each attribute value SHALL be preceded by a SIGNED-SHORT which SHALL
specify the number of octets in the value which follows this length,
exclusive of the two bytes specifying the length.

For any of the types represented by binary signed integers, the sender
MUST encode the value in exactly four octets..

For any of the types represented by character-strings, the sender MUST
encode the value with all the characters of the string and without any
padding characters.

If a value-tag contains an "out-of-band" value which is not
compoundValue, value, such as "unsupported",
the value-length SHALL be 0 and the value empty " the value has no
meaning when the value-tag has an "out-of-band" value. If a printer or client
receives an operation a response with a nonzero value-length in this case, it SHALL
ignore the value field.

3.10 If a printer receives a request with a nonzero
value-length in this case, it SHALL reject the request.

3.11 Mapping of Attribute Values

The syntax types and most of the details of their representation are
defined in the IPP model document. The table below augments the
information in the model document, and defines the syntax types from the
model document in terms of the 5 basic types defined in section 3
Encoding of  the Operation Layer. The 5 types are US-ASCII-STRING,
LOCALIZED-STRING, SIGNED-INTEGER, SIGNED-SHORT, SIGNED-BYTE, and OCTET-
STRING.

   Syntax of        Encoding
   Attribute Value

   text, name       LOCALIZED-STRING.
                    The override natural language mechanism

Moore and Turner         Expires June 19, 1998
   Syntax of        Encoding
   Attribute Value

   textWithLanguage OCTET"STRING consisting of 4 fields:
                     a) a SIGNED-SHORT which is
                    encoded by syntactically preceding the text or
                    name value by two values: first number of octets
                        in the following field
                     b) a value of type
                    compoundValue whose value natural-language,
                     c) a SIGNED-SHORT which is 2 and second the number of octets
                        in the following field,
                     d) a value of type naturalLanguage whose text.
                    The length of  a textWithLanguage value is SHALL be
                    4 + the
                    language override. From a protocol syntax view,

Moore and Turner          Expires May 7, 1998
   Syntax value of        Encoding
   Attribute Value

                    there are three separate values: the
                    compoundValue, field a + the naturalLanguage value and the
                    text or name value, but from of field c.
   nameWithLanguage OCTET"STRING consisting of 4 fields:
                     a) a semantic view, SIGNED-SHORT which is the
                    Printer treats them as a single value where number of octets
                        in the
                    naturalLanguage following field
                     b) a value overrides of type natural-language,
                     c) a SIGNED-SHORT which is the language number of octets
                        in the immediately following text or name field
                     d) a value in
                    the attribute. of type name.
                    The override applies to just length of  a nameWithLanguage value SHALL be
                    4 + the
                    text or name within value of field a + the compound value.  Other
                    text or name values needing an override must be
                    overridden with additional compoundValues. value of field c.
   charset,         US-ASCII-STRING
   naturalLanguage,
   mimeMediaType,
   keyword, uri,
   and uriScheme
   boolean          SIGNED-BYTE  where 0x00 is `false' and 0x01 is
                    `true'
   integer and enum a SIGNED-INTEGER
   compoundValue    a SIGNED-INTEGER with a special meaning.
                    If the value of a compoundValue is n, then the n
                    following values of the attribute form a single
                    value whose type is that of the last member of
                    the compound value.  For example, if an attribute
                    has 3 successive values: compoundValue of 2,
                    naturalLanguage of `fr-CA' and name of `chien',
                    then these three "values" form a single value
                    which is a name of  `chien' in Canadian French..
   dateTime         OCTET-STRING consisting of eleven octets whose
                    contents are defined by "DateAndTime" in RFC 1903
                    [rfc1903]. Although RFC 1903 also defines an
                    eight octet format which omits the time zone, a
                    value of this type in the IPP protocol MUST use
                    the eleven octet format. [ transfer to model].
   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 unts units
                    value.
   rangeOfInteger   Eight octets consisting of 2 SIGNED-INTEGERs. The
                    first SIGNED-INTEGERs contains the lower bound
                    and the second SIGNED-INTEGERs 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

Moore and Turner          Expires May 7, 1998

The type of the value in the model document determines the encoding in
the value and the value of the value-tag.

3.11

Moore and Turner         Expires June 19, 1998

3.12 Data

The data part SHALL include any data required by the operation

4. Encoding of Transport Layer

HTTP/1.1 shall be the transport layer for this protocol.

The operation layer has been designed with the assumption that the
transport layer contains the following information:

  .  the URI of the target job or printer operation
  .  the total length of the data in the operation layer, either as a
     single length or as a sequence of chunks each with a length.

It is REQUIRED that a printer support HTTP over port 80, though a
printer may support HTTP over port 516 or some other port.  In addition, a
printer may have to support another port for secure connections. privacy (See Section 5
"Security Considerations".

Note: Consistent with RFC 2068 (HTTP/1.1), HTTP URI's for IPP implicitly
reference port 80. If a URI references some other port, the port number
must be explicitly specified in the URI.

Each HTTP operation shall use the POST method where the request-URI is
the object target of the operation, and where the "Content-Type" of the
message-body in each request and response shall be "application/ipp".
The message-body shall contain the operation layer and shall have the
syntax described in section 3.2 "Syntax of Encoding". A client
implementation SHALL adhere to the rules for a client described in RFC
2068 [rfc2068]. A printer (server) implementation SHALL adhere the rules
for an origin server described in RFC 2068.In 2068.

The IPP layer doesn't have to deal with chunking.  In the following sections,
there are a tables context of all CGI
scripts, the HTTP layer removes any chunking information in the received
data.

A client SHALL NOT expect a response from an IPP server until after the
client has sent the entire response.  But a client MAY listen for an
error response that an IPP server MAY send before it receives all the
data.  In this case a client, if chunking the data, can send a premature
zero-length chunk to end the request before sending all the data. If the
request is blocked for some reason, a client MAY determine the reason by
opening another connection to query the server.

In the following sections, there are a tables of all HTTP headers which
describe their use in an IPP client or server.  The following is an
explanation of each column in these tables.

  .  the "header" column contains the name of a header
  .  the "request/client" column indicates whether a client sends the
     header.

Moore and Turner         Expires June 19, 1998
  .  the "request/ server" column indicates whether a server supports
     the header when received.
  .  the "response/ server" column indicates whether a server sends the
     header.
  .  the "response /client" column indicates whether a client supports
     the header when received.
  .  the "values and conditions" column specifies the allowed header
     values and the conditions for the header to be present in a
     request/response.

The table for "request headers" does not have columns for responses, and
the table for "response headers" does not have columns for requests.

Moore and Turner          Expires May 7, 1998

The following is an explanation of the values in the "request/client"
and "response/ server" columns.

  .  must: the client or server MUST send the header,
  .  must-if: the client or server MUST send the header when the
     condition described in the "values and conditions" column is met,
  .  may: the client or server MAY send the header
  .  not: the client or server SHOULD NOT send the header. It is not
     relevant to an IPP implementation.

The following is an explanation of the values in the "response/client"
and "request/ server" columns.

  .  must: the client or server MUST support the header,
  .  may: the client or server MAY support the header
  .  not: the client or server SHOULD NOT support the header. It is not
     relevant to an IPP implementation.

4.1 General Headers

The following is a table for the general headers.

ISSUE: an HTTP expert should review these tables for accuracy.

General-     Request         Response        Values and Conditions
Header

             Client   Server Server  Client

Cache-       must     not    must    not     "no-cache" only
Control
Connection   must-if  must   must-   must    "close" only. Both
                             if              client and server
                                             SHOULD keep a
                                             connection for the
                                             duration of a sequence
                                             of operations. The
                                             client and server MUST
                                             include this header

Moore and Turner         Expires June 19, 1998

General-     Request         Response        Values and Conditions
Header

             Client   Server Server  Client

                                             for the last operation
                                             in such a sequence.
Date         may      may    must    may     per RFC 1123 [rfc1123]
                                             from RFC 2068
Pragma`      must     not    must    not     "no-cache" only
Transfer-    must-if  must   must-   must    "chunked" only .
Encoding                     if              Header MUST be present
                                             if Content-Length is
                                             absent.
Upgrade      not      not    not     not
Via          not      not    not     not

Moore and Turner          Expires May 7, 1998

4.2 Request  Headers

The following is a table for the request headers.

Request-Header   Client    Server  Request Values and Conditions

Accept           may       must    "application/ipp" only.  This
                                   value is the default if the
                                   client omits it
Accept-Charset   not       not      Charset information is within
                                   the application/ipp entity
Accept-Encoding  may       must    empty and per RFC 2068 [rfc2068]
                                   and IANA registry for content-
                                   codings
Accept-Language  not       not     . language information is within
                                   the application/ipp entity
Authorization    must-if   must    per RFC 2068. A client MUST send
                                   this header when it receives a
                                   401 "Unauthorized" response and
                                   does not receive a  "Proxy-
                                   Authenticate" header.
From             not       not     per RFC 2068. Because RFC
                                   recommends sending this header
                                   only with the user's approval, it
                                   is not very useful
Host             must      must    per RFC 2068
If-Match         not       not
If-Modified-     not       not
Since
If-None-Match    not       not
If-Range         not       not
If-Unmodified-   not       not
Since

Moore and Turner         Expires June 19, 1998

Request-Header   Client    Server  Request Values and Conditions

Max-Forwards     not       not
Proxy-           must-if   not     per RFC 2068. A client MUST send
Authorization                      this header when it receives a
                                   401 "Unauthorized" response and a
                                   "Proxy-Authenticate" header.
Range            not       not
Referer          not       not
User-Agent       not       not

4.3 Response Headers

The following is a table for the request headers.

Response-      Server  Client   Response Values and Conditions
Header

Accept-Ranges  not     not
Age            not     not
Location       must-if may      per RFC 2068. When URI needs

Moore and Turner          Expires May 7, 1998

Response-      Server  Client   Response Values and Conditions
Header
                                redirection.
Proxy-         not     must     per RFC 2068
Authenticate
Public         may     may      per RFC 2068
Retry-After    may     may      per RFC 2068
Server         not     not
Vary           not     not
Warning        may     may      per RFC 2068
WWW-           must-if must     per RFC 2068. When a server needs to
Authenticate                    authenticate a client.

4.4 Entity  Headers

The following is a table for the entity headers.

Entity-Header  Request         Response        Values and Conditions

               Client  Server  Server   Client

Allow          not     not     not      not
Content-Base   not     not     not      not
Content-       may     must    must     must   per RFC 2068 and IANA
Encoding                                       registry for content
                                               codings.
Content-       not     not     not      not    Application/ipp
Language                                       handles language
Content-       must-if must    must-if  must   the length of the
Length                                         message-body per RFC
                                               2068. Header MUST be

Moore and Turner         Expires June 19, 1998

Entity-Header  Request         Response        Values and Conditions

               Client  Server  Server   Client

                                               present if Transfer-
                                               Encoding is absent..
Content-       not     not     not      not
Location
Content-MD5    may     may     may      may    per RFC 2068
Content-Range  not     not     not      not
Content-Type   must    must    must     must   "application/ipp"
                                               only
ETag           not     not     not      not
Expires        not     not     not      not
Last-Modified  not     not     not      not

5. Security Considerations

When utilizing HTTP 1.1

The IPP Model document defines an IPP implementation with "privacy" as a transport of IPP,
one that implements Transport Layer Security (TLS) Version 1.0. TLS
meets the security
considerations outlined in RFC 2068 [rfc2068] apply.  Specifically, requirements for IPP
servers can generate a 401 "Unauthorized" response code security with regards to request
client features such as
mutual authentication and privacy (via encryption). The IPP clients Model
document also outlines IPP-specific security considerations and should correctly respond
be the primary reference for security implications with regards to the
proper "Authorization" header.  Both Basic Authentication (RFC 2068) and

Moore and Turner          Expires May 7, 1998

Digest Authentication (RFC 2069) [rfc2069] flavors of authentication
SHALL be supported.
IPP protocol itself.

The server chooses which type(s) of authentication
to accept.  Digest Authentication is a more secure method, and is always
preferred to Basic Authentication.

For secure communication (privacy in particular), IPP SHOULD be run
using a secure communications channel. For this purpose it is the
intention to define standardization of Model document defines an IPP in combination implementation with Transport
Layer Security (TLS), currently under development in the IETF, when the
TLS specifications are agreed and on
"authentication" as one that implements the IETF standards track.

As an intercept solution standard way for secure communication,
transporting IPP messages within HTTP 1.1. , These include the Secure Socket
Layer 3.0  (SSL3) could be used, security
considerations outlined in the HTTP 1.1 standard document [rfc2068] and
Digest Authentication extension [rfc2069]..

The current HTTP infrastructure supports HTTP over TCP port 80. IPP
servers MUST offer IPP services using HTTP over this port. IPP servers
are free to advertise services over other ports, in addition to this
port, but TCP port 80 MUST minimally be warned that such supported for IPP-over-HTTP
services.

When IPP-over-HTTP-with-privacy implementations
may not be able to interoperate with a future standardized are deployed, these IPP and TLS
solution.  Appendix C gives some hints to implementors wanting to
implementations MUST use
SSL3 as intercept solution.

It is possible to combine the techniques, HTTP 1.1 client authentication
(either basic or digest) with a secure communications channel.  Together
the two are more secure than client authentication TCP port 443, and they perform user
authentication.   MUST advertise their IPP
service URI using an "HTTPS" URI scheme.

See further discussion of IPP security concepts in the model document
[ipp-mod].

6. Copyright

This document and translations References

[rfc822]                Crocker, D., "Standard for the Format of it may be copied and furnished to
others, ARPA
     Internet Text Messages", RFC 822, August 1982.

[rfc1123]       Braden, S., "Requirements for Internet Hosts -
     Application and derivative works that comment on or otherwise explain it or
assist in its implementation may be prepared, copied, published Support", RFC 1123, October, 1989,

Moore and
distributed, in whole or Turner         Expires June 19, 1998

[rfc1179]       McLaughlin, L. III, (editor), "Line Printer Daemon
     Protocol" RFC 1179, August 1990.

[rfc1630]       T. Berners-Lee, "Universal Resource Identifiers 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.

Moore and Turner          Expires May 7, 1998

7. References

[rfc822]                Crocker, D., "Standard for the Format of ARPA
     Internet Text Messages", RFC 822, August 1982.

[rfc1123]       Braden, S., "Requirements for Internet Hosts -
     Application and Support", RFC 1123, October, 1989,

[rfc1179]       McLaughlin, L. III, (editor), "Line Printer Daemon
     Protocol" RFC 1179, August 1990.

[rfc1630]       T. Berners-Lee, "Universal Resource Identifiers in WWW:
       A Unifying Syntax for the Expression WWW:
       A Unifying Syntax for the Expression of  Names and Addresses of
       Objects on the Network as used in the Word-Wide Web", RFC 1630,
       June 1994.

[rfc1759]       Smith, R., Wright, F., Hastings, T., Zilles, S., and
     Gyllenskog, J., "Printer MIB", RFC 1759, March 1995.

[rfc1738]       Berners-Lee, T., Masinter, L., McCahill, M. , "Uniform
     Resource Locators (URL)", RFC 1738, December, 1994.

[rfc1543]       Postel, J., "Instructions to RFC Authors", RFC 1543,
       October 1993.

[rfc1766]       H. Alvestrand, " Tags for the Identification of
       Languages", RFC 1766, March 1995.

[rfc1903}       J. Case, et al. "Textual Conventions for Version 2 of
       the Simple Network Management Protocol (SNMPv2)", RFC 1903,
       January 1996.

[rfc2046]       N. Freed & N. Borenstein, Multipurpose Internet Mail
       Extensions (MIME) Part Two: Media Types. November 1996.
       (Obsoletes RFC1521, RFC1522, RFC1590), RFC 2046.

[rfc2048]       N. Freed, J. Klensin & J. Postel.  Multipurpose Internet
       Mail Extension (MIME) Part Four: Registration Procedures.
       November 1996. (Format: TXT=45033 bytes) (Obsoletes RFC1521,
       RFC1522, RFC1590) (Also BCP0013), RFC 2048.

[rfc2068]       R Fielding, et al, "Hypertext Transfer Protocol "
       HTTP/1.1" RFC 2068, January 1997

[rfc2069]       J. Franks, et al, "An Extension to HTTP: Digest Access
       Authentication" RFC 2069, January 1997

[rfc2119]       S. Bradner, "Key words for use in RFCs to Indicate
       Requirement Levels", RFC 2119 , March 1997

[rfc2184]       N. Freed, K. Moore, "MIME Parameter Value and Encoded
       Word Extensions: Character Sets, Languages, and Continuations",
       RFC 2184, August 1997,

Moore and Turner          Expires May 7, 1998

[abnf]

[rfc2234]       D. Crocker et al., "Augmented BNF for Syntax
       Specifications: ABNF", draft-ietf-drums-abnf-04.txt. RFC 2234. November 1997.

[char] N. Freed, J. Postel:  IANA Charset Registration Procedures, Work
       in Progress (draft-freed-charset-reg-02.txt).

[dpa]  ISO/IEC 10175 Document Printing Application (DPA), June 1996.

Moore and Turner         Expires June 19, 1998

[iana] IANA Registry of Coded Character Sets:  ftp://ftp.isi.edu/in-
       notes/iana/assignments/character-sets

[ipp-req]       Wright, F. D., "Requirements for an Internet Printing
       Protocol:"

[ipp-mod]       Isaacson, S, deBry, R, Hastings, T, Herriot, R, Powell,
       P, "Internet Printing Protocol/1.0: Model and Semantics"

[ssl]  Netscape, The SSL Protocol, Version 3, (Text version 3.02)
       November 1996.

8.

7.        Author's Address

Robert Herriot (editor)             Paul Moore
Sun Microsystems Inc.               Microsoft
901 San Antonio Road, MPK-17        One Microsoft Way
Palo Alto, CA 94303                 Redmond, WA 98053

Phone: 650-786-8995                 Phone: 425-936-0908
Fax:     650-786-7077               Fax: 425-93MS-FAX
Email: robert.herriot@eng.sun.com   Email: paulmo@microsoft.com

Sylvan Butler                       Randy Turner
Hewlett-Packard                     Sharp Laboratories
11311 Chinden Blvd.                 5750 NW Pacific Rim Blvd
Boise, ID 83714                     Camas, WA 98607

Phone: 208-396-6000                 Phone: 360-817-8456
Fax:     208-396-3457               Fax: : 360-817-8436
Email: sbutler@boi.hp.com           Email: rturner@sharplabs.com

IPP Mailing List:  ipp@pwg.org
IPP Mailing List Subscription:  ipp-request@pwg.org
IPP Web Page:  http://www.pwg.org/ipp/

9.

8. Other Participants:

Chuck Adams - Tektronix             Harry Lewis - IBM
Ron Bergman - Data Products         Tony Liao - Vivid Image
Keith Carter - IBM                  David Manchala - Xerox
Angelo Caruso - Xerox               Carl-Uno Manros - Xerox

Moore and Turner          Expires May 7, 1998
Jeff Copeland - QMS                 Jay Martin - Underscore
Roger Debry - IBM                   Larry Masinter - Xerox
Lee Farrell - Canon                 Ira McDonald, Xerox
Sue Gleeson - Digital               Bob Pentecost - Hewlett-Packard
Charles Gordon - Osicom             Patrick Powell - SDSU
Brian Grimshaw - Apple              Jeff Rackowitz - Intermec
Jerry Hadsell - IBM                 Xavier Riley - Xerox
Richard Hart - Digital              Gary Roberts - Ricoh
Tom Hastings

Moore and Turner         Expires June 19, 1998

Tom Hastings - Xerox                Stuart Rowley - Kyocera
Stephen Holmstead                   Richard Schneider - Epson
Zhi-Hong Huang - Zenographics       Shigern Ueda - Canon
Scott Isaacson - Novell             Bob Von Andel - Allegro Software
Rich Lomicka - Digital              William Wagner - Digital Products
David Kellerman - Northlake         Jasper Wong - Xionics
Software
Robert Kline - TrueSpectra          Don Wright - Lexmark
Dave Kuntz - Hewlett-Packard        Rick Yardumian - Xerox
Takami Kurono - Brother             Lloyd Young - Lexmark
Rich Landau - Digital               Peter Zehler - Xerox
Greg LeClair - Epson                Frank Zhao - Panasonic
                                    Steve Zilles - Adobe

10.

9. Appendix A: Protocol Examples

10.1

9.1 Print-Job Request

The following is an example of a Print-Job request with job-name,
copies, and sides specified.

Octets                Symbolic Value       Protocol field

0x0100                1.0                  version
0x0002                PrintJob             operation
0x01                  start operation-     operation-attributestag
                      attributes
0x47                  charset type         value-tag
0x0012                                     name-length
attributes-charset    attributes-charset   name
0x0008                                     value-length
US-ASCII              US-ASCII             value
0x48                  natural-language     value-tag
                      type
0x001B                                     name-length
attributes-natural-   attributes-natural-  name
language              language
0x0005                                     value-length
en-US                 en-US                value
0x42                  name type            value-tag
0x0008                                     name-length
job-name              job-name             name
0x0006                                     value-length
foobar                foobar               value

Moore and Turner          Expires May 7, 1998

Octets                Symbolic Value       Protocol field
0x02                  start job-           job-attributes-tag
                      attributes
0x21                  integer type         value-tag
0x0005                                     name-length
copies                copies               name
0x0004                                     value-length
0x00000014            20                   value
0x44                  keyword type         value-tag

Moore and Turner         Expires June 19, 1998

Octets                Symbolic Value       Protocol field

0x0005                                     name-length
sides                 sides                name
0x0013                                     value-length
two-sided-long-edge   two-sided-long-edge  value
0x03                  start-data           data-tag                  end-of-attributes    end-of-attributes-tag
%!PS...               <PostScript>         data

10.2

9.2 Print-Job Response (successful)

Here is an example of a Print-Job response which is successful:

Octets           Symbolic Value   Protocol field

0x0100           1.0              version
0x0000           OK (successful)  status-code
0x01             start operation- operation-attributes-tag
                 attributes
0x47             charset type     value-tag
0x0012                            name-length
attributes-      attributes-      name
charset          charset
0x0008                            value-length
US-ASCII         US-ASCII         value
0x48             natural-language value-tag
                 type
0x001B                            name-length
attributes-      attributes-      name
natural-         natural-language
language
0x0005                            value-length
en-US            en-US            value
0x41             text type        value-tag
0x000E                            name-length
status-message   status-message   name
0x0002                            value-length
OK               OK               value
0x02             start job-       job-attributes-tag
                 attributes
0x21             integer          value-tag
0x0007                            name-length
job-id           job-id           name
0x0004                            value-length

Moore and Turner          Expires May 7, 1998

Octets           Symbolic Value   Protocol field
147              147              value
0x45             uri type         value-tag
0x0008                            name-length
job-uri          job-uri          name
0x000E                            value-length
http://foo/123   http://foo/123   value
0x25             name type        value-tag
0x0008                            name-length

Moore and Turner         Expires June 19, 1998

Octets           Symbolic Value   Protocol field

job-state        job-state        name
0x0001                            value-length
0x03             pending          value
0x03             start-data       data-tag

10.3             end-of-          end-of-attributes-tag
                 attributes

9.3 Print-Job Response (failure)

Here is an example of a Print-Job response which fails because the
printer does not support sides and because the value 20 for copies is
not supported:

Octets           Symbolic Value           Protocol field

0x0100           1.0                      version
0x0400           client-error-bad-request status-code
0x01             start operation-         operation-attribute tag
                 attributes
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                        attributes-natural-
language
0x0005                                    value-length
en-US            en-US                    value
0x41             text type                value-tag
0x000E                                    name-length
status-message   status-message           name
0x000D                                    value-length
bad-request      bad-request              value
0x04             start unsupported-job-   unsupported-job- unsupported-       unsupported- attributes-
                 attributes               attributes-tag               tag
0x21             integer type             value-tag
0x000C                                    name-length
job-k-octets     job-k-octets             name
0x0004                                    value-length
0x001000000      16777216                 value
0x21             integer type             value-tag
0x0005                                    name-length
copies           copies                   name
0x0004                                    value-length
0x00000014       20                       value
0x10             unsupported  (type)      value-tag
0x0005                                    name-length

Moore and Turner         Expires May 7, June 19, 1998

Octets           Symbolic Value           Protocol field

0x10             unsupported  (type)      value-tag
0x0005                                    name-length

sides            sides                    name
0x0000                                    value-length
0x03             start-data               data-tag

10.4             end-of-attributes        end-of-attributes-tag

9.4 Print-URI Request

The following is an example of Print-URI request with copies and job-
name parameters.

Octets              Symbolic Value      Protocol field
0x0100              1.0                 version
0x0003              Print-URI           operation
0x01                start operation-    operation-attributes-tag
                    attributes
0x47                charset type        value-tag
0x0012                                  name-length
attributes-charset  attributes-charset  name
0x0008                                  value-length
US-ASCII            US-ASCII            value
0x48                natural-language    value-tag
                    type
0x001B                                  name-length
attributes-natural- attributes-         name
language            natural-language
0x0005                                  value-length
en-US               en-US               value
0x45                uri type            value-tag
0x000A                                  name-length
document-uri        document-uri        name
0x11                                    value-length
ftp://foo.com/foo   ftp://foo.com/foo   value
0x42                name type           value-tag
0x0008                                  name-length
job-name            job-name            name
0x0006                                  value-length
foobar              foobar              value
0x02                start job-          job-attributes-tag
                    attributes
0x21                integer type        value-tag
0x0005                                  name-length
copies              copies              name
0x0004                                  value-length
0x00000001          1                   value
0x03                start-data          data-tag                end-of-attributes   end-of-attributes-tag
%!PS...             <PostScript>        data

Moore and Turner          Expires May 7, 1998

10.5

9.5 Create-Job Request

The following is an example of Create-Job request with no parameters and
no attributes

Moore and Turner         Expires June 19, 1998

Octets       Symbolic Value   Protocol field
0x0100       1.0              version
0x0005       Create-Job       operation
0x01         start            operation-attributes-tag
             operation-
             attributes
0x47         charset type     value-tag
0x0012                        name-length
attributes-  attributes-      name
charset      charset
0x0008                        value-length
US-ASCII     US-ASCII         value
0x48         natural-         value-tag
             language type
0x001B                        name-length
attributes-  attributes-      name
natural-     natural-
language     language
0x0005                        value-length
en-US        en-US            value
0x03         start-data       data-tag

10.6         end-of-          end-of-attributes-tag
             attributes

9.6 Get-Jobs Request

The following is an example of Get-Jobs request with parameters but no
attributes.

Octets                Symbolic Value       Protocol field
0x0100                1.0                  version
0x000A                Get-Jobs             operation
0x01                  start operation-     operation-attributes-
                      attributes           tag
0x47                  charset type         value-tag
0x0012                                     name-length
attributes-charset    attributes-charset   name
0x0008                                     value-length
US-ASCII              US-ASCII             value
0x48                  natural-language     value-tag
                      type
0x001B                                     name-length
attributes-natural-   attributes-natural-  name
language              language
0x0005                                     value-length
en-US                 en-US                value
0x21                  integer type         value-tag
0x0005                                     name-length
limit                 limit                name
0x0004                                     value-length
0x00000032            50                   value

Moore and Turner          Expires May 7, 1998

Octets                Symbolic Value       Protocol field
0x44                  keyword type         value-tag
0x0014                                     name-length
requested-attributes  requested-attributes name
0x0006                                     value-length

Moore and Turner         Expires June 19, 1998

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                  start-data           data-tag

10.7                  end-of-attributes    end-of-attributes-tag

9.7 Get-Jobs Response

The following is an of Get-Jobs response from previous request with 3
jobs. The Printer returns no information about the second job.

Octets            Symbolic Value        Protocol field
0x0100            1.0                   version
0x0000            OK (successful)       status-code
0x01              start operation-      operation-attribute-tag
                  attributes
0x47              charset type          value-tag
0x0012                                  name-length
attributes-       attributes-charset    name
charset
0x0008                                  value-length
ISO-8859-1        ISO-8859-1            value
0x48              natural-language      value-tag
                  type
0x001B                                  name-length
attributes-       attributes-natural-   name
natural-language  language
0x0005                                  value-length
en-US             en-US                 value
0x41              text type             value-tag
0x000E                                  name-length
status-message    status-message        name
0x0002                                  value-length
OK                OK                    value
0x02              start job-attributes  job-attributes-tag
                  (1st  object)
0x48              natural-language      value-tag
                  type
0x001B                                  name-length
attributes-       attributes-natural-   name
natural-language  language
0x0005                                  value-length
fr-CA             fr-CA                 value
0x21              integer type          value-tag
0x0006                                  name-length
job-id            job-id                name
0x0004                                  value-length
147               147                   value

Moore and Turner         Expires May 7, June 19, 1998

Octets            Symbolic Value        Protocol field
0x42              name type             value-tag
0x0008                                  name-length
job-name          job-name              name
0x0003                                  name-length
fou               fou                   name
0x02              start job-attributes  job-attributes-tag
                  (2nd object)
0x02              start job-attributes  job-attributes-tag
                  (3rd object)
0x21              integer type          value-tag
0x0006                                  name-length
job-id            job-id                name
0x0004                                  value-length
148               148                   value
0x13              compoundValue
0x35              nameWithLanguage      value-tag
0x0008                                  name-length
job-name          job-name              name
0x0004
0x0012                                  value-length
0x0002            2                     value (number of values)
0x48              naturalLanguage       value-tag
0x0000            multi-value marker    name-length
0x0005                                  value-length                                  sub-value-length
de-CH             de-CH                 value
0x42              name type             value-tag
0x0000            multi-value marker    name-length
0x0003                                  name-length
0x0009                                  sub-value-length
isch guet         isch guet             name
0x03              start-data            data-tag

11.              end-of-attributes     end-of-attributes-tag

10. Appendix B: Mapping of Each Operation in the Encoding

The next three tables show the results of applying the rules above Hints to
the operations defined in the implementors using IPP with SSL3

WARNING: Clients and IPP objects using intermediate secure connection
protocol solutions such as IPP model document. There is no
information in these tables that cannot be derived from the rules
presented combination with Secure Socket Layer
Version 3 (SSL3), which are developed in Section 3.8 "Mapping advance of Attribute  Names".

The following table shows IPP and TLS
standardization, might not be interoperable with IPP and TLS standards-
conforming clients and IPP objects.

An assumption is that the mapping of all URI for a secure IPP model-document request
attributes to an appropriate xxx-attribute-sequence Printer object has been
found by means outside the IPP printing protocol, via a directory
service, web site or special position other means.

IPP provides a transparent connection to SSL by calling the
corresponding URL (a https URI connects by default to port 443).
However, the following functions can be provided to ease the integration
of IPP with SSL during implementation.

connect (URI), returns a status.

  "connect" makes an https call and returns the immediate status of
  the connection as returned by SSL to the user. The status values are
  explained in section 5.4.2 of the protocol. SSL document [ssl].

  A session-id may also be retained to later resume a session.  The table below shows SSL
  handshake protocol may also require the attributes for operations cipher specifications
  supported by the client, key length of the ciphers, compression
  methods, certificates, etc. These should  be sent to a Printer
URI.

Operation        operation       job attributes  special position
                 attributes

Print-Job        attributes-     job-template    document-content
                 charset         attributes
                 attributes-
                 natural-
                 language
                 job-name

Moore the server and Turner          Expires May 7, 1998

Operation        operation       job attributes  special position
                 attributes

                 document-name
                 ipp-attribute-
                 fidelity

                 document-
                 natural-
                 language
Create-Job or    attributes-     job-template
Validate-Job     charset         attributes
                 attributes-
                 natural-
                 language job-
                 name
                 ipp-attribute-
                 fidelity
Print-URI        attributes-     job-template
                 charset         attributes
                 attributes-
                 natural-
                 language job-
                 name
                 ipp-attribute-
                 fidelity
                 document-uri

                 document-
                 natural-
                 language
Send-Document    attributes-                     document-content
                 charset
                 attributes-
                 natural-
                 language job-id
                 last-document
                 document-name

                 document-
                 natural-
                 language
Send-URI         attributes-
                 charset
                 attributes-
                 natural-
                 language job-id
                 last-document
                 document-name
                 document-uri

                 document-
                 natural-
  hence should be available to the IPP client (although as part of
  administration features).

Moore and Turner         Expires May 7, June 19, 1998

Operation        operation       job attributes  special position
                 attributes

                 language
Cancel-Job       attributes-
                 charset
                 attributes-
                 natural-
                 language job-id
                 message
Get-Attributes   attributes-
(for a Printer)  charset
                 attributes-
                 natural-
                 language
                 requested-
                 attributes
                 document-format
Get-Attributes   attributes-
(for

disconnect (session)

  to disconnect a Job)      charset
                 attributes-
                 natural-
                 language job-id
                 requested-
                 attributes
Get-Jobs         attributes-
                 charset
                 attributes-
                 natural-
                 language limit
                 requested-
                 attributes
                 which-jobs particular session.

  The table below shows session-id available from the attributes for operations sent "connect" could be used.

resume (session)

  to reconnect using a Job URI.

Operation        operation       job attributes  special position
                 attributes

Send-Document    attributes-                     document-content
                 charset
                 attributes-
                 natural-
                 language last-
                 document
                 document-name

                 document-
                 natural-
                 language
Send-URI         attributes-
                 charset

Moore previous session-id.

The availability of this information as administration features are left
for implementors, and Turner          Expires May 7, 1998

Operation        operation       job attributes  special position
                 attributes

                 attributes-
                 natural-
                 language last-
                 document
                 document-name
                 document-uri

                 document-
                 natural-
                 language
Cancel-Job       attributes-
                 charset
                 attributes-
                 natural-
                 language
                 message
Get-Attributes   attributes-
(for need not be standardized at this time

11. Appendix C: Registration of MIME Media Type Information for
"application/ipp"

This appendix contains the information that IANA requires for
registering a Job)      charset
                 attributes-
                 natural-
                 language
                 requested-
                 attributes MIME media type.  The information following two tables shows this paragraph
will be forwarded to IANA to register application/ipp whose contents are
defined in Section 3 "Encoding of  the mapping Operation Layer"  in this
document.

MIME type name: application

MIME subtype name: ipp

A Content-Type of all IPP model-document
response attributes to "application/ipp" indicates an appropriate xxx-attribute-sequence Internet Printing
Protocol message body (request or special
position response). Currently there is one
version: IPP/1.0, whose syntax is described in Section 3 "Encoding of
the protocol. Operation      operation     job-         unsupported-job-   special
               attributes    attributes   attributes         position

Print-Job,     attributes-   job-id       unsupported        status-
Print-URI,     charset       job-uri      attributes         code
Create-Job,    attributes-    job-state
Send-Document  natural-      job-state-
or Send-URI    language      reasons
               status-       job-state-
               message       message
                             number-of-
                             intervening
                             -jobs

Validate-Job   attributes-                unsupported        status-
               charset                    attributes         code
               attributes-
               natural-
               language
               status- Layer"  of [IPP-PRO], and whose semantics are described in
[IPP-MOD]

Required parameters:  none

Optional parameters:  none

Encoding considerations:

IPP/1.0 protocol requests/responses MAY contain long lines and ALWAYS
contain binary data (for example attribute value lengths).

Security considerations:

IPP/1.0 protocol requests/responses do not introduce any security risks
not already inherent in the underlying transport protocols. Protocol
mixed-version interworking rules in [IPP-MOD] as well as protocol
encoding rules in [IPP-PRO] are complete and unambiguous.

Interoperability considerations:

IPP/1.0 requests (generated by clients) and responses (generated by
servers) MUST comply with all conformance requirements imposed by the
normative specifications [IPP-MOD] and [IPP-PRO]. Protocol encoding

Moore and Turner         Expires May 7, June 19, 1998

Operation      operation     job-         unsupported-job-   special
               attributes    attributes   attributes         position

               message

Note: the unsupported-job-attributes

rules specified in [IPP-PRO] are present only if the client
included some job attributes comprehensive, so that interoperability
between conforming implementations is guaranteed (although support for
specific optional features is not ensured). Both the Printer doesn't support.

Note:  the job-attributes are present only if the server returns the
status code "charset" and
"natural-language" of successful-ok all IPP/1.0 attribute values of syntax "text" or successful-ok-ignored-or-substituted-
attributes.

Operation      operation     job-         printer-      special
               attributes    attributes   attributes    position

Cancel-Job     attributes-
               charset
               attributes-
               natural-
               language
               status-                                                               status-code
               message

Get-Attributes attributes-   requested                  status-code
(of a job)     charset       attributes
               attributes-
               natural-
               language
               status-
               message

Get-Attributes attributes-                requested     status-code
(of a printer) charset                    attributes
               attributes-
               natural-
               language
               status-
"name" are explicit within IPP protocol requests/responses (without
recourse to any external information in HTTP, SMTP, or other message

Get-Jobs       attributes-   requested                  status-code
               charset       attributes
               attributes-
transport headers).

Published specification:

[IPP-MOD] R. deBry, T. Hastings, R. Herriot, S. Isaacson, P. Powell,
"Internet Printing Protocol/1.0: Model and Semantics", work in progress
<draft-ietf-ipp-model-08.txt>, December 1997.

[IPP-PRO] R. Herriot , S. Butler, P. Moore, R. Turner, "Internet
Printing Protocol/1.0: Protocol Specification", work in progress <draft-
ietf-ipp-protocol-04.txt>, December 1997.

Applications which use this media type:

Internet Printing Protocol (IPP) print clients and print servers,
communicating using HTTP/1.1 (see the
               natural-      Note below)
               language
               status-
               message

Note [IPP-PRO]), SMTP/ESMTP, FTP, or other
transport protocol. Messages of type "application/ipp" are self-
contained and transport-independent, including "charset" and "natural-
language" context for Get-Jobs: there is a separate job-attribute-sequence containing
requested-attributes any "text" or "name" attributes.

Person & email address to contact for each job object in the response further information:

Scott A. Isaacson
Novell, Inc.
122 E 1700 S
Provo, UT 84606

Phone: 801-861-7366
Fax: 801-861-4025
Email: sisaacson@novell.com

or

Robert Herriot
Sun Microsystems Inc.
901 San Antonio Road, MPK-17
Palo Alto, CA 94303

Phone: 650-786-8995
Fax: 650-786-7077
Email: robert.herriot@eng.sun.com

Intended usage:

COMMON

Moore and Turner         Expires May 7, June 19, 1998

12. Appendix C: Hints to implementors using IPP with SSL3

WARNING: Clients D: Full Copyright Statement

Copyright (C)The Internet Society (1997). All Rights Reserved

This document and IPP objects using intermediate secure connection
protocol solutions such as IPP in combination with Secure Socket Layer
Version 3 (SSL3), which are developed in advance translations of IPP and TLS
standardization, might not it may be interoperable with IPP copied and TLS standards-
conforming clients furnished to
others, and IPP objects.

An assumption is derivative works that the URI for a secure IPP Printer object has been
found by means outside the IPP printing protocol, via a directory
service, web site comment on or other means.

IPP provides a transparent connection to SSL by calling the
corresponding URL (a https URI connects by default to port 443).
However, the following functions can be provided to ease the integration
of IPP with SSL during implementation.

connect (URI), returns a status.

  "connect" makes an https call and returns the immediate status of
  the connection as returned by SSL to the user. The status values are
  explained otherwise explain it or
assist in section 5.4.2 its implementation may be prepared, copied, published and
distributed, in whole or in part, without restriction of any kind,
provided that the SSL above copyright notice and this paragraph are included
on all such copies and derivative works.  However, this document [ssl].

  A session-id itself
may also not be retained to later resume a session.  The SSL
  handshake protocol may also require the cipher specifications
  supported modified in any way, such as by removing the client, key length of the ciphers, compression
  methods, certificates, etc. These should  be sent to the server and
  hence should be available copyright notice
or references to the IPP client (although Internet Society or other Internet organizations,
except as part needed for the  purpose of
  administration features).

disconnect (session)

  to disconnect a particular session.

  The session-id available from developing Internet standards in
which case the "connect" could procedures for copyrights defined in the Internet
Standards process must be used.

resume (session) followed, or as required to reconnect using a previous session-id. translate it into
languages other than English.

The availability of this information as administration features limited permissions granted above are left
for implementors, perpetual and need will not be standardized at this time
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.

Moore and Turner         Expires May 7, June 19, 1998