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:
-----------------------------------------------
| value-tag | 1 byte
-----------------------------------------------
| name-length (value is u) | 2 bytes
-----------------------------------------------
| name | u bytes
-----------------------------------------------
| value-length (value is v) | 2 bytes
-----------------------------------------------
| value | v bytes
-----------------------------------------------
RFC 2565 IPP/1.0: Encoding and Transport April 1999
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:
-----------------------------------------------
| version-number | 2 bytes - required
-----------------------------------------------
| operation-id (request) |
| or | 2 bytes - required
| status-code (response) |
-----------------------------------------------
| request-id | 4 bytes - required
-----------------------------------------------------------
| tag (delimiter-tag or value-tag) | 1 byte |
----------------------------------------------- |-0 or more
| empty or rest of attribute | x bytes |
-----------------------------------------------------------
| end-of-attributes-tag | 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 [RFC2234] except 'strings of literals' MUST
be case sensitive. For example 'a' means lower case 'a' and not
upper case 'A'. In addition, SIGNED-BYTE and SIGNED-SHORT fields
are represented as '%x' values which show their range of values.
RFC 2565 IPP/1.0: Encoding and Transport April 1999
ipp-message = ipp-request / ipp-response
ipp-request = version-number operation-id request-id
=4= |