ptg10805159
798 Communicating with a Network Printer Chapter 21
77 /*
78 * Value Tags.
79 */
80 #define TAG_UNSUPPORTED 0x10 /* unsupported value */
81 #define TAG_UNKNOWN 0x12 /* unknown value */
82 #define TAG_NONE 0x13 /* no value */
83 #define TAG_INTEGER 0x21 /* integer */
84 #define TAG_BOOLEAN 0x22 /* boolean */
85 #define TAG_ENUM 0x23 /* enumeration */
86 #define TAG_OCTSTR 0x30 /* octetString */
87 #define TAG_DATETIME 0x31 /* dateTime */
88 #define TAG_RESOLUTION 0x32 /* resolution */
89 #define TAG_INTRANGE 0x33 /* rangeOfInteger */
90 #define TAG_TEXTWLANG 0x35 /* textWithLanguage */
91 #define TAG_NAMEWLANG 0x36 /* nameWithLanguage */
92 #define TAG_TEXTWOLANG 0x41 /* textWithoutLanguage */
93 #define TAG_NAMEWOLANG 0x42 /* nameWithoutLanguage */
94 #define TAG_KEYWORD 0x44 /* keyword */
95 #define TAG_URI 0x45 /* URI */
96 #define TAG_URISCHEME 0x46 /* uriScheme */
97 #define TAG_CHARSET 0x47 /* charset */
98 #define TAG_NATULANG 0x48 /* naturalLanguage */
99 #define TAG_MIMETYPE 0x49 /* mimeMediaType */
100 struct ipp_hdr {
101 int8_t major_version; /* always 1 */
102 int8_t minor_version; /* always 1 */
103 union {
104 int16_t op; /* operation ID */
105 int16_t st; /* status */
106 } u;
107 int32_t request_id; /* request ID */
108 char attr_group[1]; /* start of optional attributes group */
109 /* optional data follows */
110 };
111 #define operation u.op
112 #define status u.st
113 #endif /* _IPP_H */
[77 – 99] The value tags indicate the format of individual attributes and parameters.
They aredefined in Section 3.5.2 of RFC 2910.
[100 – 113] Wedefine the structureof an IPP header.Request messages start with the
same header as response messages, except that the operation ID in the
request is replaced by a status code in the response.
We end the header file with a#endifto match the#ifdefat the start of
the file.