3 * Routines for WAP Binary XML dissection
4 * Copyright 2003, 2004, Olivier Biot.
6 * Routines for WV-CSP 1.3 dissection
7 * Copyright 2007, Andrei Rubaniuk.
9 * Refer to the AUTHORS file or the AUTHORS section in the man page
10 * for contacting the author(s) of this file.
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * WAP Binary XML decoding functionality provided by Olivier Biot.
17 * WV-CSP 1.2 updated to Release version and WV-CSP 1.3 protocol
18 * decoding functionality provided by Andrei Rubaniuk.
20 * The WAP specifications used to be found at the WAP Forum:
21 * <http://www.wapforum.org/what/Technical.htm>
22 * But now the correct link is at the Open Mobile Alliance:
23 * <http://www.openmobilealliance.org/tech/affiliates/wap/wapindex.html>
24 * Media types defined by OMA affiliates will have their standards at:
25 * <http://www.openmobilealliance.org/tech/affiliates/index.html>
26 * <http://www.openmobilealliance.org/release_program/index.html>
28 * SPDX-License-Identifier: GPL-2.0-or-later
34 #include <epan/packet.h>
35 #include <epan/exceptions.h>
36 #include <epan/prefs.h>
37 #include <epan/expert.h>
38 #include <epan/proto_data.h>
39 #include <epan/strutil.h>
40 #include <epan/iana_charsets.h>
41 /* We need the function tvb_get_uintvar() */
42 #include "packet-wap.h"
44 void proto_register_wbxml(void);
45 void proto_reg_handoff_wbxml(void);
47 /* General-purpose debug logger.
48 * Requires double parentheses because of variable arguments of printf().
50 * Enable debug logging for WBXML by defining AM_FLAGS
51 * so that it contains "-DDEBUG_wbxml"
55 g_print("%s:%u: ", __FILE__, __LINE__); \
61 /* The code in this source file dissects the WAP Binary XML content,
62 * and if possible renders it. WBXML mappings are defined in the
63 * "wbxml_decoding" structure.
67 * - Some WBXML content is *not* backwards compatible across minor versions.
68 * This painful remark is true for:
69 * o WMLC 1.0 with respect to later WMLC 1.x
70 * o All WV-CSP versions (never backwards compatible)
71 * The only way of correctly rendering the WBXML is to let the end-user
72 * choose from the possible renderings. This only applies to the case when
73 * the WBXML DocType is not included in the WBXML header (unknown/missing).
75 * - Some WBXML content uses EXT_T_* in a non-tableref manner. This is the
76 * case with WV-CSP 1.1 and up, where the index points to a value_string
77 * containing WV-CSP specific token values. This is allowed as it is not
78 * explicitly forbidden in the WBXML specifications. Hence the global token
79 * map for content must also contain a function pointer if no tableref
82 * - Code page switches apply until a new code page switch. In the WBXML/1.x
83 * ABNF notation, it can be proven that the switch_page can only precede
84 * the following tokens:
85 * o stag : TAG | LITERAL | LITERAL_A | LITERAL_C | LITERAL_AC
86 * o attr : ATTRSTART | ATTRVALUE
87 * o extension : EXT_I | EXT_T | EXT
88 * Code page switches are displayed in a separate column.
90 * - The WBXML spec states that code pages are static to both the tag and the
91 * attribute state parser. A SWITCH_PAGE within a state switches the code
92 * page of the active state only. Note that code page 255 is reserved for
93 * application-specific (read: testing) purposes.
95 * - In order to render the XML content, recursion is inevitable at some
96 * point (when a tag with content occurs in the content of a tag with
97 * content). The code will however not recurse if this is not strictly
98 * required (e.g., tag without content in the content of a tag with
101 * - I found it useful to display the XML nesting level as a first "column",
102 * followed by the abbreviated WBXML token interpretation. When a mapping
103 * is defined for the parsed WBXML content, then the XML rendering is
104 * displayed with appropriate indentation (maximum nesting level = 255,
105 * after which the nesting and level will safely roll-over to 0).
107 * - The WAP Forum defines the order of precedence for finding out the
108 * WBXML content type (same rules for charset) as follows:
109 * 1. Look in the Content-Type WSP header
110 * 2. Look in the WBXML header
111 * Currently there is no means of using content type parameters:
113 * o Charset=<charset_of_the_content>
114 * So it is possible some WBXML content types are incorrectly parsed.
115 * This would only be the case when the content type declaration in the
116 * WSP Content-Type header would be different (or would have parameters
117 * which are relevant to the WBXML decoding) from the content type
118 * identifier specified in the WBXML header. This has to do with the
119 * decoding of terminated text strings in the different character codings.
120 * TODO: investigate this and provide correct decoding at all times.
124 /************************** Variable declarations **************************/
127 /* Initialize the protocol and registered fields */
128 static int proto_wbxml
;
129 static int hf_wbxml_version
;
130 static int hf_wbxml_public_id_known
;
131 static int hf_wbxml_public_id_literal
;
132 static int hf_wbxml_charset
;
133 static int hf_wbxml_string_table_item_offset
;
134 static int hf_wbxml_string_table_item_string
;
135 static int hf_wbxml_switch_page
;
136 static int hf_wbxml_known_tag
;
137 static int hf_wbxml_end_known_tag
;
138 static int hf_wbxml_end_known_tag_uint
;
139 static int hf_wbxml_str_i
;
140 static int hf_wbxml_str_t
;
141 static int hf_wbxml_opaque_data
;
142 static int hf_wbxml_entity
;
143 static int hf_wbxml_literal
;
144 static int hf_wbxml_ext_i
;
145 static int hf_wbxml_ext_t
;
146 static int hf_wbxml_extension_token
;
147 static int hf_wbxml_reserved_2
;
148 static int hf_wbxml_invalid_token
;
149 static int hf_wbxml_known_attrvalue
;
150 static int hf_wbxml_known_attrstart
;
151 static int hf_wbxml_end_literal_tag
;
152 static int hf_wbxml_literal_a
;
153 static int hf_wbxml_literal_c
;
154 static int hf_wbxml_literal_ac
;
155 static int hf_wbxml_end_pi
;
156 static int hf_wbxml_end_attribute_list
;
157 static int hf_wbxml_pi_xml
;
159 /* Initialize the subtree pointers */
160 static int ett_wbxml
;
161 static int ett_wbxml_str_tbl
;
162 static int ett_wbxml_content
;
163 static int ett_wbxml_tags
;
164 static int ett_wbxml_string_table_item
;
166 static expert_field ei_wbxml_data_not_shown
;
167 static expert_field ei_wbxml_content_type_not_supported
;
168 static expert_field ei_wbxml_content_type_disabled
;
169 static expert_field ei_wbxml_oversized_uintvar
;
170 static expert_field ei_wbxml_too_much_recursion
;
172 static dissector_handle_t wbxml_handle
;
174 /* WBXML Preferences */
175 static bool skip_wbxml_token_mapping
;
176 static bool disable_wbxml_token_parsing
;
179 typedef struct _value_valuestring
{
181 const value_string
*valstrptr
;
184 /* Tries to match val against each element in the value_value_string array vvs.
185 * Returns the associated value_string ptr on a match, or NULL on failure. */
186 static const value_string
*
187 val_to_valstr(uint32_t val
, const value_valuestring
*vvs
)
191 while (vvs
[i
].valstrptr
) {
192 if (vvs
[i
].value
== val
)
193 return vvs
[i
].valstrptr
;
200 /* Note on Token mapping
201 * ---------------------
203 * The WBXML dissector will try mapping the token decoding to their textual
204 * representation if the media type has a defined token representation. The
205 * following logic applies:
207 * a. Inspect the WBXML PublicID
208 * This means that I need a list { PublicID, decoding }
210 * b. Inspect the literal media type
211 * This requires a list { "media/type", discriminator, { decodings } }
213 * b.1. Use a discriminator to choose an appropriate token mapping;
214 * The disciminator needs a small number of bytes from the data tvbuff_t.
217 * b.2. Provide a list to the end-user with all possible token mappings.
219 * c. If none match then only show the tokens without mapping.
223 /* ext_t_func_ptr is a pointer to a function handling the EXT_T_i tokens:
225 * char * ext_t_function(tvbuff_t *tvb, uint32_t value, uint32_t strtbl);
227 typedef char * (* ext_t_func_ptr
)(tvbuff_t
*, uint32_t, uint32_t);
229 /* Note on parsing of OPAQUE data
230 * ------------------------------
232 * The WBXML encapsulation allows the insertion of opaque binary data in the
233 * WBXML body. Although this opaque data has no meaning in WBXML, the media
234 * type itself may define compact encoding of given input by encoding it in
235 * such a OPAQUE blob of bytes.
237 * The WBXML dissector now supports dissection of OPAQUE data by means of a
238 * mapping function that will operate based on the token (well-known or literal)
239 * and the active code page.
241 * For well-known tokens the simplest approach is to use a switch for the code
242 * pages and another switch for the relevant tokens within a code page.
244 * For literal tokens (tags and attribute names), the only approach is a string
245 * comparison with the literal representation of the given tag or attribute
248 * opaque_token_func_ptr is a pointer to a function handling OPAQUE values
249 * for binary tokens representing tags or attribute starts.
250 * opaque_literal_func_ptr is a pointer to a function handling OPAQUE values
251 * for literal tokens representing tags or attribute starts.
253 * The length field of the OPAQUE entry starts at offset (not offset + 1).
255 * The length of the processed OPAQUE value is returned by reference.
257 * char * opaque_token_function(tvbuff_t *tvb, uint32_t offset,
258 * uint8_t token, uint8_t codepage, uint32_t *length);
259 * char * opaque_literal_function(tvbuff_t *tvb, uint32_t offset,
260 * const char *token, uint8_t codepage, uint32_t *length);
262 typedef char * (* opaque_token_func_ptr
)(tvbuff_t
*, uint32_t, uint8_t, uint8_t, uint32_t *, packet_info
*);
263 typedef char * (* opaque_literal_func_ptr
)(tvbuff_t
*, uint32_t, const char *, uint8_t, uint32_t *, packet_info
*);
266 default_opaque_binary_tag(tvbuff_t
*tvb
, uint32_t offset
,
267 uint8_t token _U_
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
269 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
270 char *str
= wmem_strdup_printf(pinfo
->pool
, "(%u bytes of opaque data)", data_len
);
276 default_opaque_literal_tag(tvbuff_t
*tvb
, uint32_t offset
,
277 const char *token _U_
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
279 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
280 char *str
= wmem_strdup_printf(pinfo
->pool
, "(%u bytes of opaque data)", data_len
);
286 default_opaque_binary_attr(tvbuff_t
*tvb
, uint32_t offset
,
287 uint8_t token _U_
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
289 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
290 char *str
= wmem_strdup_printf(pinfo
->pool
, "(%u bytes of opaque data)", data_len
);
296 default_opaque_literal_attr(tvbuff_t
*tvb
, uint32_t offset
,
297 const char *token _U_
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
299 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
300 char *str
= wmem_strdup_printf(pinfo
->pool
, "(%u bytes of opaque data)", data_len
);
305 /* Render a hex %dateTime encoded timestamp as a string.
306 * 0x20011231123456 becomes "2001-12-31T12:34:56Z" */
308 date_time_from_opaque(wmem_allocator_t
*pool
, tvbuff_t
*tvb
, uint32_t offset
, uint32_t data_len
)
313 case 4: /* YYYY-MM-DD[T00:00:00Z] */
314 str
= wmem_strdup_printf(pool
, "%%DateTime: "
315 "%02x%02x-%02x-%02xT00:00:00Z",
316 tvb_get_uint8(tvb
, offset
),
317 tvb_get_uint8(tvb
, offset
+ 1),
318 tvb_get_uint8(tvb
, offset
+ 2),
319 tvb_get_uint8(tvb
, offset
+ 3));
321 case 5: /* YYYY-MM-DDThh[:00:00Z] */
322 str
= wmem_strdup_printf(pool
, "%%DateTime: "
323 "%02x%02x-%02x-%02xT%02x:00:00Z",
324 tvb_get_uint8(tvb
, offset
),
325 tvb_get_uint8(tvb
, offset
+ 1),
326 tvb_get_uint8(tvb
, offset
+ 2),
327 tvb_get_uint8(tvb
, offset
+ 3),
328 tvb_get_uint8(tvb
, offset
+ 4));
330 case 6: /* YYYY-MM-DDThh:mm[:00Z] */
331 str
= wmem_strdup_printf(pool
, "%%DateTime: "
332 "%02x%02x-%02x-%02xT%02x:%02x:00Z",
333 tvb_get_uint8(tvb
, offset
),
334 tvb_get_uint8(tvb
, offset
+ 1),
335 tvb_get_uint8(tvb
, offset
+ 2),
336 tvb_get_uint8(tvb
, offset
+ 3),
337 tvb_get_uint8(tvb
, offset
+ 4),
338 tvb_get_uint8(tvb
, offset
+ 5));
340 case 7: /* YYYY-MM-DDThh:mm[:00Z] */
341 str
= wmem_strdup_printf(pool
, "%%DateTime: "
342 "%02x%02x-%02x-%02xT%02x:%02x:%02xZ",
343 tvb_get_uint8(tvb
, offset
),
344 tvb_get_uint8(tvb
, offset
+ 1),
345 tvb_get_uint8(tvb
, offset
+ 2),
346 tvb_get_uint8(tvb
, offset
+ 3),
347 tvb_get_uint8(tvb
, offset
+ 4),
348 tvb_get_uint8(tvb
, offset
+ 5),
349 tvb_get_uint8(tvb
, offset
+ 6));
352 str
= wmem_strdup_printf(pool
, "<Error: invalid binary %%DateTime "
353 "(%u bytes of opaque data)>", data_len
);
360 /* Is ALWAYS 6 bytes long:
361 * 00YY YYYY YYYY YYMM MMDD DDDh hhhh mmmm mmss ssss ZZZZ ZZZZ */
363 wv_datetime_from_opaque(wmem_allocator_t
*pool
, tvbuff_t
*tvb
, uint32_t offset
, uint32_t data_len
)
367 uint8_t month
, day
, hour
, minute
, second
, time_zone
;
370 if (data_len
== 6) { /* Valid */
372 /* Octet 1: 00YY YYYY */
373 year
= tvb_get_uint8(tvb
, offset
) & 0x3F; /* ..11 1111 */
375 /* Octet 2: YYYY YYMM */
376 peek
= tvb_get_uint8(tvb
, offset
+ 1);
377 year
+= (peek
>> 2); /* 1111 11.. */
378 month
= (peek
& 0x03) << 2; /* .... ..11 */
379 /* Octet 3: MMDD DDDh */
380 peek
= tvb_get_uint8(tvb
, offset
+ 2);
381 month
+= (peek
>> 6); /* 11.. .... */
382 day
= (peek
& 0x3E) >> 1; /* ..11 111. */
383 hour
= (peek
& 0x01) << 4; /* .... ...1 */
384 /* Octet 4: hhhh mmmm */
385 peek
= tvb_get_uint8(tvb
, offset
+ 3);
387 minute
= (peek
& 0x0F) << 2; /* .... 1111 */
388 /* Octet 5: mmss ssss */
389 peek
= tvb_get_uint8(tvb
, offset
+ 4);
390 minute
+= (peek
>> 6); /* 11.. .... */
391 second
= peek
& 0x3F; /* ..11 1111 */
392 /* octet 6: ZZZZZZZZ */
393 time_zone
= tvb_get_uint8(tvb
, offset
+ 5);
394 /* Now construct the string */
395 str
= wmem_strdup_printf(pool
, "WV-CSP DateTime: "
396 "%04d-%02d-%02dT%02d:%02d:%02d%s",
397 year
, month
, day
, hour
, minute
, second
, format_char(pool
, time_zone
));
398 } else { /* Invalid length for a WV-CSP DateTime tag value */
399 str
= wmem_strdup_printf(pool
, "<Error: invalid binary WV-CSP DateTime value "
400 "(%u bytes of opaque data)>", data_len
);
405 /* WV-CSP integer values for tag content is encoded in a fashion similar
406 * to a Long-Integer in WSP */
408 wv_integer_from_opaque(wmem_allocator_t
*pool
, tvbuff_t
*tvb
, uint32_t offset
, uint32_t data_len
)
414 str
= wmem_strdup_printf(pool
, "WV-CSP Integer: %d",
415 tvb_get_uint8(tvb
, offset
));
418 str
= wmem_strdup_printf(pool
, "WV-CSP Integer: %d",
419 tvb_get_ntohs(tvb
, offset
));
422 str
= wmem_strdup_printf(pool
, "WV-CSP Integer: %d",
423 tvb_get_ntoh24(tvb
, offset
));
426 str
= wmem_strdup_printf(pool
, "WV-CSP Integer: %d",
427 tvb_get_ntohl(tvb
, offset
));
430 str
= wmem_strdup_printf(pool
, "<Error: invalid binary WV-CSP Integer value "
431 "(%u bytes of opaque data)>", data_len
);
439 wv_csp10_opaque_binary_tag(tvbuff_t
*tvb
, uint32_t offset
,
440 uint8_t token
, uint8_t codepage
, uint32_t *length
, packet_info
*pinfo
)
442 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
446 case 0: /* Common code page */
448 case 0x0B: /* <Code> */
449 case 0x0F: /* <ContentSize> */
450 case 0x1A: /* <MessageCount> */
451 case 0x3C: /* <Validity> */
452 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
453 offset
+ *length
, data_len
);
455 case 0x11: /* <DateTime> */
456 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
,
457 offset
+ *length
, data_len
);
463 case 1: /* Access code page */
465 case 0x1C: /* <KeepAliveTime> */
466 case 0x32: /* <TimeToLive> */
467 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
468 offset
+ *length
, data_len
);
474 case 3: /* Client capability code page */
476 case 0x06: /* <AcceptedContentLength> */
477 case 0x0C: /* <MultiTrans> */
478 case 0x0D: /* <ParserSize> */
479 case 0x0E: /* <ServerPollMin> */
480 case 0x11: /* <TCPAddress> */
481 case 0x12: /* <TCPPort> */
482 case 0x13: /* <UDPPort> */
483 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
484 offset
+ *length
, data_len
);
493 if (str
== NULL
) { /* Error, or not parsed */
494 str
= wmem_strdup_printf(pinfo
->pool
, "(%u bytes of unparsed opaque data)", data_len
);
502 wv_csp10_opaque_literal_tag(tvbuff_t
*tvb
, uint32_t offset
,
503 const char *token
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
505 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
508 if ( token
&& ( (strcmp(token
, "Code") == 0)
509 || (strcmp(token
, "ContentSize") == 0)
510 || (strcmp(token
, "MessageCount") == 0)
511 || (strcmp(token
, "Validity") == 0)
512 || (strcmp(token
, "KeepAliveTime") == 0)
513 || (strcmp(token
, "TimeToLive") == 0)
514 || (strcmp(token
, "AcceptedContentLength") == 0)
515 || (strcmp(token
, "MultiTrans") == 0)
516 || (strcmp(token
, "ParserSize") == 0)
517 || (strcmp(token
, "ServerPollMin") == 0)
518 || (strcmp(token
, "TCPAddress") == 0)
519 || (strcmp(token
, "TCPPort") == 0)
520 || (strcmp(token
, "UDPPort") == 0) ) )
522 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
524 else if ( token
&& ( strcmp(token
, "DateTime") == 0) )
526 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
529 if (str
== NULL
) { /* Error, or not parsed */
530 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
537 wv_csp11_opaque_binary_tag(tvbuff_t
*tvb
, uint32_t offset
,
538 uint8_t token
, uint8_t codepage
, uint32_t *length
, packet_info
*pinfo
)
540 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
544 case 0: /* Common code page */
546 case 0x0B: /* <Code> */
547 case 0x0F: /* <ContentSize> */
548 case 0x1A: /* <MessageCount> */
549 case 0x3C: /* <Validity> */
550 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
551 offset
+ *length
, data_len
);
553 case 0x11: /* <DateTime> */
554 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
,
555 offset
+ *length
, data_len
);
561 case 1: /* Access code page */
563 case 0x1C: /* <KeepAliveTime> */
564 case 0x32: /* <TimeToLive> */
565 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
566 offset
+ *length
, data_len
);
572 case 3: /* Client capability code page */
574 case 0x06: /* <AcceptedContentLength> */
575 case 0x0C: /* <MultiTrans> */
576 case 0x0D: /* <ParserSize> */
577 case 0x0E: /* <ServerPollMin> */
578 case 0x12: /* <TCPPort> */
579 case 0x13: /* <UDPPort> */
580 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
581 offset
+ *length
, data_len
);
587 case 6: /* Messaging code page */
589 case 0x1A: /* <DeliveryTime> - not in 1.0 */
590 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
,
591 offset
+ *length
, data_len
);
600 if (str
== NULL
) { /* Error, or not parsed */
601 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
609 wv_csp11_opaque_literal_tag(tvbuff_t
*tvb
, uint32_t offset
,
610 const char *token
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
612 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
615 if ( token
&& ( (strcmp(token
, "Code") == 0)
616 || (strcmp(token
, "ContentSize") == 0)
617 || (strcmp(token
, "MessageCount") == 0)
618 || (strcmp(token
, "Validity") == 0)
619 || (strcmp(token
, "KeepAliveTime") == 0)
620 || (strcmp(token
, "TimeToLive") == 0)
621 || (strcmp(token
, "AcceptedContentLength") == 0)
622 || (strcmp(token
, "MultiTrans") == 0)
623 || (strcmp(token
, "ParserSize") == 0)
624 || (strcmp(token
, "ServerPollMin") == 0)
625 || (strcmp(token
, "TCPPort") == 0)
626 || (strcmp(token
, "UDPPort") == 0) ) )
628 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
631 if ( token
&& ( (strcmp(token
, "DateTime") == 0)
632 || (strcmp(token
, "DeliveryTime") == 0) ) )
634 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
637 if (str
== NULL
) { /* Error, or not parsed */
638 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
646 wv_csp12_opaque_binary_tag(tvbuff_t
*tvb
, uint32_t offset
,
647 uint8_t token
, uint8_t codepage
, uint32_t *length
, packet_info
*pinfo
)
649 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
653 case 0: /* Common code page */
655 case 0x0B: /* <Code> */
656 case 0x0F: /* <ContentSize> */
657 case 0x1A: /* <MessageCount> */
658 case 0x3C: /* <Validity> */
659 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
660 offset
+ *length
, data_len
);
662 case 0x11: /* <DateTime> */
663 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
,
664 offset
+ *length
, data_len
);
670 case 1: /* Access code page */
672 case 0x1C: /* <KeepAliveTime> */
673 case 0x32: /* <TimeToLive> */
674 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
675 offset
+ *length
, data_len
);
681 case 3: /* Client capability code page */
683 case 0x06: /* <AcceptedContentLength> */
684 case 0x0C: /* <MultiTrans> */
685 case 0x0D: /* <ParserSize> */
686 case 0x0E: /* <ServerPollMin> */
687 case 0x12: /* <TCPPort> */
688 case 0x13: /* <UDPPort> */
689 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
690 offset
+ *length
, data_len
);
696 case 6: /* Messaging code page */
698 case 0x1A: /* <DeliveryTime> - not in 1.0 */
699 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
,
700 offset
+ *length
, data_len
);
706 case 9: /* Common code page (continued) */
708 case 0x08: /* <HistoryPeriod> - 1.2 only */
709 case 0x0A: /* <MaxWatcherList> - 1.2 only */
710 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
,
711 offset
+ *length
, data_len
);
720 if (str
== NULL
) { /* Error, or not parsed */
721 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
729 wv_csp12_opaque_literal_tag(tvbuff_t
*tvb
, uint32_t offset
,
730 const char *token
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
732 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
735 if ( token
&& ( (strcmp(token
, "Code") == 0)
736 || (strcmp(token
, "ContentSize") == 0)
737 || (strcmp(token
, "MessageCount") == 0)
738 || (strcmp(token
, "Validity") == 0)
739 || (strcmp(token
, "KeepAliveTime") == 0)
740 || (strcmp(token
, "TimeToLive") == 0)
741 || (strcmp(token
, "AcceptedContentLength") == 0)
742 || (strcmp(token
, "MultiTrans") == 0)
743 || (strcmp(token
, "ParserSize") == 0)
744 || (strcmp(token
, "ServerPollMin") == 0)
745 || (strcmp(token
, "TCPPort") == 0)
746 || (strcmp(token
, "UDPPort") == 0)
747 || (strcmp(token
, "HistoryPeriod") == 0)
748 || (strcmp(token
, "MaxWatcherList") == 0) ) )
750 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
753 if ( token
&& ( (strcmp(token
, "DateTime") == 0)
754 || (strcmp(token
, "DeliveryTime") == 0) ) )
756 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
759 if (str
== NULL
) { /* Error, or not parsed */
760 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
767 wv_csp13_opaque_binary_tag(tvbuff_t
*tvb
, uint32_t offset
,
768 uint8_t token
, uint8_t codepage
, uint32_t *length
, packet_info
*pinfo
)
770 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
775 case 0: /* Common code page */
778 case 0x0B: /* <Code> */
779 case 0x0F: /* <ContentSize> */
780 case 0x1A: /* <MessageCount> */
781 case 0x3C: /* <Validity> */
782 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
784 case 0x11: /* <DateTime> */
785 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
792 case 1: /* Access code page */
795 case 0x1C: /* <KeepAliveTime> */
796 case 0x25: /* <SearchFindings> */
797 case 0x26: /* <SearchID> */
798 case 0x27: /* <SearchIndex> */
799 case 0x28: /* <SearchLimit> */
800 case 0x32: /* <TimeToLive> */
801 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
808 case 3: /* Client capability code page */
811 case 0x06: /* <AcceptedContentLength> */
812 case 0x0C: /* <MultiTrans> */
813 case 0x0D: /* <ParserSize> */
814 case 0x0E: /* <ServerPollMin> */
815 case 0x12: /* <TCPPort> */
816 case 0x13: /* <UDPPort> */
817 /* New in WV-CSP 1.3*/
818 case 0x16: /* <AcceptedPullLength> */
819 case 0x17: /* <AcceptedPushLength> */
820 case 0x18: /* <AcceptedRichContentLength> */
821 case 0x19: /* <AcceptedTextContentLength> */
822 case 0x1B: /* <PlainTextCharset> MIBenum number - character set, i.e. UTF-8, windows-1251, etc. */
823 case 0x1C: /* <SessionPriority> */
824 case 0x1F: /* <UserSessionLimit> */
825 case 0x21: /* <MultiTransPerMessage> */
826 case 0x24: /* <ContentPolicyLimit> */
827 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
834 case 5: /* Presence attribute code page */
837 /* New in WV-CSP 1.3*/
838 /* case 0x3B: */ /* <ClientContentLimit> */
839 case 0x3C: /* <ClientIMPriority> */
840 case 0x3D: /* <MaxPullLength> */
841 case 0x3E: /* <MaxPushLength> */
842 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
849 case 6: /* Messaging code page */
852 case 0x1A: /* <DeliveryTime> - not in 1.0 */
853 /* New in WV-CSP 1.3*/
854 case 0x1C: /* <AnswerOptionID> */
855 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
862 case 9: /* Common code page (continued) */
865 case 0x08: /* <HistoryPeriod> - 1.2 only */
866 case 0x0A: /* <MaxWatcherList> - 1.2 only */
867 /* New in WV-CSP 1.3*/
868 case 0x25: /* <SegmentCount> */
869 case 0x28: /* <SegmentReference> */
870 case 0x30: /* <TryAgainTimeout> */
871 case 0x3A: /* <GroupContentLimit> */
872 case 0x3B: /* <MessageTotalCount> */
873 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
883 /* New in WV-CSP 1.3*/
884 case 0x0C: /* <PairID> */
885 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
896 { /* Error, or not parsed */
897 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
906 wv_csp13_opaque_literal_tag(tvbuff_t
*tvb
, uint32_t offset
,
907 const char *token
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
909 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
912 if ( token
&& ( (strcmp(token
, "Code") == 0)
913 || (strcmp(token
, "ContentSize") == 0)
914 || (strcmp(token
, "MessageCount") == 0)
915 || (strcmp(token
, "Validity") == 0)
916 || (strcmp(token
, "KeepAliveTime") == 0)
917 || (strcmp(token
, "TimeToLive") == 0)
918 || (strcmp(token
, "AcceptedContentLength") == 0)
919 || (strcmp(token
, "MultiTrans") == 0)
920 || (strcmp(token
, "ParserSize") == 0)
921 || (strcmp(token
, "ServerPollMin") == 0)
922 || (strcmp(token
, "TCPPort") == 0)
923 || (strcmp(token
, "UDPPort") == 0)
924 || (strcmp(token
, "HistoryPeriod") == 0)
925 || (strcmp(token
, "MaxWatcherList") == 0)
926 /* New in WV-CSP 1.3*/
927 || (strcmp(token
, "SearchFindings") == 0)
928 || (strcmp(token
, "SearchID") == 0)
929 || (strcmp(token
, "SearchIndex") == 0)
930 || (strcmp(token
, "SearchLimit") == 0)
931 || (strcmp(token
, "AcceptedPullLength") == 0)
932 || (strcmp(token
, "AcceptedPushLength") == 0)
933 || (strcmp(token
, "AcceptedRichContentLength") == 0)
934 || (strcmp(token
, "AcceptedTextContentLength") == 0)
935 || (strcmp(token
, "SessionPriority") == 0)
936 || (strcmp(token
, "UserSessionLimit") == 0)
937 || (strcmp(token
, "MultiTransPerMessage") == 0)
938 || (strcmp(token
, "ContentPolicyLimit") == 0)
939 || (strcmp(token
, "AnswerOptionID") == 0)
940 || (strcmp(token
, "SegmentCount") == 0)
941 || (strcmp(token
, "SegmentReference") == 0)
942 || (strcmp(token
, "TryAgainTimeout") == 0)
943 || (strcmp(token
, "GroupContentLimit") == 0)
944 || (strcmp(token
, "MessageTotalCount") == 0)
945 || (strcmp(token
, "PairID") == 0) ) )
947 str
= wv_integer_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
950 if ( token
&& ( (strcmp(token
, "DateTime") == 0)
951 || (strcmp(token
, "DeliveryTime") == 0) ) )
953 str
= wv_datetime_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
956 if (str
== NULL
) { /* Error, or not parsed */
957 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
964 sic10_opaque_literal_attr(tvbuff_t
*tvb
, uint32_t offset
,
965 const char *token
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
967 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
970 if ( token
&& ( (strcmp(token
, "created") == 0)
971 || (strcmp(token
, "si-expires") == 0) ) )
973 str
= date_time_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
975 if (str
== NULL
) { /* Error, or not parsed */
976 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
984 sic10_opaque_binary_attr(tvbuff_t
*tvb
, uint32_t offset
,
985 uint8_t token
, uint8_t codepage
, uint32_t *length
, packet_info
*pinfo
)
987 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
991 case 0: /* Only valid codepage for SI */
993 case 0x0A: /* created= */
994 case 0x10: /* si-expires= */
995 str
= date_time_from_opaque(pinfo
->pool
, tvb
,
996 offset
+ *length
, data_len
);
1005 if (str
== NULL
) { /* Error, or not parsed */
1006 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
1008 *length
+= data_len
;
1014 emnc10_opaque_literal_attr(tvbuff_t
*tvb
, uint32_t offset
,
1015 const char *token
, uint8_t codepage _U_
, uint32_t *length
, packet_info
*pinfo
)
1017 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
1020 if ( token
&& (strcmp(token
, "timestamp") == 0) )
1022 str
= date_time_from_opaque(pinfo
->pool
, tvb
, offset
+ *length
, data_len
);
1024 if (str
== NULL
) { /* Error, or not parsed */
1025 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
1027 *length
+= data_len
;
1033 emnc10_opaque_binary_attr(tvbuff_t
*tvb
, uint32_t offset
,
1034 uint8_t token
, uint8_t codepage
, uint32_t *length
, packet_info
*pinfo
)
1036 uint32_t data_len
= tvb_get_uintvar(tvb
, offset
, length
, pinfo
, &ei_wbxml_oversized_uintvar
);
1040 case 0: /* Only valid codepage for EMN */
1042 case 0x05: /* timestamp= */
1043 str
= date_time_from_opaque(pinfo
->pool
, tvb
,
1044 offset
+ *length
, data_len
);
1053 if (str
== NULL
) { /* Error, or not parsed */
1054 str
= wmem_strdup_printf(pinfo
->pool
, "(%d bytes of unparsed opaque data)", data_len
);
1056 *length
+= data_len
;
1061 typedef struct _wbxml_decoding
{
1064 ext_t_func_ptr ext_t
[3];
1065 opaque_token_func_ptr opaque_binary_tag
;
1066 opaque_literal_func_ptr opaque_literal_tag
;
1067 opaque_token_func_ptr opaque_binary_attr
;
1068 opaque_literal_func_ptr opaque_literal_attr
;
1069 const value_valuestring
*global
;
1070 const value_valuestring
*tags
;
1071 const value_valuestring
*attrStart
;
1072 const value_valuestring
*attrValue
;
1075 /* Define a pointer to a discriminator function taking a tvb and the start
1076 * offset of the WBXML tokens in the body as arguments.
1078 typedef const wbxml_decoding
* (* discriminator_func_ptr
)(tvbuff_t
*, uint32_t);
1080 /* For the decoding lists based on the known WBXML public ID */
1081 typedef struct _wbxml_integer_list
{
1083 const wbxml_decoding
*map
;
1084 } wbxml_integer_list
;
1086 /* For the decoding lists on the literal content type */
1087 typedef struct _wbxml_literal_list
{
1088 const char *content_type
;
1089 discriminator_func_ptr discriminator
; /* TODO */
1090 const wbxml_decoding
*map
;
1091 } wbxml_literal_list
;
1093 /**************** WBXML related declarations and definitions ****************/
1096 /* WBXML public ID mappings. For an up-to-date list, see
1097 * http://www.openmobilealliance.org/tech/omna/ */
1098 static const value_string vals_wbxml_public_ids
[] = {
1099 /* 0x00 = literal public identifier */
1100 { 0x01, "Unknown or missing Public Identifier" },
1101 { 0x02, "-//WAPFORUM//DTD WML 1.0//EN (WML 1.0)" },
1102 { 0x03, "-//WAPFORUM//DTD WTA 1.0//EN (WTA Event 1.0) - Deprecated" },
1103 { 0x04, "-//WAPFORUM//DTD WML 1.1//EN (WML 1.1)" },
1104 { 0x05, "-//WAPFORUM//DTD SI 1.0//EN (Service Indication 1.0)" },
1105 { 0x06, "-//WAPFORUM//DTD SL 1.0//EN (Service Loading 1.0)" },
1106 { 0x07, "-//WAPFORUM//DTD CO 1.0//EN (Cache Operation 1.0)" },
1107 { 0x08, "-//WAPFORUM//DTD CHANNEL 1.1//EN (Channel 1.1)" },
1108 { 0x09, "-//WAPFORUM//DTD WML 1.2//EN (WML 1.2)" },
1109 { 0x0a, "-//WAPFORUM//DTD WML 1.3//EN (WML 1.3)" },
1110 { 0x0b, "-//WAPFORUM//DTD PROV 1.0//EN (Provisioning 1.0)" },
1111 { 0x0c, "-//WAPFORUM//DTD WTA-WML 1.2//EN (WTA-WML 1.2)" },
1112 { 0x0d, "-//WAPFORUM//DTD EMN 1.0//EN (Email Notification 1.0)" },
1113 { 0x0e, "-//WAPFORUM//DTD DRMREL 1.0//EN (DRMREL 1.0)" },
1114 { 0x0f, "-//WIRELESSVILLAGE//DTD CSP 1.0//EN"
1115 " (Wireless Village Client-Server Protocol DTD v1.0)" },
1116 { 0x10, "-//WIRELESSVILLAGE//DTD CSP 1.1//EN"
1117 " (Wireless Village Client-Server Protocol DTD v1.1)" },
1118 { 0x11, "-//OMA//DTD WV-CSP 1.2//EN (OMA IMPS - CSP protocol DTD v1.2)" },
1119 { 0x12, "-//OMA//DTD IMPS-CSP 1.3//EN (OMA IMPS - CSP protocol DTD v1.3)" },
1120 { 0x13, "-//OMA//DRM 2.1//EN (OMA DRM 2.1)" },
1121 /* 0x14 -- 0x7F: reserved */
1123 /* Registered values - www.syncml.org */
1124 { 0x0fd1, "-//SYNCML//DTD SyncML 1.0//EN (SyncML 1.0)" },
1125 { 0x0fd3, "-//SYNCML//DTD SyncML 1.1//EN (SyncML 1.1)" },
1127 /* Registered values - www.wapforum.org/wina/ */
1128 { 0x1100, "-//PHONE.COM//DTD ALERT 1.0//EN" },
1129 { 0x1101, "-//PHONE.COM//DTD CACHE-OPERATION 1.0//EN" },
1130 { 0x1102, "-//PHONE.COM//DTD SIGNAL 1.0//EN" },
1131 { 0x1103, "-//PHONE.COM//DTD LIST 1.0//EN" },
1132 { 0x1104, "-//PHONE.COM//DTD LISTCMD 1.0//EN" },
1133 { 0x1105, "-//PHONE.COM//DTD CHANNEL 1.0//EN" },
1134 { 0x1106, "-//PHONE.COM//DTD MMC 1.0//EN" },
1135 { 0x1107, "-//PHONE.COM//DTD BEARER-CHOICE 1.0//EN" },
1136 { 0x1108, "-//PHONE.COM//DTD WML 1.1//EN (WML+ 1.1)" },
1137 { 0x1109, "-//PHONE.COM//DTD CHANNEL 1.1//EN" },
1138 { 0x110a, "-//PHONE.COM//DTD LIST 1.1//EN" },
1139 { 0x110b, "-//PHONE.COM//DTD LISTCMD 1.1//EN" },
1140 { 0x110c, "-//PHONE.COM//DTD MMC 1.1//EN" },
1141 { 0x110d, "-//PHONE.COM//DTD WML 1.3//EN (WML+ 1.3)" },
1142 { 0x110e, "-//PHONE.COM//DTD MMC 2.0//EN" },
1143 /* 0x110F -- 0x11FF: unassigned */
1144 { 0x1200, "-//3GPP2.COM//DTD IOTA 1.0//EN" },
1145 { 0x1201, "-//SYNCML//DTD SyncML 1.2//EN" },
1146 { 0x1202, "-//SYNCML//DTD MetaInf 1.2//EN" },
1147 { 0x1203, "-//SYNCML//DTD DevInf 1.2//EN" },
1148 { 0x1204, "-//NOKIA//DTD LANDMARKS 1.0//EN" },
1152 static value_string_ext vals_wbxml_public_ids_ext
= VALUE_STRING_EXT_INIT(vals_wbxml_public_ids
);
1154 static const value_string vals_wbxml_versions
[] = {
1155 { 0x00, "1.0" }, /* WAP-104-WBXML */
1156 { 0x01, "1.1" }, /* WAP-135-WBXML */
1157 { 0x02, "1.2" }, /* WAP-154-WBXML */
1158 { 0x03, "1.3" }, /* WAP-192-WBXML */
1162 static value_string_ext vals_wbxml_versions_ext
= VALUE_STRING_EXT_INIT(vals_wbxml_versions
);
1164 /* WBXML 1.0 global tokens: WAP-104-WBXML
1165 * Same token mapping as in vals_wbxml1x_global_tokens, but:
1166 * { 0xC3, "RESERVED_2" }
1169 /* WBXML 1.x (x>0) global tokens: WAP-135-WBXML, WAP-154-WBXML, WAP-192-WBXML
1171 static const value_string vals_wbxml1x_global_tokens
[] = {
1172 { 0x00, "SWITCH_PAGE" },
1176 { 0x04, "LITERAL" },
1178 { 0x40, "EXT_I_0" },
1179 { 0x41, "EXT_I_1" },
1180 { 0x42, "EXT_I_2" },
1182 { 0x44, "LITERAL_C" },
1184 { 0x80, "EXT_T_0" },
1185 { 0x81, "EXT_T_1" },
1186 { 0x82, "EXT_T_2" },
1188 { 0x84, "LITERAL_A" },
1194 { 0xC4, "LITERAL_AC" },
1198 static value_string_ext vals_wbxml1x_global_tokens_ext
= VALUE_STRING_EXT_INIT(vals_wbxml1x_global_tokens
);
1204 /********************** WBXML token mapping definition **********************/
1207 * NOTE: Please make sure the Attribute Start values all contain an equal sign
1208 * even in cases where they do not contain the start of an Attribute
1215 * Wireless Markup Language
1216 ***************************************/
1218 ext_t_0_wml_10(tvbuff_t
*tvb
, uint32_t value
, uint32_t str_tbl
)
1220 char *str
= wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - escaped: '%s'",
1221 tvb_get_stringz_enc(wmem_packet_scope(), tvb
, str_tbl
+ value
, NULL
, ENC_ASCII
));
1226 ext_t_1_wml_10(tvbuff_t
*tvb
, uint32_t value
, uint32_t str_tbl
)
1228 char *str
= wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - unescaped: '%s'",
1229 tvb_get_stringz_enc(wmem_packet_scope(), tvb
, str_tbl
+ value
, NULL
, ENC_ASCII
));
1234 ext_t_2_wml_10(tvbuff_t
*tvb
, uint32_t value
, uint32_t str_tbl
)
1236 char *str
= wmem_strdup_printf(wmem_packet_scope(), "Variable substitution - no transformation: '%s'",
1237 tvb_get_stringz_enc(wmem_packet_scope(), tvb
, str_tbl
+ value
, NULL
, ENC_ASCII
));
1240 /***** Global extension tokens *****/
1241 static const value_string wbxml_wmlc10_global_cp0
[] = {
1242 { 0x40, "Variable substitution - escaped" },
1243 { 0x41, "Variable substitution - unescaped" },
1244 { 0x42, "Variable substitution - no transformation" },
1245 { 0x80, "Variable substitution - escaped" },
1246 { 0x81, "Variable substitution - unescaped" },
1247 { 0x82, "Variable substitution - no transformation" },
1248 { 0xC0, "Reserved" },
1249 { 0xC1, "Reserved" },
1250 { 0xC2, "Reserved" },
1255 /***** Tag tokens *****/
1256 static const value_string wbxml_wmlc10_tags_cp0
[] = {
1257 /* 0x00 -- 0x04 GLOBAL */
1267 { 0x2A, "FIELDSET" },
1276 { 0x33, "ONEVENT" },
1277 { 0x34, "OPTGROUP" },
1279 { 0x36, "REFRESH" },
1284 { 0x3B, "TEMPLATE" },
1293 /***** Attribute Start tokens *****/
1294 static const value_string wbxml_wmlc10_attrStart_cp0
[] = {
1295 /* 0x00 -- 0x04 GLOBAL */
1296 { 0x05, "ACCEPT-CHARSET=" },
1297 { 0x06, "ALIGN='BOTTOM'" },
1298 { 0x07, "ALIGN='CENTER'" },
1299 { 0x08, "ALIGN='LEFT'" },
1300 { 0x09, "ALIGN='MIDDLE'" },
1301 { 0x0A, "ALIGN='RIGHT'" },
1302 { 0x0B, "ALIGN='TOP'" },
1304 { 0x0D, "CONTENT=" },
1305 { 0x0E, "DEFAULT=" },
1306 { 0x0F, "DOMAIN=" },
1307 { 0x10, "EMPTYOK='FALSE'" },
1308 { 0x11, "EMPTYOK='TRUE'" },
1309 { 0x12, "FORMAT=" },
1310 { 0x13, "HEIGHT=" },
1311 { 0x14, "HSPACE=" },
1312 { 0x15, "IDEFAULT=" },
1316 { 0x19, "LOCALSRC=" },
1317 { 0x1A, "MAXLENGTH=" },
1318 { 0x1B, "METHOD='GET'" },
1319 { 0x1C, "METHOD='POST'" },
1320 { 0x1D, "MODE='NOWRAP'" },
1321 { 0x1E, "MODE='WRAP'" },
1322 { 0x1F, "MULTIPLE='FALSE'" },
1323 { 0x20, "MULTIPLE='TRUE'" },
1325 { 0x22, "NEWCONTEXT='FALSE'" },
1326 { 0x23, "NEWCONTEXT='TRUE'" },
1327 { 0x24, "ONCLICK=" },
1328 { 0x25, "ONENTERBACKWARD=" },
1329 { 0x26, "ONENTERFORWARD=" },
1330 { 0x27, "ONTIMER=" },
1331 { 0x28, "OPTIONAL='FALSE'" },
1332 { 0x29, "OPTIONAL='TRUE'" },
1334 { 0x2B, "POSTDATA=" },
1335 { 0x2C, "PUBLIC='FALSE'" },
1336 { 0x2D, "PUBLIC='TRUE'" },
1337 { 0x2E, "SCHEME=" },
1338 { 0x2F, "SENDREFERER='FALSE'" },
1339 { 0x30, "SENDREFERER='TRUE'" },
1342 { 0x33, "STYLE='LIST'" },
1343 { 0x34, "STYLE='SET'" },
1344 { 0x35, "TABINDEX=" },
1347 { 0x38, "TYPE='ACCEPT'" },
1348 { 0x39, "TYPE='DELETE'" },
1349 { 0x3A, "TYPE='HELP'" },
1350 { 0x3B, "TYPE='PASSWORD'" },
1351 { 0x3C, "TYPE='ONCLICK'" },
1352 { 0x3D, "TYPE='ONENTERBACKWARD'" },
1353 { 0x3E, "TYPE='ONENTERFORWARD'" },
1354 { 0x3F, "TYPE='ONTIMER'" },
1355 /* 0x40 -- 0x44 GLOBAL */
1356 { 0x45, "TYPE='OPTIONS'" },
1357 { 0x46, "TYPE='PREV'" },
1358 { 0x47, "TYPE='RESET'" },
1359 { 0x48, "TYPE='TEXT'" },
1360 { 0x49, "TYPE='vnd.'" },
1362 { 0x4B, "URL='http://'" },
1363 { 0x4C, "URL='https://'" },
1364 { 0x4D, "USER-AGENT=" },
1366 { 0x4F, "VSPACE=" },
1368 { 0x51, "xml:lang=" },
1373 /***** Attribute Value tokens *****/
1374 static const value_string wbxml_wmlc10_attrValue_cp0
[] = {
1375 /* 0x80 -- 0x84 GLOBAL */
1376 { 0x85, "'.com/'" },
1377 { 0x86, "'.edu/'" },
1378 { 0x87, "'.net/'" },
1379 { 0x88, "'.org/'" },
1380 { 0x89, "'ACCEPT'" },
1381 { 0x8A, "'BOTTOM'" },
1382 { 0x8B, "'CLEAR'" },
1383 { 0x8C, "'DELETE'" },
1385 { 0x8E, "'http://'" },
1386 { 0x8F, "'http://www.'" },
1387 { 0x90, "'https://'" },
1388 { 0x91, "'https://www.'" },
1390 { 0x93, "'MIDDLE'" },
1391 { 0x94, "'NOWRAP'" },
1392 { 0x95, "'ONCLICK'" },
1393 { 0x96, "'ONENTERBACKWARD'" },
1394 { 0x97, "'ONENTERFORWARD'" },
1395 { 0x98, "'ONTIMER'" },
1396 { 0x99, "'OPTIONS'" },
1397 { 0x9A, "'PASSWORD'" },
1398 { 0x9B, "'RESET'" },
1402 { 0x9F, "'UNKNOWN'" },
1409 /***** Token code page aggregation *****/
1410 static const value_valuestring wbxml_wmlc10_global
[] = {
1411 { 0, wbxml_wmlc10_global_cp0
},
1415 static const value_valuestring wbxml_wmlc10_tags
[] = {
1416 { 0, wbxml_wmlc10_tags_cp0
},
1420 static const value_valuestring wbxml_wmlc10_attrStart
[] = {
1421 { 0, wbxml_wmlc10_attrStart_cp0
},
1425 static const value_valuestring wbxml_wmlc10_attrValue
[] = {
1426 { 0, wbxml_wmlc10_attrValue_cp0
},
1430 static const wbxml_decoding decode_wmlc_10
= {
1431 "Wireless Markup Language 1.0",
1433 { ext_t_0_wml_10
, ext_t_1_wml_10
, ext_t_2_wml_10
},
1434 default_opaque_binary_tag
,
1435 default_opaque_literal_tag
,
1436 default_opaque_binary_attr
,
1437 default_opaque_literal_attr
,
1438 wbxml_wmlc10_global
,
1440 wbxml_wmlc10_attrStart
,
1441 wbxml_wmlc10_attrValue
1449 * Wireless Markup Language
1450 ***************************************/
1452 /***** Global extension tokens *****/
1453 /* Same as in WML 1.0 */
1455 /***** Tag tokens *****/
1456 static const value_string wbxml_wmlc11_tags_cp0
[] = {
1457 /* 0x00 -- 0x04 GLOBAL */
1464 { 0x21, "postfield" },
1473 { 0x2A, "fieldset" },
1482 { 0x33, "onevent" },
1483 { 0x34, "optgroup" },
1485 { 0x36, "refresh" },
1490 { 0x3B, "template" },
1499 /***** Attribute Start tokens *****/
1500 static const value_string wbxml_wmlc11_attrStart_cp0
[] = {
1501 /* 0x00 -- 0x04 GLOBAL */
1502 { 0x05, "accept-charset=" },
1503 { 0x06, "align='bottom'" },
1504 { 0x07, "align='center'" },
1505 { 0x08, "align='left'" },
1506 { 0x09, "align='middle'" },
1507 { 0x0A, "align='right'" },
1508 { 0x0B, "align='top'" },
1510 { 0x0D, "content=" },
1512 { 0x0F, "domain=" },
1513 { 0x10, "emptyok='false'" },
1514 { 0x11, "emptyok='true'" },
1515 { 0x12, "format=" },
1516 { 0x13, "height=" },
1517 { 0x14, "hspace=" },
1518 { 0x15, "ivalue=" },
1522 { 0x19, "localsrc=" },
1523 { 0x1A, "maxlength=" },
1524 { 0x1B, "method='get'" },
1525 { 0x1C, "method='post'" },
1526 { 0x1D, "mode='nowrap'" },
1527 { 0x1E, "mode='wrap'" },
1528 { 0x1F, "multiple='false'" },
1529 { 0x20, "multiple='true'" },
1531 { 0x22, "newcontext='false'" },
1532 { 0x23, "newcontext='true'" },
1533 { 0x24, "onpick=" },
1534 { 0x25, "onenterbackward=" },
1535 { 0x26, "onenterforward=" },
1536 { 0x27, "ontimer=" },
1537 { 0x28, "optional='false'" },
1538 { 0x29, "optional='true'" },
1541 { 0x2E, "scheme=" },
1542 { 0x2F, "sendreferer='false'" },
1543 { 0x30, "sendreferer='true'" },
1546 { 0x33, "ordered='false'" },
1547 { 0x34, "ordered='true'" },
1548 { 0x35, "tabindex=" },
1551 { 0x38, "type='accept'" },
1552 { 0x39, "type='delete'" },
1553 { 0x3A, "type='help'" },
1554 { 0x3B, "type='password'" },
1555 { 0x3C, "type='onpick'" },
1556 { 0x3D, "type='onenterbackward'" },
1557 { 0x3E, "type='onenterforward'" },
1558 { 0x3F, "type='ontimer'" },
1559 /* 0x40 -- 0x44 GLOBAL */
1560 { 0x45, "type='options'" },
1561 { 0x46, "type='prev'" },
1562 { 0x47, "type='reset'" },
1563 { 0x48, "type='text'" },
1564 { 0x49, "type='vnd.'" },
1566 { 0x4B, "href='http://'" },
1567 { 0x4C, "href='https://'" },
1569 { 0x4E, "vspace=" },
1571 { 0x50, "xml:lang=" },
1574 { 0x53, "columns=" },
1577 { 0x56, "forua='false'" },
1578 { 0x57, "forua='true'" },
1579 { 0x58, "src='http://'" },
1580 { 0x59, "src='https://'" },
1581 { 0x5A, "http-equiv=" },
1582 { 0x5B, "http-equiv='Content-Type'" },
1583 { 0x5C, "content='application/vnd.wap.wmlc;charset='" },
1584 { 0x5D, "http-equiv='Expires'" },
1589 /***** Attribute Value tokens *****/
1590 static const value_string wbxml_wmlc11_attrValue_cp0
[] = {
1591 /* 0x80 -- 0x84 GLOBAL */
1592 { 0x85, "'.com/'" },
1593 { 0x86, "'.edu/'" },
1594 { 0x87, "'.net/'" },
1595 { 0x88, "'.org/'" },
1596 { 0x89, "'accept'" },
1597 { 0x8A, "'bottom'" },
1598 { 0x8B, "'clear'" },
1599 { 0x8C, "'delete'" },
1601 { 0x8E, "'http://'" },
1602 { 0x8F, "'http://www.'" },
1603 { 0x90, "'https://'" },
1604 { 0x91, "'https://www.'" },
1606 { 0x93, "'middle'" },
1607 { 0x94, "'nowrap'" },
1608 { 0x95, "'onpick'" },
1609 { 0x96, "'onenterbackward'" },
1610 { 0x97, "'onenterforward'" },
1611 { 0x98, "'ontimer'" },
1612 { 0x99, "'options'" },
1613 { 0x9A, "'password'" },
1614 { 0x9B, "'reset'" },
1618 { 0x9F, "'unknown'" },
1625 /***** Token code page aggregation *****/
1626 static const value_valuestring wbxml_wmlc11_global
[] = {
1627 { 0, wbxml_wmlc10_global_cp0
}, /* Same as WML 1.0 */
1631 static const value_valuestring wbxml_wmlc11_tags
[] = {
1632 { 0, wbxml_wmlc11_tags_cp0
},
1636 static const value_valuestring wbxml_wmlc11_attrStart
[] = {
1637 { 0, wbxml_wmlc11_attrStart_cp0
},
1641 static const value_valuestring wbxml_wmlc11_attrValue
[] = {
1642 { 0, wbxml_wmlc11_attrValue_cp0
},
1646 static const wbxml_decoding decode_wmlc_11
= {
1647 "Wireless Markup Language 1.1",
1649 { ext_t_0_wml_10
, ext_t_1_wml_10
, ext_t_2_wml_10
},
1650 default_opaque_binary_tag
,
1651 default_opaque_literal_tag
,
1652 default_opaque_binary_attr
,
1653 default_opaque_literal_attr
,
1654 wbxml_wmlc11_global
,
1656 wbxml_wmlc11_attrStart
,
1657 wbxml_wmlc11_attrValue
1666 * Wireless Markup Language
1667 ***************************************/
1669 /***** Global extension tokens *****/
1670 /* Same as in WML 1.0 */
1672 /***** Tag tokens *****/
1673 static const value_string wbxml_wmlc12_tags_cp0
[] = {
1674 /* 0x00 -- 0x04 GLOBAL */
1682 { 0x21, "postfield" },
1691 { 0x2A, "fieldset" },
1700 { 0x33, "onevent" },
1701 { 0x34, "optgroup" },
1703 { 0x36, "refresh" },
1708 { 0x3B, "template" },
1717 /***** Attribute Start tokens *****/
1718 static const value_string wbxml_wmlc12_attrStart_cp0
[] = {
1719 /* 0x00 -- 0x04 GLOBAL */
1720 { 0x05, "accept-charset=" },
1721 { 0x06, "align='bottom'" },
1722 { 0x07, "align='center'" },
1723 { 0x08, "align='left'" },
1724 { 0x09, "align='middle'" },
1725 { 0x0A, "align='right'" },
1726 { 0x0B, "align='top'" },
1728 { 0x0D, "content=" },
1730 { 0x0F, "domain=" },
1731 { 0x10, "emptyok='false'" },
1732 { 0x11, "emptyok='true'" },
1733 { 0x12, "format=" },
1734 { 0x13, "height=" },
1735 { 0x14, "hspace=" },
1736 { 0x15, "ivalue=" },
1740 { 0x19, "localsrc=" },
1741 { 0x1A, "maxlength=" },
1742 { 0x1B, "method='get'" },
1743 { 0x1C, "method='post'" },
1744 { 0x1D, "mode='nowrap'" },
1745 { 0x1E, "mode='wrap'" },
1746 { 0x1F, "multiple='false'" },
1747 { 0x20, "multiple='true'" },
1749 { 0x22, "newcontext='false'" },
1750 { 0x23, "newcontext='true'" },
1751 { 0x24, "onpick=" },
1752 { 0x25, "onenterbackward=" },
1753 { 0x26, "onenterforward=" },
1754 { 0x27, "ontimer=" },
1755 { 0x28, "optional='false'" },
1756 { 0x29, "optional='true'" },
1759 { 0x2E, "scheme=" },
1760 { 0x2F, "sendreferer='false'" },
1761 { 0x30, "sendreferer='true'" },
1764 { 0x33, "ordered='false'" },
1765 { 0x34, "ordered='true'" },
1766 { 0x35, "tabindex=" },
1769 { 0x38, "type='accept'" },
1770 { 0x39, "type='delete'" },
1771 { 0x3A, "type='help'" },
1772 { 0x3B, "type='password'" },
1773 { 0x3C, "type='onpick'" },
1774 { 0x3D, "type='onenterbackward'" },
1775 { 0x3E, "type='onenterforward'" },
1776 { 0x3F, "type='ontimer'" },
1777 /* 0x40 -- 0x44 GLOBAL */
1778 { 0x45, "type='options'" },
1779 { 0x46, "type='prev'" },
1780 { 0x47, "type='reset'" },
1781 { 0x48, "type='text'" },
1782 { 0x49, "type='vnd.'" },
1784 { 0x4B, "href='http://'" },
1785 { 0x4C, "href='https://'" },
1787 { 0x4E, "vspace=" },
1789 { 0x50, "xml:lang=" },
1792 { 0x53, "columns=" },
1795 { 0x56, "forua='false'" },
1796 { 0x57, "forua='true'" },
1797 { 0x58, "src='http://'" },
1798 { 0x59, "src='https://'" },
1799 { 0x5A, "http-equiv=" },
1800 { 0x5B, "http-equiv='Content-Type'" },
1801 { 0x5C, "content='application/vnd.wap.wmlc;charset='" },
1802 { 0x5D, "http-equiv='Expires'" },
1803 { 0x5E, "accesskey=" },
1804 { 0x5F, "enctype=" },
1805 { 0x60, "enctype='application/x-www-form-urlencoded'" },
1806 { 0x61, "enctype='multipart/form-data'" },
1811 /***** Attribute Value tokens *****/
1812 /* Same as in WML 1.1 */
1814 /***** Token code page aggregation *****/
1815 static const value_valuestring wbxml_wmlc12_global
[] = {
1816 { 0, wbxml_wmlc10_global_cp0
}, /* Same as WML 1.0 */
1820 static const value_valuestring wbxml_wmlc12_tags
[] = {
1821 { 0, wbxml_wmlc12_tags_cp0
},
1825 static const value_valuestring wbxml_wmlc12_attrStart
[] = {
1826 { 0, wbxml_wmlc12_attrStart_cp0
},
1830 static const value_valuestring wbxml_wmlc12_attrValue
[] = {
1831 { 0, wbxml_wmlc11_attrValue_cp0
}, /* Same as WML 1.1 */
1835 static const wbxml_decoding decode_wmlc_12
= {
1836 "Wireless Markup Language 1.2",
1838 { ext_t_0_wml_10
, ext_t_1_wml_10
, ext_t_2_wml_10
},
1839 default_opaque_binary_tag
,
1840 default_opaque_literal_tag
,
1841 default_opaque_binary_attr
,
1842 default_opaque_literal_attr
,
1843 wbxml_wmlc12_global
,
1845 wbxml_wmlc12_attrStart
,
1846 wbxml_wmlc12_attrValue
1855 * Wireless Markup Language
1856 ***************************************/
1858 /***** Global extension tokens *****/
1859 /* Same as in WML 1.0 */
1861 /***** Tag tokens *****/
1862 /* Same as in WML 1.2 */
1864 /***** Attribute Start tokens *****/
1865 static const value_string wbxml_wmlc13_attrStart_cp0
[] = {
1866 /* 0x00 -- 0x04 GLOBAL */
1867 { 0x05, "accept-charset=" },
1868 { 0x06, "align='bottom'" },
1869 { 0x07, "align='center'" },
1870 { 0x08, "align='left'" },
1871 { 0x09, "align='middle'" },
1872 { 0x0A, "align='right'" },
1873 { 0x0B, "align='top'" },
1875 { 0x0D, "content=" },
1877 { 0x0F, "domain=" },
1878 { 0x10, "emptyok='false'" },
1879 { 0x11, "emptyok='true'" },
1880 { 0x12, "format=" },
1881 { 0x13, "height=" },
1882 { 0x14, "hspace=" },
1883 { 0x15, "ivalue=" },
1887 { 0x19, "localsrc=" },
1888 { 0x1A, "maxlength=" },
1889 { 0x1B, "method='get'" },
1890 { 0x1C, "method='post'" },
1891 { 0x1D, "mode='nowrap'" },
1892 { 0x1E, "mode='wrap'" },
1893 { 0x1F, "multiple='false'" },
1894 { 0x20, "multiple='true'" },
1896 { 0x22, "newcontext='false'" },
1897 { 0x23, "newcontext='true'" },
1898 { 0x24, "onpick=" },
1899 { 0x25, "onenterbackward=" },
1900 { 0x26, "onenterforward=" },
1901 { 0x27, "ontimer=" },
1902 { 0x28, "optional='false'" },
1903 { 0x29, "optional='true'" },
1906 { 0x2E, "scheme=" },
1907 { 0x2F, "sendreferer='false'" },
1908 { 0x30, "sendreferer='true'" },
1911 { 0x33, "ordered='false'" },
1912 { 0x34, "ordered='true'" },
1913 { 0x35, "tabindex=" },
1916 { 0x38, "type='accept'" },
1917 { 0x39, "type='delete'" },
1918 { 0x3A, "type='help'" },
1919 { 0x3B, "type='password'" },
1920 { 0x3C, "type='onpick'" },
1921 { 0x3D, "type='onenterbackward'" },
1922 { 0x3E, "type='onenterforward'" },
1923 { 0x3F, "type='ontimer'" },
1924 /* 0x40 -- 0x44 GLOBAL */
1925 { 0x45, "type='options'" },
1926 { 0x46, "type='prev'" },
1927 { 0x47, "type='reset'" },
1928 { 0x48, "type='text'" },
1929 { 0x49, "type='vnd.'" },
1931 { 0x4B, "href='http://'" },
1932 { 0x4C, "href='https://'" },
1934 { 0x4E, "vspace=" },
1936 { 0x50, "xml:lang=" },
1939 { 0x53, "columns=" },
1942 { 0x56, "forua='false'" },
1943 { 0x57, "forua='true'" },
1944 { 0x58, "src='http://'" },
1945 { 0x59, "src='https://'" },
1946 { 0x5A, "http-equiv=" },
1947 { 0x5B, "http-equiv='Content-Type'" },
1948 { 0x5C, "content='application/vnd.wap.wmlc;charset='" },
1949 { 0x5D, "http-equiv='Expires'" },
1950 { 0x5E, "accesskey=" },
1951 { 0x5F, "enctype=" },
1952 { 0x60, "enctype='application/x-www-form-urlencoded'" },
1953 { 0x61, "enctype='multipart/form-data'" },
1954 { 0x62, "xml:space='preserve'" },
1955 { 0x63, "xml:space='default'" },
1956 { 0x64, "cache-control='no-cache'" },
1961 /***** Attribute Value tokens *****/
1962 /* Same as in WML 1.1 */
1964 /***** Token code page aggregation *****/
1965 static const value_valuestring wbxml_wmlc13_global
[] = {
1966 { 0, wbxml_wmlc10_global_cp0
}, /* Same as WML 1.0 */
1970 static const value_valuestring wbxml_wmlc13_tags
[] = {
1971 { 0, wbxml_wmlc12_tags_cp0
},
1975 static const value_valuestring wbxml_wmlc13_attrStart
[] = {
1976 { 0, wbxml_wmlc13_attrStart_cp0
},
1980 static const value_valuestring wbxml_wmlc13_attrValue
[] = {
1981 { 0, wbxml_wmlc11_attrValue_cp0
}, /* Same as WML 1.1 */
1985 static const wbxml_decoding decode_wmlc_13
= {
1986 "Wireless Markup Language 1.3",
1988 { ext_t_0_wml_10
, ext_t_1_wml_10
, ext_t_2_wml_10
},
1989 default_opaque_binary_tag
,
1990 default_opaque_literal_tag
,
1991 default_opaque_binary_attr
,
1992 default_opaque_literal_attr
,
1993 wbxml_wmlc13_global
,
1995 wbxml_wmlc13_attrStart
,
1996 wbxml_wmlc13_attrValue
2005 * Service Indication
2006 ***************************************/
2008 /***** Global extension tokens *****/
2010 /***** Tag tokens *****/
2011 static const value_string wbxml_sic10_tags_cp0
[] = {
2012 /* 0x00 -- 0x04 GLOBAL */
2014 { 0x06, "indication" },
2021 /***** Attribute Start tokens *****/
2022 static const value_string wbxml_sic10_attrStart_cp0
[] = {
2023 /* 0x00 -- 0x04 GLOBAL */
2024 { 0x05, "action='signal-none'" },
2025 { 0x06, "action='signal-low'" },
2026 { 0x07, "action='signal-medium'" },
2027 { 0x08, "action='signal-high'" },
2028 { 0x09, "action='delete'" },
2029 { 0x0a, "created=" },
2031 { 0x0c, "href='http://'" },
2032 { 0x0d, "href='http://www.'" },
2033 { 0x0e, "href='https://'" },
2034 { 0x0f, "href='https://www.'" },
2035 { 0x10, "si-expires=" },
2042 /***** Attribute Value tokens *****/
2043 static const value_string wbxml_sic10_attrValue_cp0
[] = {
2044 /* 0x80 -- 0x84 GLOBAL */
2045 { 0x85, "'.com/'" },
2046 { 0x86, "'.edu/'" },
2047 { 0x87, "'.net/'" },
2048 { 0x88, "'.org/'" },
2053 /***** Token code page aggregation *****/
2054 static const value_valuestring wbxml_sic10_tags
[] = {
2055 { 0, wbxml_sic10_tags_cp0
},
2059 static const value_valuestring wbxml_sic10_attrStart
[] = {
2060 { 0, wbxml_sic10_attrStart_cp0
},
2064 static const value_valuestring wbxml_sic10_attrValue
[] = {
2065 { 0, wbxml_sic10_attrValue_cp0
},
2069 static const wbxml_decoding decode_sic_10
= {
2070 "Service Indication 1.0",
2072 { NULL
, NULL
, NULL
},
2073 default_opaque_binary_tag
,
2074 default_opaque_literal_tag
,
2075 sic10_opaque_binary_attr
,
2076 sic10_opaque_literal_attr
,
2079 wbxml_sic10_attrStart
,
2080 wbxml_sic10_attrValue
2090 ***************************************/
2092 /***** Global extension tokens *****/
2094 /***** Tag tokens *****/
2095 static const value_string wbxml_slc10_tags_cp0
[] = {
2096 /* 0x00 -- 0x04 GLOBAL */
2102 /***** Attribute Start tokens *****/
2103 static const value_string wbxml_slc10_attrStart_cp0
[] = {
2104 /* 0x00 -- 0x04 GLOBAL */
2105 { 0x05, "action='execute-low'" },
2106 { 0x06, "action='execute-high'" },
2107 { 0x07, "action='cache'" },
2109 { 0x09, "href='http://'" },
2110 { 0x0a, "href='http://www.'" },
2111 { 0x0b, "href='https://'" },
2112 { 0x0c, "href='https://www.'" },
2117 /***** Attribute Value tokens *****/
2118 /* Same as in SI 1.0 */
2120 /***** Token code page aggregation *****/
2121 static const value_valuestring wbxml_slc10_tags
[] = {
2122 { 0, wbxml_slc10_tags_cp0
},
2126 static const value_valuestring wbxml_slc10_attrStart
[] = {
2127 { 0, wbxml_slc10_attrStart_cp0
},
2131 static const value_valuestring wbxml_slc10_attrValue
[] = {
2132 { 0, wbxml_sic10_attrValue_cp0
}, /* Same as SI 1.0 */
2136 static const wbxml_decoding decode_slc_10
= {
2137 "Service Loading 1.0",
2139 { NULL
, NULL
, NULL
},
2140 default_opaque_binary_tag
,
2141 default_opaque_literal_tag
,
2142 default_opaque_binary_attr
,
2143 default_opaque_literal_attr
,
2146 wbxml_slc10_attrStart
,
2147 wbxml_slc10_attrValue
2157 ***************************************/
2159 /***** Global extension tokens *****/
2161 /***** Tag tokens *****/
2162 static const value_string wbxml_coc10_tags_cp0
[] = {
2163 /* 0x00 -- 0x04 GLOBAL */
2165 { 0x06, "invalidate-object" },
2166 { 0x07, "invalidate-service" },
2171 /***** Attribute Start tokens *****/
2172 static const value_string wbxml_coc10_attrStart_cp0
[] = {
2173 /* 0x00 -- 0x04 GLOBAL */
2175 { 0x06, "uri='http://'" },
2176 { 0x07, "uri='http://www.'" },
2177 { 0x08, "uri='https://'" },
2178 { 0x09, "uri='https://www.'" },
2183 /***** Attribute Value tokens *****/
2184 /* Same as in SI 1.0 */
2186 /***** Token code page aggregation *****/
2187 static const value_valuestring wbxml_coc10_tags
[] = {
2188 { 0, wbxml_coc10_tags_cp0
},
2192 static const value_valuestring wbxml_coc10_attrStart
[] = {
2193 { 0, wbxml_coc10_attrStart_cp0
},
2197 static const value_valuestring wbxml_coc10_attrValue
[] = {
2198 { 0, wbxml_sic10_attrValue_cp0
}, /* Same as SI 1.0 */
2202 static const wbxml_decoding decode_coc_10
= {
2203 "Cache Operation 1.0",
2205 { NULL
, NULL
, NULL
},
2206 default_opaque_binary_tag
,
2207 default_opaque_literal_tag
,
2208 default_opaque_binary_attr
,
2209 default_opaque_literal_attr
,
2212 wbxml_coc10_attrStart
,
2213 wbxml_coc10_attrValue
2222 * Client Provisioning
2223 ***************************************/
2225 /***** Global extension tokens *****/
2227 /***** Tag tokens *****/
2228 static const value_string wbxml_provc10_tags_cp0
[] = {
2229 /* 0x00 -- 0x04 GLOBAL */
2230 { 0x05, "wap-provisioningdoc" },
2231 { 0x06, "characteristic" },
2236 static const value_string wbxml_provc10_tags_cp1
[] = {
2237 /* 0x00 -- 0x04 GLOBAL */
2239 { 0x06, "characteristic" },
2245 /***** Attribute Start tokens *****/
2246 static const value_string wbxml_provc10_attrStart_cp0
[] = {
2247 /* 0x00 -- 0x04 GLOBAL */
2250 { 0x07, "name='NAME'" },
2251 { 0x08, "name='NAP-ADDRESS'" },
2252 { 0x09, "name='NAP-ADDRTYPE'" },
2253 { 0x0A, "name='CALLTYPE'" },
2254 { 0x0B, "name='VALIDUNTIL'" },
2255 { 0x0C, "name='AUTHTYPE'" },
2256 { 0x0D, "name='AUTHNAME'" },
2257 { 0x0E, "name='AUTHSECRET'" },
2258 { 0x0F, "name='LINGER'" },
2259 { 0x10, "name='BEARER'" },
2260 { 0x11, "name='NAPID'" },
2261 { 0x12, "name='COUNTRY'" },
2262 { 0x13, "name='NETWORK'" },
2263 { 0x14, "name='INTERNET'" },
2264 { 0x15, "name='PROXY-ID'" },
2265 { 0x16, "name='PROXY-PROVIDER-ID'" },
2266 { 0x17, "name='DOMAIN'" },
2267 { 0x18, "name='PROVURL'" },
2268 { 0x19, "name='PXAUTH-TYPE'" },
2269 { 0x1A, "name='PXAUTH-ID'" },
2270 { 0x1B, "name='PXAUTH-PW'" },
2271 { 0x1C, "name='STARTPAGE'" },
2272 { 0x1D, "name='BASAUTH-ID'" },
2273 { 0x1E, "name='BASAUTH-PW'" },
2274 { 0x1F, "name='PUSHENABLED'" },
2275 { 0x20, "name='PXADDR'" },
2276 { 0x21, "name='PXADDRTYPE'" },
2277 { 0x22, "name='TO-NAPID'" },
2278 { 0x23, "name='PORTNBR'" },
2279 { 0x24, "name='SERVICE'" },
2280 { 0x25, "name='LINKSPEED'" },
2281 { 0x26, "name='DNLINKSPEED'" },
2282 { 0x27, "name='LOCAL-ADDR'" },
2283 { 0x28, "name='LOCAL-ADDRTYPE'" },
2284 { 0x29, "name='CONTEXT-ALLOW'" },
2285 { 0x2A, "name='TRUST'" },
2286 { 0x2B, "name='MASTER'" },
2287 { 0x2C, "name='SID'" },
2288 { 0x2D, "name='SOC'" },
2289 { 0x2E, "name='WSP-VERSION'" },
2290 { 0x2F, "name='PHYSICAL-PROXY-ID'" },
2291 { 0x30, "name='CLIENT-ID'" },
2292 { 0x31, "name='DELIVERY-ERR-SDU'" },
2293 { 0x32, "name='DELIVERY-ORDER'" },
2294 { 0x33, "name='TRAFFIC-CLASS'" },
2295 { 0x34, "name='MAX-SDU-SIZE'" },
2296 { 0x35, "name='MAX-BITRATE-UPLINK'" },
2297 { 0x36, "name='MAX-BITRATE-DNLINK'" },
2298 { 0x37, "name='RESIDUAL-BER'" },
2299 { 0x38, "name='SDU-ERROR-RATIO'" },
2300 { 0x39, "name='TRAFFIC-HANDL-PRIO'" },
2301 { 0x3A, "name='TRANSFER-DELAY'" },
2302 { 0x3B, "name='GUARANTEED-BITRATE-UPLINK'" },
2303 { 0x3C, "name='GUARANTEED-BITRATE-DNLINK'" },
2304 { 0x3D, "name='PXADDR-FQDN'" },
2305 { 0x3E, "name='PROXY-PW'" },
2306 { 0x3F, "name='PPGAUTH-TYPE'" },
2307 /* 0x40 -- 0x44 GLOBAL */
2308 { 0x45, "version=" },
2309 { 0x46, "version='1.0'" },
2310 { 0x47, "name='PULLENABLED'" },
2311 { 0x48, "name='DNS-ADDR'" },
2312 { 0x49, "name='MAX-NUM-RETRY'" },
2313 { 0x4A, "name='FIRST-RETRY-TIMEOUT'" },
2314 { 0x4B, "name='REREG-THRESHOLD'" },
2315 { 0x4C, "name='T-BIT'" },
2317 { 0x4E, "name='AUTH-ENTITY'" },
2318 { 0x4F, "name='SPI'" },
2320 { 0x51, "type='PXLOGICAL'" },
2321 { 0x52, "type='PXPHYSICAL'" },
2322 { 0x53, "type='PORT'" },
2323 { 0x54, "type='VALIDITY'" },
2324 { 0x55, "type='NAPDEF'" },
2325 { 0x56, "type='BOOTSTRAP'" },
2326 { 0x57, "type='VENDORCONFIG'" },
2327 { 0x58, "type='CLIENTIDENTITY'" },
2328 { 0x59, "type='PXAUTHINFO'" },
2329 { 0x5A, "type='NAPAUTHINFO'" },
2330 { 0x5B, "type='ACCESS'" },
2334 static const value_string wbxml_provc10_attrStart_cp1
[] = {
2335 /* 0x00 -- 0x04 GLOBAL */
2337 { 0x07, "name='NAME'" },
2339 { 0x14, "name='INTERNET'" },
2341 { 0x1C, "name='STARTPAGE'" },
2343 { 0x22, "name='TO-NAPID'" },
2344 { 0x23, "name='PORTNBR'" },
2345 { 0x24, "name='SERVICE'" },
2347 { 0x2E, "name='AACCEPT'" },
2348 { 0x2F, "name='AAUTHDATA'" },
2349 { 0x30, "name='AAUTHLEVEL'" },
2350 { 0x31, "name='AAUTHNAME'" },
2351 { 0x32, "name='AAUTHSECRET'" },
2352 { 0x33, "name='AAUTHTYPE'" },
2353 { 0x34, "name='ADDR'" },
2354 { 0x35, "name='ADDRTYPE'" },
2355 { 0x36, "name='APPID'" },
2356 { 0x37, "name='APROTOCOL'" },
2357 { 0x38, "name='PROVIDER-ID'" },
2358 { 0x39, "name='TO-PROXY'" },
2359 { 0x3A, "name='URI'" },
2360 { 0x3B, "name='RULE'" },
2362 /* 0x40 -- 0x44 GLOBAL */
2366 { 0x53, "type='PORT'" },
2368 { 0x55, "type='APPLICATION'" },
2369 { 0x56, "type='APPADDR'" },
2370 { 0x57, "type='APPAUTH'" },
2371 { 0x58, "type='CLIENTIDENTITY'" },
2372 { 0x59, "type='RESOURCE'" },
2378 /***** Attribute Start tokens *****/
2379 static const value_string wbxml_provc10_attrValue_cp0
[] = {
2380 /* 0x80 -- 0x84 GLOBAL */
2384 { 0x88, "'ALPHA'" },
2386 { 0x8A, "'SCODE'" },
2387 { 0x8B, "'TETRA-ITSI'" },
2390 { 0x90, "'ANALOG-MODEM'" },
2391 { 0x91, "'V.120'" },
2392 { 0x92, "'V.110'" },
2394 { 0x94, "'BIT-TRANSPARENT'" },
2395 { 0x95, "'DIRECT-ASYNCHRONOUS-DATA-SERVICE'" },
2399 { 0x9C, "'HTTP-BASIC'" },
2400 { 0x9D, "'HTTP-DIGEST'" },
2401 { 0x9E, "'WTLS-SS'" },
2404 { 0xA2, "'GSM-USSD'" },
2405 { 0xA3, "'GSM-SMS'" },
2406 { 0xA4, "'ANSI-136-GUTS'" },
2407 { 0xA5, "'IS-95-CDMA-SMS'" },
2408 { 0xA6, "'IS-95-CDMA-CSD'" },
2409 { 0xA7, "'IS-95-CDMA-PACKET'" },
2410 { 0xA8, "'ANSI-136-CSD'" },
2411 { 0xA9, "'ANSI-136-GPRS'" },
2412 { 0xAA, "'GSM-CSD'" },
2413 { 0xAB, "'GSM-GPRS'" },
2414 { 0xAC, "'AMPS-CDPD'" },
2415 { 0xAD, "'PDC-CSD'" },
2416 { 0xAE, "'PDC-PACKET'" },
2417 { 0xAF, "'IDEN-SMS'" },
2418 { 0xB0, "'IDEN-CSD'" },
2419 { 0xB1, "'IDEN-PACKET'" },
2420 { 0xB2, "'FLEX/REFLEX'" },
2421 { 0xB3, "'PHS-SMS'" },
2422 { 0xB4, "'PHS-CSD'" },
2423 { 0xB5, "'TETRA-SDS'" },
2424 { 0xB6, "'TETRA-PACKET'" },
2425 { 0xB7, "'ANSI-136-GHOST'" },
2426 { 0xB8, "'MOBITEX-MPAK'" },
2427 { 0xB9, "'CDMA2000-IX-SIMPLE-IP'" },
2428 { 0xBA, "'CDMA2000-IX-MOBILE-IP'" },
2430 /* 0xC0 -- 0xC4 GLOBAL */
2431 { 0xC5, "'AUTOBAUDING'" },
2433 { 0xCA, "'CL-WSP'" },
2434 { 0xCB, "'CO-WSP'" },
2435 { 0xCC, "'CL-SEC-WSP'" },
2436 { 0xCD, "'CO-SEC-WSP'" },
2437 { 0xCE, "'CL-SEC-WTA'" },
2438 { 0xCF, "'CO-SEC-WTA'" },
2439 { 0xD0, "'OTA-HTTP-TO'" },
2440 { 0xD1, "'OTA-HTTP-TLS-TO'" },
2441 { 0xD2, "'OTA-HTTP-PO'" },
2442 { 0xD3, "'OTA-HTTP-TLS-PO'" },
2447 static const value_string wbxml_provc10_attrValue_cp1
[] = {
2448 /* 0x80 -- 0x84 GLOBAL */
2452 { 0x88, "'ALPHA'" },
2453 { 0x8D, "'APPSRV'" },
2457 /* XXX - Errors that require a fix in the OMA/WAP Client Provisioning specs:
2459 { 0xXXX, "'HTTP-'" },
2460 { 0xXXX, "'BASIC'" },
2461 { 0xXXX, "'DIGEST'" },
2470 /***** Token code page aggregation *****/
2471 static const value_valuestring wbxml_provc10_tags
[] = {
2472 { 0, wbxml_provc10_tags_cp0
},
2473 { 1, wbxml_provc10_tags_cp1
},
2477 static const value_valuestring wbxml_provc10_attrStart
[] = {
2478 { 0, wbxml_provc10_attrStart_cp0
},
2479 { 1, wbxml_provc10_attrStart_cp1
},
2483 static const value_valuestring wbxml_provc10_attrValue
[] = {
2484 { 0, wbxml_provc10_attrValue_cp0
},
2485 { 1, wbxml_provc10_attrValue_cp1
},
2489 static const wbxml_decoding decode_provc_10
= {
2490 "WAP Client Provisioning Document 1.0",
2491 "WAP ProvisioningDoc 1.0",
2492 { NULL
, NULL
, NULL
},
2493 default_opaque_binary_tag
,
2494 default_opaque_literal_tag
,
2495 default_opaque_binary_attr
,
2496 default_opaque_literal_attr
,
2499 wbxml_provc10_attrStart
,
2500 wbxml_provc10_attrValue
2509 * Email Notification
2510 ***************************************/
2512 /***** Global extension tokens *****/
2514 /***** Tag tokens *****/
2515 static const value_string wbxml_emnc10_tags_cp0
[] = {
2516 /* 0x00 -- 0x04 GLOBAL */
2522 /***** Attribute Start tokens *****/
2523 static const value_string wbxml_emnc10_attrStart_cp0
[] = {
2524 /* 0x00 -- 0x04 GLOBAL */
2525 { 0x05, "timestamp=" },
2526 { 0x06, "mailbox=" },
2527 { 0x07, "mailbox='mailat:'" },
2528 { 0x08, "mailbox='pop://'" },
2529 { 0x09, "mailbox='imap://'" },
2530 { 0x0a, "mailbox='http://'" },
2531 { 0x0b, "mailbox='http://www.'" },
2532 { 0x0c, "mailbox='https://'" },
2533 { 0x0D, "mailbox='https://www.'" },
2538 /***** Attribute Value tokens *****/
2539 /* Same as in SI 1.0 */
2541 /***** Token code page aggregation *****/
2542 static const value_valuestring wbxml_emnc10_tags
[] = {
2543 { 0, wbxml_emnc10_tags_cp0
},
2547 static const value_valuestring wbxml_emnc10_attrStart
[] = {
2548 { 0, wbxml_emnc10_attrStart_cp0
},
2552 static const value_valuestring wbxml_emnc10_attrValue
[] = {
2553 { 0, wbxml_sic10_attrValue_cp0
}, /* Same as SI 1.0 */
2557 static const wbxml_decoding decode_emnc_10
= {
2558 "E-Mail Notification 1.0",
2560 { NULL
, NULL
, NULL
},
2561 default_opaque_binary_tag
,
2562 default_opaque_literal_tag
,
2563 emnc10_opaque_binary_attr
,
2564 emnc10_opaque_literal_attr
,
2567 wbxml_emnc10_attrStart
,
2568 wbxml_emnc10_attrValue
2577 * SyncML Representation Protocol
2578 ***************************************/
2580 /***** Global extension tokens *****/
2582 /***** Tag tokens *****/
2583 static const value_string wbxml_syncmlc10_tags_cp0
[] = { /* SyncML 1.0 */
2584 /* 0x00 -- 0x04 GLOBAL */
2587 { 0x07, "Archive" },
2602 { 0x16, "LocName" },
2605 { 0x19, "MapItem" },
2610 { 0x1E, "NoResults" },
2612 { 0x20, "Replace" },
2613 { 0x21, "RespURI" },
2614 { 0x22, "Results" },
2616 { 0x24, "Sequence" },
2617 { 0x25, "SessionID" },
2620 { 0x28, "SourceRef" },
2623 { 0x2B, "SyncBody" },
2624 { 0x2C, "SyncHdr" },
2627 { 0x2F, "TargetRef" },
2628 /* 0x30 - Reserved */
2630 { 0x32, "VerProto" },
2635 static const value_string wbxml_syncmlc10_tags_cp1
[] = { /* MetInf 1.0 */
2636 /* 0x00 -- 0x04 GLOBAL */
2641 { 0x09, "FreeMem" },
2644 { 0x0C, "MaxMsgSize" },
2648 { 0x10, "NextNonce" },
2649 { 0x11, "SharedMem" },
2652 { 0x14, "Version" },
2657 /***** Attribute Start tokens *****/
2659 /***** Attribute Value tokens *****/
2661 /***** Token code page aggregation *****/
2662 static const value_valuestring wbxml_syncmlc10_tags
[] = {
2663 { 0, wbxml_syncmlc10_tags_cp0
}, /* -//SYNCML//DTD SyncML 1.0//EN */
2664 { 1, wbxml_syncmlc10_tags_cp1
}, /* -//SYNCML//DTD MetInf 1.0//EN */
2668 static const wbxml_decoding decode_syncmlc_10
= {
2669 "SyncML Representation Protocol 1.0",
2671 { NULL
, NULL
, NULL
},
2672 default_opaque_binary_tag
,
2673 default_opaque_literal_tag
,
2674 default_opaque_binary_attr
,
2675 default_opaque_literal_attr
,
2677 wbxml_syncmlc10_tags
,
2688 * SyncML Representation Protocol
2689 ***************************************/
2691 /***** Global extension tokens *****/
2693 /***** Tag tokens *****/
2694 static const value_string wbxml_syncmlc11_tags_cp0
[] = { /* SyncML 1.1 */
2695 /* 0x00 -- 0x04 GLOBAL */
2698 { 0x07, "Archive" },
2713 { 0x16, "LocName" },
2716 { 0x19, "MapItem" },
2721 { 0x1e, "NoResults" },
2723 { 0x20, "Replace" },
2724 { 0x21, "RespURI" },
2725 { 0x22, "Results" },
2727 { 0x24, "Sequence" },
2728 { 0x25, "SessionID" },
2731 { 0x28, "SourceRef" },
2734 { 0x2b, "SyncBody" },
2735 { 0x2c, "SyncHdr" },
2738 { 0x2f, "TargetRef" },
2739 /* 0x30 - Reserved */
2741 { 0x32, "VerProto" },
2742 { 0x33, "NumberOfChanges" },
2743 { 0x34, "MoreData" },
2748 static const value_string wbxml_syncmlc11_tags_cp1
[] = { /* MetInf 1.1 */
2749 /* 0x00 -- 0x04 GLOBAL */
2754 { 0x09, "FreeMem" },
2757 { 0x0C, "MaxMsgSize" },
2761 { 0x10, "NextNonce" },
2762 { 0x11, "SharedMem" },
2765 { 0x14, "Version" },
2766 { 0x15, "MaxObjSize" },
2771 /***** Attribute Start tokens *****/
2773 /***** Attribute Value tokens *****/
2775 /***** Token code page aggregation *****/
2776 static const value_valuestring wbxml_syncmlc11_tags
[] = {
2777 { 0, wbxml_syncmlc11_tags_cp0
}, /* -//SYNCML//DTD SyncML 1.1//EN */
2778 { 1, wbxml_syncmlc11_tags_cp1
}, /* -//SYNCML//DTD MetInf 1.1//EN */
2782 static const wbxml_decoding decode_syncmlc_11
= {
2783 "SyncML Representation Protocol 1.1",
2785 { NULL
, NULL
, NULL
},
2786 default_opaque_binary_tag
,
2787 default_opaque_literal_tag
,
2788 default_opaque_binary_attr
,
2789 default_opaque_literal_attr
,
2791 wbxml_syncmlc11_tags
,
2802 * SyncML Representation Protocol
2803 ***************************************/
2805 /***** Global extension tokens *****/
2807 /***** Tag tokens *****/
2808 static const value_string wbxml_syncmlc12_tags_cp0
[] = { /* SyncML 1.2 */
2809 /* 0x00 -- 0x04 GLOBAL */
2812 { 0x07, "Archive" },
2827 { 0x16, "LocName" },
2830 { 0x19, "MapItem" },
2835 { 0x1e, "NoResults" },
2837 { 0x20, "Replace" },
2838 { 0x21, "RespURI" },
2839 { 0x22, "Results" },
2841 { 0x24, "Sequence" },
2842 { 0x25, "SessionID" },
2845 { 0x28, "SourceRef" },
2848 { 0x2b, "SyncBody" },
2849 { 0x2c, "SyncHdr" },
2852 { 0x2f, "TargetRef" },
2853 /* 0x30 - Reserved */
2855 { 0x32, "VerProto" },
2856 { 0x33, "NumberOfChanges" },
2857 { 0x34, "MoreData" },
2861 { 0x38, "FilterType" },
2862 { 0x39, "SourceParent" },
2863 { 0x3a, "TargetParent" },
2865 { 0x3c, "Correlator" },
2870 static const value_string wbxml_syncmlc12_tags_cp1
[] = { /* MetInf 1.2 */
2871 /* 0x00 -- 0x04 GLOBAL */
2876 { 0x09, "FreeMem" },
2879 { 0x0C, "MaxMsgSize" },
2883 { 0x10, "NextNonce" },
2884 { 0x11, "SharedMem" },
2887 { 0x14, "Version" },
2888 { 0x15, "MaxObjSize" },
2889 { 0x16, "FieldLevel" },
2890 { 0x17, "FP" }, /* Extensions on certain devices */
2891 { 0x18, "ID" }, /* Extensions on certain devices */
2892 { 0x19, "IDContainer" }, /* Extensions on certain devices */
2893 { 0x1a, "IDPair" }, /* Extensions on certain devices */
2898 /***** Attribute Start tokens *****/
2900 /***** Attribute Value tokens *****/
2902 /***** Token code page aggregation *****/
2903 static const value_valuestring wbxml_syncmlc12_tags
[] = {
2904 { 0, wbxml_syncmlc12_tags_cp0
}, /* -//SYNCML//DTD SyncML 1.2//EN */
2905 { 1, wbxml_syncmlc12_tags_cp1
}, /* -//SYNCML//DTD MetInf 1.2//EN */
2906 /* Note: 02 reserved for DM use */
2910 static const wbxml_decoding decode_syncmlc_12
= {
2911 "SyncML Representation Protocol 1.2",
2913 { NULL
, NULL
, NULL
},
2914 default_opaque_binary_tag
,
2915 default_opaque_literal_tag
,
2916 default_opaque_binary_attr
,
2917 default_opaque_literal_attr
,
2919 wbxml_syncmlc12_tags
,
2923 /* Microsoft ActiveSync 1.0 (Actual Version Unknown - either 1.0 or 2.0, taken from [MS-ASWBXML].pdf)
2925 * ActiveSync Representation Protocol
2926 ***************************************/
2928 /***** Global extension tokens *****/
2930 /***** Tag tokens *****/
2931 static const value_string wbxml_mssyncc10_tags_cp0
[] = { /* ActiveSync 'AirSync:' Page */
2932 /* 0x00 -- 0x04 GLOBAL */
2934 { 0x06, "Responses" },
2939 { 0x0B, "SyncKey" },
2940 { 0x0C, "ClientId" },
2941 { 0x0D, "ServerId" },
2943 { 0x0F, "Collection" },
2945 { 0x12, "CollectionId" },
2946 { 0x13, "GetChanges" },
2947 { 0x14, "MoreAvailable" },
2948 { 0x15, "WindowSize" },
2949 { 0x16, "Commands" },
2950 { 0x17, "Options" },
2951 { 0x18, "FilterType" },
2952 { 0x1B, "Conflict" },
2953 { 0x1C, "Collections" },
2954 { 0x1D, "ApplicationData" },
2955 { 0x1E, "DeletesAsMoves" },
2956 { 0x20, "Supported" },
2957 { 0x21, "SoftDelete" },
2958 { 0x22, "MIMESupport" },
2959 { 0x23, "MIMETruncation" },
2962 { 0x26, "Partial" },
2963 { 0x27, "ConversationMode" },
2964 { 0x28, "MaxItems" },
2965 { 0x29, "HeartbeatInterval" },
2970 static const value_string wbxml_mssyncc10_tags_cp1
[] = { /* ActiveSync 'Contacts:' Page */
2971 /* 0x00 -- 0x04 GLOBAL */
2972 { 0x05, "Anniversary" },
2973 { 0x06, "AssistantName" },
2974 { 0x07, "AssistantTelephoneNumber" },
2975 { 0x08, "Birthday" },
2976 { 0x0C, "Business2PhoneNumber" },
2977 { 0x0D, "BusinessCity" },
2978 { 0x0E, "BusinessCountry" },
2979 { 0x0F, "BusinessPostalCode" },
2980 { 0x10, "BusinessState" },
2981 { 0x11, "BusinessStreet" },
2982 { 0x12, "BusinessFaxNumber" },
2983 { 0x13, "BusinessPhoneNumber" },
2984 { 0x14, "CarPhoneNumber" },
2985 { 0x15, "Categories" },
2986 { 0x16, "Category" },
2987 { 0x17, "Children" },
2989 { 0x19, "CompanyName" },
2990 { 0x1A, "Department" },
2991 { 0x1B, "Email1Address" },
2992 { 0x1C, "Email2Address" },
2993 { 0x1D, "Email3Address" },
2995 { 0x1F, "FirstName" },
2996 { 0x20, "Home2PhoneNumber" },
2997 { 0x21, "HomeCity" },
2998 { 0x22, "HomeCountry" },
2999 { 0x23, "HomePostalCode" },
3000 { 0x24, "HomeState" },
3001 { 0x25, "HomeStreet" },
3002 { 0x26, "HomeFaxNumber" },
3003 { 0x27, "HomePhoneNumber" },
3004 { 0x29, "JobTitle" },
3005 { 0x2A, "MiddleName" },
3006 { 0x2B, "MobilePhoneNumber" },
3007 { 0x2C, "OfficeLocation" },
3008 { 0x2D, "OtherCity" },
3009 { 0x2E, "OtherCountry" },
3010 { 0x2F, "OtherPostalCode" },
3011 { 0x30, "OtherState" },
3012 { 0x31, "OtherStreet" },
3013 { 0x32, "PagerNumber" },
3014 { 0x33, "RadioPhoneNumber" },
3018 { 0x37, "Webpage" },
3019 { 0x38, "YomiCompanyName" },
3020 { 0x39, "YomiFirstName" },
3021 { 0x3A, "YomiLastName" },
3022 { 0x3C, "Picture" },
3024 { 0x3E, "WeightedRank" },
3029 static const value_string wbxml_mssyncc10_tags_cp2
[] = { /* ActiveSync 'Email:' Page */
3030 /* 0x00 -- 0x04 GLOBAL */
3031 { 0x0F, "DateReceived" },
3032 { 0x11, "DisplayTo" },
3033 { 0x12, "Importance" },
3034 { 0x13, "MessageClass" },
3035 { 0x14, "Subject" },
3040 { 0x19, "ReplyTo" },
3041 { 0x1A, "AllDayEvent" },
3042 { 0x1B, "Categories" },
3043 { 0x1C, "Category" },
3044 { 0x1D, "DTStamp" },
3045 { 0x1E, "EndTime" },
3046 { 0x1F, "InstanceType" },
3047 { 0x20, "BusyStatus" },
3048 { 0x21, "Location" },
3049 { 0x22, "MeetingRequest" },
3050 { 0x23, "Organizer" },
3051 { 0x24, "RecurrenceId" },
3052 { 0x25, "Reminder" },
3053 { 0x26, "ResponseRequest" },
3054 { 0x27, "Recurrences" },
3055 { 0x28, "Recurrence" },
3056 { 0x29, "Recurrence_Type" },
3057 { 0x2A, "Recurrence_Until" },
3058 { 0x2B, "Recurrence_Occurrences" },
3059 { 0x2C, "Recurrence_Interval" },
3060 { 0x2D, "Recurrence_DayOfWeek" },
3061 { 0x2E, "Recurrence_DayOfMonth" },
3062 { 0x2F, "Recurrence_WeekOfMonth" },
3063 { 0x30, "Recurrence_MonthOfYear" },
3064 { 0x31, "StartTime" },
3065 { 0x32, "Sensitivity" },
3066 { 0x33, "TimeZone" },
3067 { 0x34, "GlobalObjId" },
3068 { 0x35, "ThreadTopic" },
3069 { 0x39, "InternetCPID" },
3071 { 0x3B, "FlagStatus" },
3072 { 0x3C, "ContentClass" },
3073 { 0x3D, "FlagType" },
3074 { 0x3E, "CompleteTime" },
3075 { 0x3F, "DisallowNewTimeProposal" },
3080 static const value_string wbxml_mssyncc10_tags_cp4
[] = { /* ActiveSync 'Calendar:' Page */
3081 /* 0x00 -- 0x04 GLOBAL */
3082 { 0x05, "TimeZone" },
3083 { 0x06, "AllDAyEvent" },
3084 { 0x07, "Attendees" },
3085 { 0x08, "Attendee" },
3086 { 0x09, "Attendee_Email" },
3087 { 0x0A, "Attendee_Name" },
3088 { 0x0D, "BusyStatus" },
3089 { 0x0E, "Categories" },
3090 { 0x0F, "Category" },
3091 { 0x11, "DTStamp" },
3092 { 0x12, "EndTime" },
3093 { 0x13, "Exception" },
3094 { 0x14, "Exceptions" },
3095 { 0x15, "Exception_Deleted" },
3096 { 0x16, "Exception_StartTime" },
3097 { 0x17, "Location" },
3098 { 0x18, "MeetingStatus" },
3099 { 0x19, "Organizer_Email" },
3100 { 0x1A, "Organizer_Name" },
3101 { 0x1B, "Recurrence" },
3102 { 0x1C, "Recurrence_Type" },
3103 { 0x1D, "Recurrence_Until" },
3104 { 0x1E, "Recurrence_Occurrences" },
3105 { 0x1F, "Recurrence_Interval" },
3106 { 0x20, "Recurrence_DayOfWeek" },
3107 { 0x21, "Recurrence_DayOfMonth" },
3108 { 0x22, "Recurrence_WeekOfMonth" },
3109 { 0x23, "Recurrence_MonthOfYear" },
3110 { 0x24, "Reminder" },
3111 { 0x25, "Sensitivity" },
3112 { 0x26, "Subject" },
3113 { 0x27, "StartTime" },
3115 { 0x29, "Attendee_Status" },
3116 { 0x2A, "Attendee_Type" },
3117 { 0x33, "DisallowNewTimeProposal" },
3118 { 0x34, "ResponseRequested" },
3119 { 0x35, "AppointmentReplyTime" },
3120 { 0x36, "ResponseType" },
3121 { 0x37, "CalendarType" },
3122 { 0x38, "IsLeapMonth" },
3123 { 0x39, "FirstDayOfWeek" },
3124 { 0x3A, "OnlineMeetingConfLink" },
3125 { 0x3B, "OnlineMeetingExternalLink" },
3130 static const value_string wbxml_mssyncc10_tags_cp5
[] = { /* ActiveSync 'Move:' Page */
3131 /* 0x00 -- 0x04 GLOBAL */
3132 { 0x05, "MoveItems" },
3134 { 0x07, "SrcMsgId" },
3135 { 0x08, "SrcFldId" },
3136 { 0x09, "DstFldId" },
3137 { 0x0A, "Response" },
3139 { 0x0C, "DstMsgId" },
3144 static const value_string wbxml_mssyncc10_tags_cp6
[] = { /* ActiveSync 'GetItemEstimate:' Page */
3145 /* 0x00 -- 0x04 GLOBAL */
3146 { 0x05, "GetItemEstimate" },
3147 { 0x06, "Version" },
3148 { 0x07, "Collections" },
3149 { 0x08, "Collection" },
3151 { 0x0A, "CollectionId" },
3152 { 0x0B, "DateTime" },
3153 { 0x0C, "Estimate" },
3154 { 0x0D, "Response" },
3160 static const value_string wbxml_mssyncc10_tags_cp7
[] = { /* ActiveSync 'FolderHierarchy:' Page */
3161 /* 0x00 -- 0x04 GLOBAL */
3162 { 0x07, "DisplayName" },
3163 { 0x08, "ServerId" },
3164 { 0x09, "ParentId" },
3167 { 0x0E, "Changes" },
3171 { 0x12, "SyncKey" },
3172 { 0x13, "FolderCreate" },
3173 { 0x14, "FolderDelete" },
3174 { 0x15, "FolderUpdate" },
3175 { 0x16, "FolderSync" },
3181 static const value_string wbxml_mssyncc10_tags_cp8
[] = { /* ActiveSync 'MeetingResponse:' Page */
3182 /* 0x00 -- 0x04 GLOBAL */
3183 { 0x05, "CalendarId" },
3184 { 0x06, "CollectionId" },
3185 { 0x07, "MeetingResponse" },
3186 { 0x08, "RequestId" },
3187 { 0x09, "Request" },
3190 { 0x0C, "UserResponse" },
3191 { 0x0E, "InstanceId" },
3196 static const value_string wbxml_mssyncc10_tags_cp9
[] = { /* ActiveSync 'Tasks:' Page */
3197 /* 0x00 -- 0x04 GLOBAL */
3198 { 0x08, "Categories" },
3199 { 0x09, "Category" },
3200 { 0x0A, "Complete" },
3201 { 0x0B, "DateCompleted" },
3202 { 0x0D, "DueDate" },
3203 { 0x0E, "Importance" },
3204 { 0x0F, "Recurrence" },
3205 { 0x10, "Recurrence_Type" },
3206 { 0x11, "Recurrence_Start" },
3207 { 0x12, "Recurrence_Until" },
3208 { 0x13, "Recurrence_Occurrences" },
3209 { 0x14, "Recurrence_Interval" },
3210 { 0x15, "Recurrence_DayOfMonth" },
3211 { 0x16, "Recurrence_DayOfWeek" },
3212 { 0x17, "Recurrence_WeekOfMonth" },
3213 { 0x18, "Recurrence_MonthOfYear" },
3214 { 0x19, "Recurrence_Regenerate" },
3215 { 0x1A, "Recurrence_DeadOccur" },
3216 { 0x1B, "ReminderSet" },
3217 { 0x1C, "ReminderTime" },
3218 { 0x1D, "Sensitivity" },
3219 { 0x1E, "StartDate" },
3220 { 0x1F, "UTCStartDate" },
3221 { 0x20, "Subject" },
3222 { 0x22, "OrdinalDate" },
3223 { 0x23, "SubOrdinalDate" },
3224 { 0x24, "CalendarType" },
3225 { 0x25, "IsLeapMonth" },
3226 { 0x26, "FirstDayOfWeek" },
3231 static const value_string wbxml_mssyncc10_tags_cp10
[] = { /* ActiveSync 'ResolveRecipients:' Page */
3232 /* 0x00 -- 0x04 GLOBAL */
3233 { 0x05, "ResolveRecipients" },
3234 { 0x06, "Response" },
3237 { 0x09, "Recipient" },
3238 { 0x0A, "DisplayName" },
3239 { 0x0B, "EmailAddress" },
3240 { 0x0C, "Certificates" },
3241 { 0x0D, "Certificate" },
3242 { 0x0E, "MiniCertificate" },
3243 { 0x0F, "Options" },
3245 { 0x11, "CertificateRetrieval" },
3246 { 0x12, "RecipientCount" },
3247 { 0x13, "MaxCertificates" },
3248 { 0x14, "MaxAmbiguousRecipients" },
3249 { 0x15, "CertificateCount" },
3250 { 0x16, "Availability" },
3251 { 0x17, "StartTime" },
3252 { 0x18, "EndTime" },
3253 { 0x19, "MergedFreeBusy" },
3254 { 0x1A, "Picture" },
3255 { 0x1B, "MaxSize" },
3257 { 0x1D, "MaxPictures" },
3262 static const value_string wbxml_mssyncc10_tags_cp11
[] = { /* ActiveSync 'ValidateCert:' Page */
3263 /* 0x00 -- 0x04 GLOBAL */
3264 { 0x05, "ValidateCert" },
3265 { 0x06, "Certificates" },
3266 { 0x07, "Certificate" },
3267 { 0x08, "CertificateChain" },
3268 { 0x09, "CheckCRL" },
3274 static const value_string wbxml_mssyncc10_tags_cp12
[] = { /* ActiveSync 'Contacts2:' Page */
3275 /* 0x00 -- 0x04 GLOBAL */
3276 { 0x05, "CustomerId" },
3277 { 0x06, "GovernmentId" },
3278 { 0x07, "IMAddress" },
3279 { 0x08, "IMAddress2" },
3280 { 0x09, "IMAddress3" },
3281 { 0x0A, "ManagerName" },
3282 { 0x0B, "CompanyMainPhone" },
3283 { 0x0C, "AccountName" },
3284 { 0x0D, "NickName" },
3290 static const value_string wbxml_mssyncc10_tags_cp13
[] = { /* ActiveSync 'Ping:' Page */
3291 /* 0x00 -- 0x04 GLOBAL */
3293 { 0x06, "AutdState" },
3295 { 0x08, "HeartbeatInterval" },
3296 { 0x09, "Folders" },
3300 { 0x0D, "MaxFolders" },
3305 static const value_string wbxml_mssyncc10_tags_cp14
[] = { /* ActiveSync 'Provision:' Page */
3306 /* 0x00 -- 0x04 GLOBAL */
3307 { 0x05, "Provision" },
3308 { 0x06, "Policies" },
3310 { 0x08, "PolicyType" },
3311 { 0x09, "PolicyKey" },
3314 { 0x0C, "RemoteWipe" },
3315 { 0x0D, "EASProvisionDoc" },
3316 { 0x0E, "DevicePasswordEnabled" },
3317 { 0x0F, "AlphanumericDevicePasswordRequired" },
3318 { 0x10, "DeviceEncryptionEnabled" },
3319 { 0x11, "PasswordRecoveryEnabled" },
3320 { 0x13, "AttachmentsEnabled" },
3321 { 0x14, "MinDevicePasswordLength" },
3322 { 0x15, "MaxInactivityTimeDeviceLock" },
3323 { 0x16, "MaxDevicePasswordFailedAttempts" },
3324 { 0x17, "MaxAttachmentSize" },
3325 { 0x18, "AllowSimpleDevicePassword" },
3326 { 0x19, "DevicePasswordExpiration" },
3327 { 0x1A, "DevicePasswordHistory" },
3328 { 0x1B, "AllowStorageCard" },
3329 { 0x1C, "AllowCamera" },
3330 { 0x1D, "RequireDeviceEncryption" },
3331 { 0x1E, "AllowUnsignedApplications" },
3332 { 0x1F, "AllowUnsignedInstallationPackages" },
3333 { 0x20, "MinDevicePasswordComplexCharacters" },
3334 { 0x21, "AllowWiFi" },
3335 { 0x22, "AllowTextMessaging" },
3336 { 0x23, "AllowPOPIMAPEmail" },
3337 { 0x24, "AllowBluetooth" },
3338 { 0x25, "AllowIrDA" },
3339 { 0x26, "RequireManualSyncWhenRoaming" },
3340 { 0x27, "AllowDesktopSync" },
3341 { 0x28, "MaxCalendarAgeFilter" },
3342 { 0x29, "AllowHTMLEmail" },
3343 { 0x2A, "MaxEmailAgeFilter" },
3344 { 0x2B, "MaxEmailBodyTruncationSize" },
3345 { 0x2C, "MaxEmailHTMLBodyTruncationSize" },
3346 { 0x2D, "RequireSignedSMIMEMessages" },
3347 { 0x2E, "RequireEncryptedSMIMEMessages" },
3348 { 0x2F, "RequireSignedSMIMEAlgorithm" },
3349 { 0x30, "RequireEncryptionSMIMEAlgorithm" },
3350 { 0x31, "AllowSMIMEEncryptionAlgorithmNegotiation" },
3351 { 0x32, "AllowSMIMESoftCerts" },
3352 { 0x33, "AllowBrowser" },
3353 { 0x34, "AllowConsumerEmail" },
3354 { 0x35, "AllowRemoteDesktop" },
3355 { 0x36, "AllowInternetSharing" },
3356 { 0x37, "UnapprovedInROMApplicationList" },
3357 { 0x38, "ApplicationName" },
3358 { 0x39, "ApprovedApplicationList" },
3364 static const value_string wbxml_mssyncc10_tags_cp15
[] = { /* ActiveSync 'Search:' Page */
3365 /* 0x00 -- 0x04 GLOBAL */
3370 { 0x0A, "Options" },
3373 { 0x0D, "Response" },
3375 { 0x0F, "Properties" },
3377 { 0x11, "EqualTo" },
3381 { 0x15, "FreeText" },
3382 { 0x17, "DeepTraversal" },
3384 { 0x19, "RebuildResults" },
3385 { 0x1A, "LessThan" },
3386 { 0x1B, "GreaterThan" },
3387 { 0x1E, "UserName" },
3388 { 0x1F, "Password" },
3389 { 0x20, "ConversationId" },
3390 { 0x21, "Picture" },
3391 { 0x22, "MaxSize" },
3392 { 0x23, "MaxPictures" },
3397 static const value_string wbxml_mssyncc10_tags_cp16
[] = { /* ActiveSync 'Gal:' Page */
3398 /* 0x00 -- 0x04 GLOBAL */
3399 { 0x05, "DisplayName" },
3403 { 0x09, "Company" },
3405 { 0x0B, "FirstName" },
3406 { 0x0C, "LastName" },
3407 { 0x0D, "HomePhone" },
3408 { 0x0E, "MobilePhone" },
3409 { 0x0F, "EmailAddress" },
3410 { 0x10, "Picture" },
3417 static const value_string wbxml_mssyncc10_tags_cp17
[] = { /* ActiveSync 'AirSyncBase:' Page */
3418 /* 0x00 -- 0x04 GLOBAL */
3419 { 0x05, "BodyPreference" },
3421 { 0x07, "TruncationSize" },
3422 { 0x08, "AllOrNone" },
3425 { 0x0C, "EstimatedDataSize" },
3426 { 0x0D, "Truncated" },
3427 { 0x0E, "Attachments" },
3428 { 0x0F, "Attachment" },
3429 { 0x10, "DisplayName" },
3430 { 0x11, "FileReference" },
3432 { 0x13, "ContentId" },
3433 { 0x14, "ContentLocation" },
3434 { 0x15, "IsInline" },
3435 { 0x16, "NativeBodyType" },
3436 { 0x17, "ContentType" },
3437 { 0x18, "Preview" },
3438 { 0x19, "BodyPartReference" },
3439 { 0x1A, "BodyPart" },
3445 static const value_string wbxml_mssyncc10_tags_cp18
[] = { /* ActiveSync 'Settings:' Page */
3446 /* 0x00 -- 0x04 GLOBAL */
3447 { 0x05, "Settings" },
3452 { 0x0A, "OofState" },
3453 { 0x0B, "StartTime" },
3454 { 0x0C, "EndTime" },
3455 { 0x0D, "OofMessage" },
3456 { 0x0E, "AppliesToInternal" },
3457 { 0x0F, "AppliesToExternalKnown" },
3458 { 0x10, "AppliesToExternalUnknown" },
3459 { 0x11, "Enabled" },
3460 { 0x12, "ReplyMessage" },
3461 { 0x13, "BodyType" },
3462 { 0x14, "DevicePassword" },
3463 { 0x15, "Password" },
3464 { 0x16, "DeviceInformation" },
3467 { 0x19, "FriendlyName" },
3469 { 0x1B, "OSLanguage" },
3470 { 0x1C, "PhoneNumber" },
3471 { 0x1D, "UserInformation" },
3472 { 0x1E, "EmailAddresses" },
3473 { 0x1F, "SmtpAddress" },
3474 { 0x20, "UserAgent" },
3475 { 0x21, "EnableOutboundSMS" },
3476 { 0x22, "MobileOperator" },
3477 { 0x23, "PrimarySmtpAddress" },
3478 { 0x24, "Accounts" },
3479 { 0x25, "Account" },
3480 { 0x26, "AccountId" },
3481 { 0x27, "AccountName" },
3482 { 0x28, "UserDisplayName" },
3483 { 0x29, "SendDisabled" },
3484 { 0x2B, "RightsManagementInformation" },
3489 static const value_string wbxml_mssyncc10_tags_cp19
[] = { /* ActiveSync 'DocumentLibrary:' Page */
3490 /* 0x00 -- 0x04 GLOBAL */
3492 { 0x06, "DisplayName" },
3493 { 0x07, "IsFolder" },
3494 { 0x09, "CreationDate" },
3495 { 0x0A, "LastModifiedDate" },
3496 { 0x0B, "ContentLength" },
3497 { 0x0C, "ContentType" },
3502 static const value_string wbxml_mssyncc10_tags_cp20
[] = { /* ActiveSync 'ItemOperations:' Page */
3503 /* 0x00 -- 0x04 GLOBAL */
3504 { 0x05, "ItemOperations" },
3507 { 0x08, "Options" },
3510 { 0x0B, "Properties" },
3513 { 0x0E, "Response" },
3514 { 0x0F, "Version" },
3517 { 0x12, "EmptyFolderContents" },
3518 { 0x13, "DeleteSubFolders" },
3519 { 0x14, "UserName" },
3520 { 0x15, "Password" },
3522 { 0x17, "DstFldId" },
3523 { 0x18, "ConversationId" },
3524 { 0x19, "MoveAlways" },
3529 static const value_string wbxml_mssyncc10_tags_cp21
[] = { /* ActiveSync 'ComposeMail:' Page */
3530 /* 0x00 -- 0x04 GLOBAL */
3531 { 0x05, "SendMail" },
3532 { 0x06, "SmartForward" },
3533 { 0x07, "SmartReply" },
3534 { 0x08, "SaveInSentItems" },
3535 { 0x09, "ReplaceMime" },
3537 { 0x0C, "FolderId" },
3540 { 0x0F, "InstanceId" },
3542 { 0x11, "ClientId" },
3544 { 0x13, "AccountId" },
3549 static const value_string wbxml_mssyncc10_tags_cp22
[] = { /* ActiveSync 'Email2:' Page */
3550 /* 0x00 -- 0x04 GLOBAL */
3551 { 0x05, "UmCallerID" },
3552 { 0x06, "UmUserNotes" },
3553 { 0x07, "UmAttDuration" },
3554 { 0x08, "UmAttOrder" },
3555 { 0x09, "ConversationId" },
3556 { 0x0A, "ConversationIndex" },
3557 { 0x0B, "LastVerbExecuted" },
3558 { 0x0C, "LastVerbExecutionTime" },
3559 { 0x0D, "ReceivedAsBcc" },
3561 { 0x0F, "CalendarType" },
3562 { 0x10, "IsLeapMonth" },
3563 { 0x11, "AccountId" },
3564 { 0x12, "FirstDayOfWeek" },
3565 { 0x13, "MeetingMessageType" },
3570 static const value_string wbxml_mssyncc10_tags_cp23
[] = { /* ActiveSync 'Notes:' Page */
3571 /* 0x00 -- 0x04 GLOBAL */
3572 { 0x05, "Subject" },
3573 { 0x06, "MessageClass" },
3574 { 0x07, "LastModifiedDate" },
3575 { 0x08, "Categories" },
3576 { 0x09, "Category" },
3581 static const value_string wbxml_mssyncc10_tags_cp24
[] = { /* ActiveSync 'RightsManagement:' Page */
3582 /* 0x00 -- 0x04 GLOBAL */
3583 { 0x05, "RightsManagementSupport" },
3584 { 0x06, "RightsManagementTemplates" },
3585 { 0x07, "RightsManagementTemplate" },
3586 { 0x08, "RightsManagementLicense" },
3587 { 0x09, "EditAllowed" },
3588 { 0x0A, "ReplyAllowed" },
3589 { 0x0B, "ReplyAllAllowed" },
3590 { 0x0C, "ForwardAllowed" },
3591 { 0x0D, "ModifyRecipientsAllowed" },
3592 { 0x0E, "ExtractAllowed" },
3593 { 0x0F, "PrintAllowed" },
3594 { 0x10, "ExportAllowed" },
3595 { 0x11, "ProgrammaticAccessAllowed" },
3596 { 0x12, "RMOwner" },
3597 { 0x13, "ContentExpiryDate" },
3598 { 0x14, "TemplateId" },
3599 { 0x15, "TemplateName" },
3600 { 0x16, "TemplateDescription" },
3601 { 0x17, "ContentOwner" },
3602 { 0x18, "RemoveRightsManagementDistribution" },
3608 /***** Attribute Start tokens *****/
3610 /***** Attribute Value tokens *****/
3612 /***** Token code page aggregation *****/
3613 static const value_valuestring wbxml_mssyncc10_tags
[] = {
3614 { 0x00, wbxml_mssyncc10_tags_cp0
}, /* AirSync: */
3615 { 0x01, wbxml_mssyncc10_tags_cp1
}, /* Contacts: */
3616 { 0x02, wbxml_mssyncc10_tags_cp2
}, /* Email: */
3617 { 0x04, wbxml_mssyncc10_tags_cp4
}, /* Calendar: */
3618 { 0x05, wbxml_mssyncc10_tags_cp5
}, /* Move: */
3619 { 0x06, wbxml_mssyncc10_tags_cp6
}, /* GetItemEstimate: */
3620 { 0x07, wbxml_mssyncc10_tags_cp7
}, /* FolderHierarchy: */
3621 { 0x08, wbxml_mssyncc10_tags_cp8
}, /* MeetingResponse: */
3622 { 0x09, wbxml_mssyncc10_tags_cp9
}, /* Tasks: */
3623 { 0x0A, wbxml_mssyncc10_tags_cp10
}, /* ResolveRecipients: */
3624 { 0x0B, wbxml_mssyncc10_tags_cp11
}, /* ValidateCert: */
3625 { 0x0C, wbxml_mssyncc10_tags_cp12
}, /* Contacts2: */
3626 { 0x0D, wbxml_mssyncc10_tags_cp13
}, /* Ping: */
3627 { 0x0E, wbxml_mssyncc10_tags_cp14
}, /* Provision: */
3628 { 0x0F, wbxml_mssyncc10_tags_cp15
}, /* Search: */
3629 { 0x10, wbxml_mssyncc10_tags_cp16
}, /* Gal: */
3630 { 0x11, wbxml_mssyncc10_tags_cp17
}, /* AirSyncBase: */
3631 { 0x12, wbxml_mssyncc10_tags_cp18
}, /* Settings: */
3632 { 0x13, wbxml_mssyncc10_tags_cp19
}, /* DocumentLibrary: */
3633 { 0x14, wbxml_mssyncc10_tags_cp20
}, /* ItemOperations: */
3634 { 0x15, wbxml_mssyncc10_tags_cp21
}, /* ComposeMail: */
3635 { 0x16, wbxml_mssyncc10_tags_cp22
}, /* Email2: */
3636 { 0x17, wbxml_mssyncc10_tags_cp23
}, /* Notes: */
3637 { 0x18, wbxml_mssyncc10_tags_cp24
}, /* RightsManagement: */
3642 static const wbxml_decoding decode_mssync_10
= {
3643 "Microsoft ActiveSync",
3645 { NULL
, NULL
, NULL
},
3646 default_opaque_binary_tag
,
3647 default_opaque_literal_tag
,
3648 default_opaque_binary_attr
,
3649 default_opaque_literal_attr
,
3651 wbxml_mssyncc10_tags
,
3662 ***************************************/
3664 /***** Global extension tokens *****/
3666 /***** Tag tokens *****/
3667 static const value_string wbxml_channelc10_tags_cp0
[] = {
3668 /* 0x00 -- 0x04 GLOBAL */
3669 { 0x05, "channel" },
3671 { 0x07, "abstract" },
3672 { 0x08, "resource" },
3677 /***** Attribute Start tokens *****/
3678 static const value_string wbxml_channelc10_attrStart_cp0
[] = {
3679 /* 0x00 -- 0x04 GLOBAL */
3680 { 0x05, "maxspace=" },
3683 { 0x08, "href='http://'" },
3684 { 0x09, "href='https://'" },
3685 { 0x0A, "lastmod=" },
3688 { 0x0D, "success=" },
3689 { 0x0E, "success='http://'" },
3690 { 0x0F, "success='https://'" },
3691 { 0x10, "failure=" },
3692 { 0x11, "failure='http://'" },
3693 { 0x12, "failure='https://'" },
3694 { 0x13, "EventId=" },
3699 /***** Attribute Value tokens *****/
3701 /***** Token code page aggregation *****/
3702 static const value_valuestring wbxml_channelc10_tags
[] = {
3703 { 0, wbxml_channelc10_tags_cp0
},
3707 static const value_valuestring wbxml_channelc10_attrStart
[] = {
3708 { 0, wbxml_channelc10_attrStart_cp0
},
3712 static const wbxml_decoding decode_channelc_10
= {
3713 "Wireless Telephony Application (WTA) Channel 1.0",
3715 { NULL
, NULL
, NULL
},
3716 default_opaque_binary_tag
,
3717 default_opaque_literal_tag
,
3718 default_opaque_binary_attr
,
3719 default_opaque_literal_attr
,
3721 wbxml_channelc10_tags
,
3722 wbxml_channelc10_attrStart
,
3730 /* application/x-wap-prov.browser-settings
3731 * application/x-wap-prov.browser-bookmarks
3733 * Nokia OTA Provisioning document format
3734 ***************************************/
3736 /***** Global extension tokens *****/
3738 /***** Tag tokens *****/
3739 static const value_string wbxml_nokiaprovc70_tags_cp0
[] = {
3740 /* 0x00 -- 0x04 GLOBAL */
3741 { 0x05, "CHARACTERISTIC-LIST" },
3742 { 0x06, "CHARACTERISTIC" },
3748 /***** Attribute Start tokens *****/
3749 static const value_string wbxml_nokiaprovc70_attrStart_cp0
[] = {
3750 /* 0x00 -- 0x04 GLOBAL */
3751 { 0x06, "TYPE='ADDRESS'" },
3752 { 0x07, "TYPE='URL'" },
3753 { 0x08, "TYPE='NAME'" },
3756 { 0x12, "NAME='BEARER'" },
3757 { 0x13, "NAME='PROXY'" },
3758 { 0x14, "NAME='PORT'" },
3759 { 0x15, "NAME='NAME'" },
3760 { 0x16, "NAME='PROXY_TYPE'" },
3761 { 0x17, "NAME='URL'" },
3762 { 0x18, "NAME='PROXY_AUTHNAME'" },
3763 { 0x19, "NAME='PROXY_AUTHSECRET'" },
3764 { 0x1A, "NAME='SMS_SMSC_ADDRESS'" },
3765 { 0x1B, "NAME='USSD_SERVICE_CODE'" },
3766 { 0x1C, "NAME='GPRS_ACCESSPOINTNAME'" },
3767 { 0x1D, "NAME='PPP_LOGINTYPE'" },
3768 { 0x1E, "NAME='PROXY_LOGINTYPE'" },
3769 { 0x21, "NAME='CSD_DIALSTRING'" },
3770 { 0x22, "NAME='PPP_AUTHTYPE'" },
3771 { 0x23, "NAME='PPP_AUTHNAME'" },
3772 { 0x24, "NAME='PPP_AUTHSECRET'" },
3773 { 0x28, "NAME='CSD_CALLTYPE'" },
3774 { 0x29, "NAME='CSD_CALLSPEED'" },
3775 { 0x45, "VALUE='GSM/CSD'" },
3776 { 0x46, "VALUE='GSM/SMS'" },
3777 { 0x47, "VALUE='GSM/USSD'" },
3778 { 0x48, "VALUE='IS-136/CSD'" },
3779 { 0x49, "VALUE='GPRS'" },
3780 { 0x60, "VALUE='9200'" },
3781 { 0x61, "VALUE='9201'" },
3782 { 0x62, "VALUE='9202'" },
3783 { 0x63, "VALUE='9203'" },
3784 { 0x64, "VALUE='AUTOMATIC'" },
3785 { 0x65, "VALUE='MANUAL'" },
3786 { 0x6A, "VALUE='AUTO'" },
3787 { 0x6B, "VALUE='9600'" },
3788 { 0x6C, "VALUE='14400'" },
3789 { 0x6D, "VALUE='19200'" },
3790 { 0x6E, "VALUE='28800'" },
3791 { 0x6F, "VALUE='38400'" },
3792 { 0x70, "VALUE='PAP'" },
3793 { 0x71, "VALUE='CHAP'" },
3794 { 0x72, "VALUE='ANALOGUE'" },
3795 { 0x73, "VALUE='ISDN'" },
3796 { 0x74, "VALUE='43200'" },
3797 { 0x75, "VALUE='57600'" },
3798 { 0x76, "VALUE='MSISDN_NO'" },
3799 { 0x77, "VALUE='IPV4'" },
3800 { 0x78, "VALUE='MS_CHAP'" },
3801 { 0x7C, "TYPE='MMSURL'" },
3802 { 0x7D, "TYPE='ID'" },
3803 { 0x7E, "NAME='ISP_NAME'" },
3804 { 0x7F, "TYPE='BOOKMARK'" },
3809 /***** Attribute Value tokens *****/
3811 /***** Token code page aggregation *****/
3812 static const value_valuestring wbxml_nokiaprovc70_tags
[] = {
3813 { 0, wbxml_nokiaprovc70_tags_cp0
},
3817 static const value_valuestring wbxml_nokiaprovc70_attrStart
[] = {
3818 { 0, wbxml_nokiaprovc70_attrStart_cp0
},
3822 static const wbxml_decoding decode_nokiaprovc_70
= {
3823 "Nokia Client Provisioning 7.0",
3824 "Nokia Client Provisioning 7.0",
3825 { NULL
, NULL
, NULL
},
3826 default_opaque_binary_tag
,
3827 default_opaque_literal_tag
,
3828 default_opaque_binary_attr
,
3829 default_opaque_literal_attr
,
3831 wbxml_nokiaprovc70_tags
,
3832 wbxml_nokiaprovc70_attrStart
,
3842 * User-Agent Profile (used in profile-diff WSP header)
3843 ***************************************/
3845 /***** Global extension tokens *****/
3847 /***** Tag tokens *****/
3848 /* CodePage 0 RDF */
3849 static const value_string wbxml_uaprof_tags_cp0
[] = {
3851 {0x06, "rdf:Description"},
3857 {0x0C, "rdf:value"},
3858 {0x0D, "rdf:subject"},
3859 {0x0E, "rdf:predicate"},
3860 {0x0F, "rdf:object"},
3865 /* CodePage 1 Core Vocabulary */
3866 static const value_string wbxml_uaprof_tags_cp1
[] = {
3867 {0x06, "rdf:Description"},
3873 {0x0C, "prf:component"},
3874 {0x0D, "prf:defaults"},
3875 {0x0E, "prf:BitsPerPixel"},
3876 {0x0F, "prf:ColorCapable"},
3878 {0x11, "prf:ImageCapable"},
3879 {0x12, "prf:InputCharSet"},
3880 {0x13, "prf:Keyboard"},
3881 {0x15, "prf:Model"},
3882 {0x16, "prf:OutputCharSet"},
3883 {0x17, "prf:PointingResolution"},
3884 {0x18, "prf:ScreenSize"},
3885 {0x19, "prf:ScreenSizeChar"},
3886 {0x1A, "prf:NumberOfSoftKeys"},
3887 {0x1B, "prf:SoundOutputCapable"},
3888 {0x1C, "prf:TextInputCapable"},
3889 {0x1D, "prf:Vendor"},
3890 {0x1E, "prf:VoiceInputCapable"},
3891 {0x1F, "prf:AcceptDownloadableSoftware"},
3892 {0x20, "prf:AudioInputEncoder"},
3893 {0x21, "prf:DownloadableSoftwareSupport"},
3894 {0x22, "prf:JavaEnabled"},
3895 {0x23, "prf:JVMVersion"},
3896 {0x24, "prf:MexeClassmark"},
3897 {0x25, "prf:MexeSpec"},
3898 {0x26, "prf:OSName"},
3899 {0x27, "prf:OSVendor"},
3900 {0x28, "prf:OSVersion"},
3901 {0x29, "prf:RecipientAppAgent"},
3902 {0x2A, "prf:SoftwareNumber"},
3903 {0x2B, "prf:VideoInputEncoder"},
3904 {0x2C, "prf:CurrentBearerService"},
3905 {0x2D, "prf:SecuritySupport"},
3906 {0x2E, "prf:SupportedBearers"},
3907 {0x2F, "prf:WapDeviceClass"},
3908 {0x30, "prf:WapPushMsgPriority"}, /* Deprecated */
3909 {0x31, "prf:WapPushMsgSize"}, /* Deprecated */
3910 {0x32, "prf:WapVersion"},
3911 {0x33, "prf:WmlDeckSize"},
3912 {0x34, "prf:WmlScriptLibraries"},
3913 {0x35, "prf:WmlScriptVersion"},
3914 {0x36, "prf:WmlVersion"},
3915 {0x37, "prf:WtaiLibraries"},
3916 {0x38, "prf:WtaVersion"},
3917 {0x39, "prf:PixelAspectRatio"},
3918 {0x3A, "prf:StandardFontProportional"},
3919 {0x3B, "prf:WapSupportedApplications"}, /* Deprecated */
3920 {0x3C, "prf:BluetoothProfile"},
3921 {0x3D, "prf:MexeClassmarks"},
3922 {0x3E, "prf:MexeSecureDomains"},
3927 /* CodePage 4 Core Vocabulary (continued) */
3928 static const value_string wbxml_uaprof_tags_cp4
[] = {
3929 {0x10, "prf:SupportedBluetoothVersion"},
3930 {0x11, "prf:SupportedPictogramSet"},
3931 {0x12, "prf:CcppAccept"},
3932 {0x13, "prf:CcppAccept-Charset"},
3933 {0x14, "prf:CcppAccept-Encoding"},
3934 {0x15, "prf:CcppAccept-Language"},
3939 /* CodePage 2 BrowserUA */
3940 static const value_string wbxml_uaprof_tags_cp2
[] = {
3941 {0x05, "rdf:Description"},
3947 {0x0B, "prf:component"},
3948 {0x0C, "prf:defaults"},
3949 {0x0D, "prf:BrowserName"},
3950 {0x0E, "prf:BrowserVersion"},
3951 {0x0F, "prf:CcppAccept"}, /* Deprecated */
3952 {0x10, "prf:CcppAccept-Charset"}, /* Deprecated */
3953 {0x11, "prf:CcppAccept-Encoding"}, /* Deprecated */
3954 {0x12, "prf:CcppAccept-Language"}, /* Deprecated */
3955 {0x13, "prf:DownloadableBrowserApps"},
3956 {0x14, "prf:FramesCapable"},
3957 {0x15, "prf:HtmlVersion"},
3958 {0x16, "prf:JavaAppletEnabled"},
3959 {0x17, "prf:JavaScriptEnabled"},
3960 {0x18, "prf:JavaScriptVersion"},
3961 {0x19, "prf:PreferenceForFrames"},
3962 {0x1A, "prf:TablesCapable"},
3963 {0x1B, "prf:XhtmlVersion"},
3964 {0x1C, "prf:XhtmlModules"},
3969 /* CodePage 3 PushCharacteristics */
3970 static const value_string wbxml_uaprof_tags_cp3
[] = {
3971 {0x05, "rdf:Description"},
3977 {0x0B, "prf:component"},
3978 {0x0C, "prf:defaults"},
3979 {0x0D, "prf:Push-Accept"},
3980 {0x0E, "prf:Push-Accept-Charset"},
3981 {0x0F, "prf:Push-Accept-Encoding"},
3982 {0x10, "prf:Push-Accept-Language"},
3983 {0x11, "prf:Push-Accept-AppID"},
3984 {0x12, "prf:Push-MsgSize"},
3985 {0x13, "prf:Push-MaxPushReq"},
3990 /***** Attribute Start tokens *****/
3991 /* CodePage 0 RDF */
3992 static const value_string wbxml_uaprof_attrStart_cp0
[] = {
3994 {0x06, "rdf:about"},
3995 {0x07, "rdf:aboutEach"},
3996 {0x08, "rdf:aboutEachPrefix"},
3997 {0x09, "rdf:bagID"},
3999 {0x0B, "rdf:resource"},
4000 {0x0C, "rdf:parseType='Literal'"},
4001 {0x0D, "rdf:parseType='Resource'"},
4003 {0x0F, "xmlns:prf"},
4004 {0x10, "xmlns:rdf"},
4009 /* CodePage 1 Core Vocabulary */
4010 static const value_string wbxml_uaprof_attrStart_cp1
[] = {
4011 {0x05, "rdf:resource"},
4012 {0x06, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
4013 "ccppschema-20010430#HardwarePlatform'"},
4014 {0x07, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
4015 "ccppschema-20010430#SoftwarePlatform'"},
4016 {0x08, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
4017 "ccppschema-20010430#NetworkCharacteristics'"},
4018 {0x09, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
4019 "ccppschema-20010430#WapCharacteristics'"},
4020 {0x0A, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
4021 "ccppschema-20010430#BrowserUA'"},
4022 {0x0B, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
4023 "ccppschema-20010430#PushCharacteristics'"},
4024 {0x10, "prf:BitsPerPixel"},
4025 {0x11, "prf:ColorCapable='Yes'"},
4026 {0x12, "prf:ColorCapable='No'"},
4028 {0x14, "prf:ImageCapable='Yes'"},
4029 {0x15, "prf:ImageCapable='No'"},
4030 {0x16, "prf:InputCharSet"},
4031 {0x17, "prf:Keyboard"},
4032 {0x19, "prf:Model"},
4033 {0x1A, "prf:OutputCharSet"},
4034 {0x1B, "prf:PointingResolution"},
4035 {0x1C, "prf:ScreenSize"},
4036 {0x1D, "prf:ScreenSizeChar"},
4037 {0x1E, "prf:NumberOfSoftKeys='Yes'"},
4038 {0x20, "prf:SoundOutputCapable='Yes'"},
4039 {0x21, "prf:SoundOutputCapable='No'"},
4040 {0x22, "prf:TextInputCapable='Yes'"},
4041 {0x23, "prf:TextInputCapable='No'"},
4042 {0x24, "prf:Vendor"},
4043 {0x25, "prf:VoiceInputCapable='Yes'"},
4044 {0x26, "prf:VoiceInputCapable='No'"},
4045 {0x27, "prf:PixelAspectRatio"},
4046 {0x28, "prf:StandardFontProportional='Yes'"},
4047 {0x29, "prf:StandardFontProportional='No'"},
4048 {0x30, "prf:AcceptDownloadableSoftware='Yes'"},
4049 {0x31, "prf:AcceptDownloadableSoftware='No'"},
4050 {0x32, "prf:AudioInputEncoder"},
4051 {0x33, "prf:DownloadableSoftwareSupport"},
4052 {0x35, "prf:JavaEnabled='Yes'"},
4053 {0x36, "prf:JavaEnabled='No'"},
4054 {0x37, "prf:JVMVersion"},
4055 {0x38, "prf:MexeClassmark"},
4056 {0x39, "prf:MexeSpec"},
4057 {0x3A, "prf:OSName"},
4058 {0x3B, "prf:OSVendor"},
4059 {0x3C, "prf:OSVersion"},
4060 {0x3D, "prf:RecipientAppAgent"},
4061 {0x3E, "prf:SoftwareNumber"},
4062 {0x21, "prf:SoundOutputCapable='No'"},
4063 {0x22, "prf:TextInputCapable='Yes'"},
4064 {0x23, "prf:TextInputCapable='No'"},
4065 {0x24, "prf:Vendor"},
4066 {0x25, "prf:VoiceInputCapable='Yes'"},
4067 {0x26, "prf:VoiceInputCapable='No'"},
4068 {0x27, "prf:PixelAspectRatio"},
4069 {0x28, "prf:StandardFontProportional='Yes'"},
4070 {0x29, "prf:StandardFontProportional='No'"},
4071 {0x30, "prf:AcceptDownloadableSoftware='Yes'"},
4072 {0x31, "prf:AcceptDownloadableSoftware='No'"},
4073 {0x32, "prf:AudioInputEncoder"},
4074 {0x33, "prf:DownloadableSoftwareSupport"},
4075 {0x35, "prf:JavaEnabled='Yes'"},
4076 {0x36, "prf:JavaEnabled='No'"},
4077 {0x37, "prf:JVMVersion"},
4078 {0x38, "prf:MexeClassmark"},
4079 {0x39, "prf:MexeSpec"},
4080 {0x3A, "prf:OSName"},
4081 {0x3B, "prf:OSVendor"},
4082 {0x3C, "prf:OSVersion"},
4083 {0x3D, "prf:RecipientAppAgent"},
4084 {0x3E, "prf:SoftwareNumber"},
4085 {0x3F, "prf:VideoInputEncoder"},
4086 {0x50, "prf:CurrentBearerService"},
4087 {0x51, "prf:SecuritySupport"},
4088 {0x52, "prf:SupportedBearers"},
4089 {0x60, "prf:WapDeviceClass"},
4090 {0x61, "prf:WapPushMsgPriority"}, /* Deprecated */
4091 {0x62, "prf:WapPushMsgSize"}, /* Deprecated */
4092 {0x63, "prf:WapVersion"},
4093 {0x64, "prf:WmlDeckSize"},
4094 {0x65, "prf:WmlScriptLibraries"},
4095 {0x66, "prf:WmlScriptVersion"},
4096 {0x67, "prf:WmlVersion"},
4097 {0x68, "prf:WtaiLibraries"},
4098 {0x69, "prf:WtaVersion"},
4099 {0x70, "prf:WapSupportedApplications"}, /* Deprecated */
4100 {0x71, "prf:BluetoothProfile"},
4101 {0x72, "prf:MexeClassmarks"},
4102 {0x73, "prf:MexeSecureDomains='YES'"},
4103 {0x74, "prf:MexeSecureDomains='NO'"},
4104 {0x75, "prf:SupportedBluetoothVersion"},
4105 {0x76, "prf:SupportedPictogramSet"},
4106 {0x77, "prf:CcppAccept"},
4107 {0x78, "prf:CcppAccept-Charset"},
4108 {0x79, "prf:CcppAccept-Encoding"},
4109 {0x7F, "prf:CcppAccept-Language"},
4114 /* CodePage 2 BrowserUA */
4115 static const value_string wbxml_uaprof_attrStart_cp2
[] = {
4116 {0x05, "prf:CcppAccept"}, /* Deprecated */
4117 {0x06, "prf:CcppAccept-Charset"}, /* Deprecated */
4118 {0x07, "prf:CcppAccept-Encoding"}, /* Deprecated */
4119 {0x08, "prf:CcppAccept-Language"}, /* Deprecated */
4120 {0x09, "prf:DownloadableBrowserApps"},
4121 {0x0A, "prf:FramesCapable='Yes'"},
4122 {0x0B, "prf:FramesCapable='No'"},
4123 {0x0C, "prf:HtmlVersion='3.2'"},
4124 {0x0D, "prf:HtmlVersion='4.0'"},
4125 {0x0E, "prf:JavaAppletEnabled='Yes'"},
4126 {0x0F, "prf:JavaAppletEnabled='No'"},
4127 {0x10, "prf:JavaScriptEnabled='Yes'"},
4128 {0x11, "prf:JavaScriptEnabled='No'"},
4129 {0x12, "prf:JavaScriptVersion"},
4130 {0x13, "prf:PreferenceForFrames='Yes'"},
4131 {0x14, "prf:PreferenceForFrames='No'"},
4132 {0x15, "prf:TablesCapable='Yes'"},
4133 {0x16, "prf:TablesCapable='No'"},
4134 {0x17, "prf:XhtmlVersion"},
4135 {0x18, "prf:XhtmlModules"},
4136 {0x19, "prf:BrowserName"},
4137 {0x1A, "prf:BrowserVersion"},
4142 /* CodePage 3 PushCharacteristics */
4143 static const value_string wbxml_uaprof_attrStart_cp3
[] = {
4144 {0x05, "prf:Push-Accept"},
4145 {0x06, "prf:Push-Accept-Charset"},
4146 {0x07, "prf:Push-Accept-Encoding"},
4147 {0x08, "prf:Push-Accept-Language"},
4148 {0x09, "prf:Push-Accept-AppID"},
4149 {0x0A, "prf:Push-MsgSize"},
4150 {0x0B, "prf:Push-MaxPushReq"},
4155 /***** Attribute Value tokens *****/
4156 /* CodePage 0 RDF */
4157 static const value_string wbxml_uaprof_attrValue_cp0
[] = {
4158 {0x85, "rdf:Statement"},
4160 {0x87, "http://www."},
4162 {0x89, "https://www."},
4172 /* CodePage 1 CoreVocabularyAttrValue */
4173 static const value_string wbxml_uaprof_attrValue_cp1
[] = {
4180 /* CodePage 2 BrowserUAAttrValue */
4181 static const value_string wbxml_uaprof_attrValue_cp2
[] = {
4188 /***** Token code page aggregation *****/
4189 static const value_valuestring wbxml_uaprof_tags
[] = {
4190 { 0, wbxml_uaprof_tags_cp0
},
4191 { 1, wbxml_uaprof_tags_cp1
},
4192 { 2, wbxml_uaprof_tags_cp2
},
4193 { 3, wbxml_uaprof_tags_cp3
},
4194 { 4, wbxml_uaprof_tags_cp4
},
4198 static const value_valuestring wbxml_uaprof_attrStart
[] = {
4199 { 0, wbxml_uaprof_attrStart_cp0
},
4200 { 1, wbxml_uaprof_attrStart_cp1
},
4201 { 2, wbxml_uaprof_attrStart_cp2
},
4202 { 3, wbxml_uaprof_attrStart_cp3
},
4206 static const value_valuestring wbxml_uaprof_attrValue
[] = {
4207 { 0, wbxml_uaprof_attrValue_cp0
},
4208 { 1, wbxml_uaprof_attrValue_cp1
},
4209 { 2, wbxml_uaprof_attrValue_cp2
},
4213 static const wbxml_decoding decode_uaprof_wap_248
= {
4214 "User-Agent Profile (WAP-174, WAP-248)",
4215 "UAProf (WAP-174, WAP-248)",
4216 { NULL
, NULL
, NULL
},
4217 default_opaque_binary_tag
,
4218 default_opaque_literal_tag
,
4219 default_opaque_binary_attr
,
4220 default_opaque_literal_attr
,
4223 wbxml_uaprof_attrStart
,
4224 wbxml_uaprof_attrValue
4233 * Wireless Village Client Server Protocol
4234 ***************************************/
4236 /***** Global extension tokens *****/
4238 /***** Tag tokens *****/
4239 /* Common code page (0x00) */
4240 static const value_string wbxml_wv_csp_10_tags_cp0
[] = {
4241 /* 0x00 -- 0x04 GLOBAL */
4242 { 0x05, "Acceptance" },
4243 { 0x06, "AddList" },
4244 { 0x07, "AddNickList" },
4245 { 0x08, "Attribute" },
4246 { 0x09, "AttributeList" },
4247 { 0x0A, "ClientID" },
4249 { 0x0C, "ContactList" },
4250 { 0x0D, "ContentData" },
4251 { 0x0E, "ContentEncoding" },
4252 { 0x0F, "ContentSize" },
4253 { 0x10, "ContentType" },
4254 { 0x11, "DateTime" },
4255 { 0x12, "Description" },
4256 { 0x13, "DetailedResult" },
4257 { 0x14, "EntityList" },
4259 { 0x16, "GroupID" },
4260 { 0x17, "GroupList" },
4263 { 0x1A, "MessageCount" },
4264 { 0x1B, "MessageID" },
4265 { 0x1C, "MessageURI" },
4268 { 0x1F, "NickList" },
4269 { 0x20, "NickName" },
4271 { 0x22, "Presence" },
4272 { 0x23, "PresenceSubList" },
4273 { 0x24, "PresenceValue" },
4274 { 0x25, "Property" },
4275 { 0x26, "Qualifier" },
4276 { 0x27, "Recipient" },
4277 { 0x28, "RemoveList" },
4278 { 0x29, "RemoveNickList" },
4280 { 0x2B, "ScreenName" },
4282 { 0x2D, "Session" },
4283 { 0x2E, "SessionDescriptor" },
4284 { 0x2F, "SessionID" },
4285 { 0x30, "SessionType" },
4287 { 0x32, "Transaction" },
4288 { 0x33, "TransactionContent" },
4289 { 0x34, "TransactionDescriptor" },
4290 { 0x35, "TransactionID" },
4291 { 0x36, "TransactionMode" },
4293 { 0x38, "URLList" },
4296 { 0x3B, "UserList" },
4297 { 0x3C, "Validity" },
4299 { 0x3E, "WV-CSP-Message" },
4304 /* Access code page (0x01) */
4305 static const value_string wbxml_wv_csp_10_tags_cp1
[] = {
4306 /* 0x00 -- 0x04 GLOBAL */
4307 { 0x05, "AllFunctions" },
4308 { 0x06, "AllFunctionsRequest" },
4309 { 0x07, "CancelInvite-Request" },
4310 { 0x08, "CancelInviteUser-Request" },
4311 { 0x09, "Capability" },
4312 { 0x0A, "CapabilityList" },
4313 { 0x0B, "CapabilityRequest" },
4314 { 0x0C, "ClientCapability-Request" },
4315 { 0x0D, "ClientCapability-Response" },
4316 { 0x0E, "DigestBytes" },
4317 { 0x0F, "DigestSchema" },
4318 { 0x10, "Disconnect" },
4319 { 0x11, "Functions" },
4320 { 0x12, "GetSPInfo-Request" },
4321 { 0x13, "GetSPInfo-Response" },
4322 { 0x14, "InviteID" },
4323 { 0x15, "InviteNote" },
4324 { 0x16, "Invite-Request" },
4325 { 0x17, "Invite-Response" },
4326 { 0x18, "InviteType" },
4327 { 0x19, "InviteUser-Request" },
4328 { 0x1A, "InviteUser-Response" },
4329 { 0x1B, "KeepAlive-Request" },
4330 { 0x1C, "KeepAliveTime" },
4331 { 0x1D, "Login-Request" },
4332 { 0x1E, "Login-Response" },
4333 { 0x1F, "Logout-Request" },
4335 { 0x21, "Password" },
4336 { 0x22, "Polling-Request" },
4337 { 0x23, "ResponseNote" },
4338 { 0x24, "SearchElement" },
4339 { 0x25, "SearchFindings" },
4340 { 0x26, "SearchID" },
4341 { 0x27, "SearchIndex" },
4342 { 0x28, "SearchLimit" },
4343 { 0x29, "SearchOnlineStatus" },
4344 { 0x2A, "SearchPairList" },
4345 { 0x2B, "Search-Request" },
4346 { 0x2C, "Search-Response" },
4347 { 0x2D, "SearchResult" },
4348 { 0x2E, "Service-Request" },
4349 { 0x2F, "Service-Response" },
4350 { 0x30, "SessionCookie" },
4351 { 0x31, "StopSearch-Request" },
4352 { 0x32, "TimeToLive" },
4357 /* Service code page (0x02) */
4358 static const value_string wbxml_wv_csp_10_tags_cp2
[] = {
4359 /* 0x00 -- 0x04 GLOBAL */
4361 { 0x06, "AttListFunc" },
4367 { 0x0C, "ContListFunc" },
4372 { 0x11, "FundamentalFeat" },
4385 { 0x1E, "GroupAuthFunc" },
4386 { 0x1F, "GroupFeat" },
4387 { 0x20, "GroupMgmtFunc" },
4388 { 0x21, "GroupUseFunc" },
4389 { 0x22, "IMAuthFunc" },
4391 { 0x24, "IMReceiveFunc" },
4392 { 0x25, "IMSendFunc" },
4394 { 0x27, "InviteFunc" },
4400 { 0x2D, "PresenceAuthFunc" },
4401 { 0x2E, "PresenceDeliverFunc" },
4402 { 0x2F, "PresenceFeat" },
4407 { 0x34, "SearchFunc" },
4408 { 0x35, "ServiceFunc" },
4415 { 0x3C, "WVCSPFeat" },
4420 /* Client capability code page (0x03) */
4421 static const value_string wbxml_wv_csp_10_tags_cp3
[] = {
4422 /* 0x00 -- 0x04 GLOBAL */
4423 { 0x05, "AcceptedCharset" },
4424 { 0x06, "AcceptedContentLength" },
4425 { 0x07, "AcceptedContentType" },
4426 { 0x08, "AcceptedTransferEncoding" },
4427 { 0x09, "AnyContent" },
4428 { 0x0A, "ClientType" },
4429 { 0x0B, "InitialDeliveryMethod" },
4430 { 0x0C, "MultiTrans" },
4431 { 0x0D, "ParserSize" },
4432 { 0x0E, "ServerPollMin" },
4433 { 0x0F, "SupportedBearer" },
4434 { 0x10, "SupportedCIRMethod" },
4435 { 0x11, "TCPAddress" },
4436 { 0x12, "TCPPort" },
4437 { 0x13, "UDPPort" },
4442 /* Presence primitive code page (0x04) */
4443 static const value_string wbxml_wv_csp_10_tags_cp4
[] = {
4444 /* 0x00 -- 0x04 GLOBAL */
4445 { 0x05, "CancelAuth-Request" },
4446 { 0x06, "ContactListProperties" },
4447 { 0x07, "CreateAttributeList-Request" },
4448 { 0x08, "CreateList-Request" },
4449 { 0x09, "DefaultAttributeList" },
4450 { 0x0A, "DefaultContactList" },
4451 { 0x0B, "DefaultList" },
4452 { 0x0C, "DeleteAttributeList-Request" },
4453 { 0x0D, "DeleteList-Request" },
4454 { 0x0E, "GetAttributeList-Request" },
4455 { 0x0F, "GetAttributeList-Response" },
4456 { 0x10, "GetList-Request" },
4457 { 0x11, "GetList-Response" },
4458 { 0x12, "GetPresence-Request" },
4459 { 0x13, "GetPresence-Response" },
4460 { 0x14, "GetWatcherList-Request" },
4461 { 0x15, "GetWatcherList-Response" },
4462 { 0x16, "ListManage-Request" },
4463 { 0x17, "ListManage-Response" },
4464 { 0x18, "Presence" },
4465 { 0x19, "PresenceAuth-Request" },
4466 { 0x1A, "PresenceAuth-Response" },
4467 { 0x1B, "PresenceNotification-Request" },
4468 { 0x1C, "PresenceValueList" },
4469 { 0x1D, "SubscribePresence-Request" },
4470 { 0x1E, "UnsubscribePresence-Request" },
4471 { 0x1F, "UpdatePresence-Request" },
4476 /* Presence attribute code page (0x05) */
4477 static const value_string wbxml_wv_csp_10_tags_cp5
[] = {
4478 /* 0x00 -- 0x04 GLOBAL */
4479 { 0x05, "Accuracy" },
4480 { 0x06, "Address" },
4481 { 0x07, "AddrPref" },
4483 { 0x09, "Altitude" },
4484 { 0x0A, "Building" },
4487 { 0x0D, "ClientInfo" },
4488 { 0x0E, "ClientProducer" },
4489 { 0x0F, "ClientType" },
4490 { 0x10, "ClientVersion" },
4492 { 0x12, "CommCap" },
4493 { 0x13, "ContactInfo" },
4494 { 0x14, "ContainedvCard" },
4495 { 0x15, "Country" },
4496 { 0x16, "Crossing1" },
4497 { 0x17, "Crossing2" },
4498 { 0x18, "DevManufacturer" },
4499 { 0x19, "DirectContent" },
4500 { 0x1A, "FreeTextLocation" },
4501 { 0x1B, "GeoLocation" },
4502 { 0x1C, "Language" },
4503 { 0x1D, "Latitude" },
4504 { 0x1E, "Longitude" },
4506 { 0x20, "NamedArea" },
4507 { 0x21, "OnlineStatus" },
4510 { 0x24, "PreferredContacts" },
4511 { 0x25, "PreferredLanguage" },
4512 { 0x26, "ReferredContent" },
4513 { 0x27, "ReferredvCard" },
4514 { 0x28, "Registration" },
4515 { 0x29, "StatusContent" },
4516 { 0x2A, "StatusMood" },
4517 { 0x2B, "StatusText" },
4519 { 0x2D, "TimeZone" },
4520 { 0x2E, "UserAvailability" },
4525 /* Messaging code page (0x06) */
4526 static const value_string wbxml_wv_csp_10_tags_cp6
[] = {
4527 /* 0x00 -- 0x04 GLOBAL */
4528 { 0x05, "BlockList" },
4529 { 0x06, "BlockUser-Request" },
4530 { 0x07, "DeliveryMethod" },
4531 { 0x08, "DeliveryReport" },
4532 { 0x09, "DeliveryReport-Request" },
4533 { 0x0A, "ForwardMessage-Request" },
4534 { 0x0B, "GetBlockedList-Request" },
4535 { 0x0C, "GetBlockedList-Response" },
4536 { 0x0D, "GetMessageList-Request" },
4537 { 0x0E, "GetMessageList-Response" },
4538 { 0x0F, "GetMessage-Request" },
4539 { 0x10, "GetMessage-Response" },
4540 { 0x11, "GrantList" },
4541 { 0x12, "MessageDelivered" },
4542 { 0x13, "MessageInfo" },
4543 { 0x14, "MessageNotification" },
4544 { 0x15, "NewMessage" },
4545 { 0x16, "RejectMessage-Request" },
4546 { 0x17, "SendMessage-Request" },
4547 { 0x18, "SendMessage-Response" },
4548 { 0x19, "SetDeliveryMethod-Request" },
4553 /* Group code page (0x07) */
4554 static const value_string wbxml_wv_csp_10_tags_cp7
[] = {
4555 /* 0x00 -- 0x04 GLOBAL */
4556 { 0x05, "AddGroupMembers-Request" },
4558 { 0x07, "CreateGroup-Request" },
4559 { 0x08, "DeleteGroup-Request" },
4560 { 0x09, "GetGroupMembers-Request" },
4561 { 0x0A, "GetGroupMembers-Response" },
4562 { 0x0B, "GetGroupProps-Request" },
4563 { 0x0C, "GetGroupProps-Response" },
4564 { 0x0D, "GroupChangeNotice" },
4565 { 0x0E, "GroupProperties" },
4567 { 0x10, "JoinedRequest" },
4568 { 0x11, "JoinGroup-Request" },
4569 { 0x12, "JoinGroup-Response" },
4570 { 0x13, "LeaveGroup-Request" },
4571 { 0x14, "LeaveGroup-Response" },
4573 { 0x16, "MemberAccess-Request" },
4575 { 0x18, "OwnProperties" },
4576 { 0x19, "RejectList-Request" },
4577 { 0x1A, "RejectList-Response" },
4578 { 0x1B, "RemoveGroupMembers-Request" },
4579 { 0x1C, "SetGroupProps-Request" },
4580 { 0x1D, "SubscribeGroupNotice-Request" },
4581 { 0x1E, "SubscribeGroupNotice-Response" },
4583 { 0x20, "WelcomeNote" },
4589 * Attribute start tokens
4591 /* common code page (0x00) */
4592 static const value_string wbxml_wv_csp_10_attrStart_cp0
[] = {
4593 /* 0x00 -- 0x04 GLOBAL */
4594 { 0x05, "xmlns='http://www.wireless-village.org/CSP'" },
4595 { 0x06, "xmlns='http://www.wireless-village.org/PA'" },
4596 { 0x07, "xmlns='http://www.wireless-village.org/TRC'" },
4602 * Attribute value tokens
4604 /* Common value tokens (0x00) */
4605 static const value_string wbxml_wv_csp_10_attrValue_cp0
[] = {
4606 /* 0x80 -- 0x84 GLOBAL */
4607 { 0x85, "AccessType" },
4608 { 0x86, "ActiveUsers" },
4610 { 0x88, "application/" },
4611 { 0x89, "application/vnd.wap.mms-message" },
4612 { 0x8A, "application/x-sms" },
4615 { 0x8D, "Default" },
4616 { 0x8E, "DisplayName" },
4617 { 0x8F, "False (No)" },
4619 { 0x91, "Group (GR)" },
4620 { 0x92, "http://" },
4621 { 0x93, "https://" },
4624 { 0x96, "Instant Messaging (IM)" },
4625 { 0x97, "MaxActiveUsers" },
4629 { 0x9B, "Notify/Get" },
4631 { 0x9D, "Outband" },
4632 { 0x9E, "Presence (PR)" },
4633 { 0x9F, "Private" },
4634 { 0xA0, "PrivateMessaging" },
4635 { 0xA1, "PrivilegeLevel" },
4638 { 0xA4, "Request" },
4639 { 0xA5, "Response" },
4640 { 0xA6, "ScreenName" },
4641 { 0xA7, "Searchable" },
4643 { 0xA9, "Shared Content (SC)" },
4645 { 0xAB, "text/plain" },
4646 { 0xAC, "text/x-vCalendar" },
4647 { 0xAD, "text/x-vCard" },
4649 { 0xAF, "True (Yes)" },
4652 { 0xB2, "User (US)" },
4653 { 0xB3, "www.wireless-village.org" },
4658 /* Access value tokens (0x01) */
4659 static const value_string wbxml_wv_csp_10_attrValue_cp1
[] = {
4660 /* 0x80 -- 0x84 GLOBAL */
4661 { 0x85, "GROUP_ID" },
4662 { 0x86, "GROUP_NAME" },
4663 { 0x87, "GROUP_TOPIC" },
4664 { 0x88, "GROUP_USER_ID_JOINED" },
4669 { 0x8D, "USER_ALIAS" },
4670 { 0x8E, "USER_EMAIL_ADDRESS" },
4671 { 0x8F, "USER_FIRST_NAME" },
4672 { 0x90, "USER_ID" },
4673 { 0x91, "USER_LAST_NAME" },
4674 { 0x92, "USER_MOBILE_NUMBER" },
4682 /* Presence value tokens (0x05) */
4683 static const value_string wbxml_wv_csp_10_attrValue_cp5
[] = {
4684 /* 0x80 -- 0x84 GLOBAL */
4686 { 0x86, "ANXIOUS" },
4687 { 0x87, "ASHAMED" },
4688 { 0x88, "AUDIO_CALL" },
4689 { 0x89, "AVAILABLE" },
4693 { 0x8D, "COMPUTER" },
4694 { 0x8E, "DISCREET" },
4696 { 0x90, "EXCITED" },
4699 { 0x93, "IM_OFFLINE" },
4700 { 0x94, "IM_ONLINE" },
4701 { 0x95, "IN_LOVE" },
4702 { 0x96, "INVINCIBLE" },
4703 { 0x97, "JEALOUS" },
4705 { 0x99, "MOBILE_PHONE" },
4706 { 0x9A, "NOT_AVAILABLE" },
4712 { 0xA0, "VIDEO_CALL" },
4713 { 0xA1, "VIDEO_STREAM" },
4719 /***** Token code page aggregation *****/
4720 static const value_valuestring wbxml_wv_csp_10_tags
[] = {
4721 { 0, wbxml_wv_csp_10_tags_cp0
},
4722 { 1, wbxml_wv_csp_10_tags_cp1
},
4723 { 2, wbxml_wv_csp_10_tags_cp2
},
4724 { 3, wbxml_wv_csp_10_tags_cp3
},
4725 { 4, wbxml_wv_csp_10_tags_cp4
},
4726 { 5, wbxml_wv_csp_10_tags_cp5
},
4727 { 6, wbxml_wv_csp_10_tags_cp6
},
4728 { 7, wbxml_wv_csp_10_tags_cp7
},
4732 static const value_valuestring wbxml_wv_csp_10_attrStart
[] = {
4733 { 0, wbxml_wv_csp_10_attrStart_cp0
},
4737 static const value_valuestring wbxml_wv_csp_10_attrValue
[] = {
4738 { 0, wbxml_wv_csp_10_attrValue_cp0
},
4739 { 1, wbxml_wv_csp_10_attrValue_cp1
},
4740 { 5, wbxml_wv_csp_10_attrValue_cp5
},
4744 static const wbxml_decoding decode_wv_cspc_10
= {
4745 "Wireless-Village Client-Server Protocol 1.0",
4747 { NULL
, NULL
, NULL
},
4748 wv_csp10_opaque_binary_tag
,
4749 wv_csp10_opaque_literal_tag
,
4750 default_opaque_binary_attr
,
4751 default_opaque_literal_attr
,
4753 wbxml_wv_csp_10_tags
,
4754 wbxml_wv_csp_10_attrStart
,
4755 wbxml_wv_csp_10_attrValue
4764 * Wireless Village Client Server Protocol
4765 ***************************************/
4767 /***** Global extension tokens *****/
4768 static const value_string wbxml_wv_csp_11_global_cp0
[] = {
4769 { 0x80, "Common Value" }, /* EXT_T_0 */
4774 /***** Tag tokens *****/
4775 /* Common code page */
4776 static const value_string wbxml_wv_csp_11_tags_cp0
[] = {
4777 /* 0x00 -- 0x04 GLOBAL */
4778 { 0x05, "Acceptance" },
4779 { 0x06, "AddList" },
4780 { 0x07, "AddNickList" },
4781 { 0x08, "SName" }, /* Was: Attribute */
4782 { 0x09, "WV-CSP-Message" }, /* Was: AttributeList */
4783 { 0x0A, "ClientID" },
4785 { 0x0C, "ContactList" },
4786 { 0x0D, "ContentData" },
4787 { 0x0E, "ContentEncoding" },
4788 { 0x0F, "ContentSize" },
4789 { 0x10, "ContentType" },
4790 { 0x11, "DateTime" },
4791 { 0x12, "Description" },
4792 { 0x13, "DetailedResult" },
4793 { 0x14, "EntityList" },
4795 { 0x16, "GroupID" },
4796 { 0x17, "GroupList" },
4799 { 0x1A, "MessageCount" },
4800 { 0x1B, "MessageID" },
4801 { 0x1C, "MessageURI" },
4804 { 0x1F, "NickList" },
4805 { 0x20, "NickName" },
4807 { 0x22, "Presence" },
4808 { 0x23, "PresenceSubList" },
4809 { 0x24, "PresenceValue" },
4810 { 0x25, "Property" },
4811 { 0x26, "Qualifier" },
4812 { 0x27, "Recipient" },
4813 { 0x28, "RemoveList" },
4814 { 0x29, "RemoveNickList" },
4816 { 0x2B, "ScreenName" },
4818 { 0x2D, "Session" },
4819 { 0x2E, "SessionDescriptor" },
4820 { 0x2F, "SessionID" },
4821 { 0x30, "SessionType" },
4823 { 0x32, "Transaction" },
4824 { 0x33, "TransactionContent" },
4825 { 0x34, "TransactionDescriptor" },
4826 { 0x35, "TransactionID" },
4827 { 0x36, "TransactionMode" },
4829 { 0x38, "URLList" },
4832 { 0x3B, "UserList" },
4833 { 0x3C, "Validity" },
4835 /* 0x3E - Removed: WV-CSP-Message */
4840 /* Access code page */
4841 static const value_string wbxml_wv_csp_11_tags_cp1
[] = {
4842 /* 0x00 -- 0x04 GLOBAL */
4843 { 0x05, "AllFunctions" },
4844 { 0x06, "AllFunctionsRequest" },
4845 { 0x07, "CancelInvite-Request" },
4846 { 0x08, "CancelInviteUser-Request" },
4847 { 0x09, "Capability" },
4848 { 0x0A, "CapabilityList" },
4849 { 0x0B, "CapabilityRequest" },
4850 { 0x0C, "ClientCapability-Request" },
4851 { 0x0D, "ClientCapability-Response" },
4852 { 0x0E, "DigestBytes" },
4853 { 0x0F, "DigestSchema" },
4854 { 0x10, "Disconnect" },
4855 { 0x11, "Functions" },
4856 { 0x12, "GetSPInfo-Request" },
4857 { 0x13, "GetSPInfo-Response" },
4858 { 0x14, "InviteID" },
4859 { 0x15, "InviteNote" },
4860 { 0x16, "Invite-Request" },
4861 { 0x17, "Invite-Response" },
4862 { 0x18, "InviteType" },
4863 { 0x19, "InviteUser-Request" },
4864 { 0x1A, "InviteUser-Response" },
4865 { 0x1B, "KeepAlive-Request" },
4866 { 0x1C, "KeepAliveTime" },
4867 { 0x1D, "Login-Request" },
4868 { 0x1E, "Login-Response" },
4869 { 0x1F, "Logout-Request" },
4871 { 0x21, "Password" },
4872 { 0x22, "Polling-Request" },
4873 { 0x23, "ResponseNote" },
4874 { 0x24, "SearchElement" },
4875 { 0x25, "SearchFindings" },
4876 { 0x26, "SearchID" },
4877 { 0x27, "SearchIndex" },
4878 { 0x28, "SearchLimit" },
4879 { 0x29, "KeepAlive-Response" },
4880 { 0x2A, "SearchPairList" },
4881 { 0x2B, "Search-Request" },
4882 { 0x2C, "Search-Response" },
4883 { 0x2D, "SearchResult" },
4884 { 0x2E, "Service-Request" },
4885 { 0x2F, "Service-Response" },
4886 { 0x30, "SessionCookie" },
4887 { 0x31, "StopSearch-Request" },
4888 { 0x32, "TimeToLive" },
4889 /* New in WV-CSP 1.1 */
4890 { 0x33, "SearchString" },
4891 { 0x34, "CompletionFlag" },
4896 /* Service code page */
4897 /* Same as cp2 of WV-CSP 1.0 */
4898 #define wbxml_wv_csp_11_tags_cp2 wbxml_wv_csp_10_tags_cp2
4900 /* Client capability code page */
4901 static const value_string wbxml_wv_csp_11_tags_cp3
[] = {
4902 /* 0x00 -- 0x04 GLOBAL */
4903 { 0x05, "AcceptedCharset" },
4904 { 0x06, "AcceptedContentLength" },
4905 { 0x07, "AcceptedContentType" },
4906 { 0x08, "AcceptedTransferEncoding" },
4907 { 0x09, "AnyContent" },
4908 { 0x0A, "DefaultLanguage" }, /* Was: ClientType */
4909 { 0x0B, "InitialDeliveryMethod" },
4910 { 0x0C, "MultiTrans" },
4911 { 0x0D, "ParserSize" },
4912 { 0x0E, "ServerPollMin" },
4913 { 0x0F, "SupportedBearer" },
4914 { 0x10, "SupportedCIRMethod" },
4915 { 0x11, "TCPAddress" },
4916 { 0x12, "TCPPort" },
4917 { 0x13, "UDPPort" },
4922 /* Presence primitive code page */
4923 static const value_string wbxml_wv_csp_11_tags_cp4
[] = {
4924 /* 0x00 -- 0x04 GLOBAL */
4925 { 0x05, "CancelAuth-Request" },
4926 { 0x06, "ContactListProperties" },
4927 { 0x07, "CreateAttributeList-Request" },
4928 { 0x08, "CreateList-Request" },
4929 { 0x09, "DefaultAttributeList" },
4930 { 0x0A, "DefaultContactList" },
4931 { 0x0B, "DefaultList" },
4932 { 0x0C, "DeleteAttributeList-Request" },
4933 { 0x0D, "DeleteList-Request" },
4934 { 0x0E, "GetAttributeList-Request" },
4935 { 0x0F, "GetAttributeList-Response" },
4936 { 0x10, "GetList-Request" },
4937 { 0x11, "GetList-Response" },
4938 { 0x12, "GetPresence-Request" },
4939 { 0x13, "GetPresence-Response" },
4940 { 0x14, "GetWatcherList-Request" },
4941 { 0x15, "GetWatcherList-Response" },
4942 { 0x16, "ListManage-Request" },
4943 { 0x17, "ListManage-Response" },
4944 { 0x18, "UnsubscribePresence-Request" }, /* Was: Presence */
4945 { 0x19, "PresenceAuth-Request" },
4946 { 0x1A, "PresenceAuth-User" }, /* Was: PresenceAuth-Response */
4947 { 0x1B, "PresenceNotification-Request" },
4948 { 0x1C, "UpdatePresence-Request" }, /* Was: PresenceValueList */
4949 { 0x1D, "SubscribePresence-Request" },
4950 /* 0x1E - Removed: UnsubscribePresence-Request */
4951 /* 0x1F - Removed: UpdatePresence-Request */
4956 /* Presence attribute code page */
4957 static const value_string wbxml_wv_csp_11_tags_cp5
[] = {
4958 /* 0x00 -- 0x04 GLOBAL */
4959 { 0x05, "Accuracy" },
4960 { 0x06, "Address" },
4961 { 0x07, "AddrPref" },
4963 { 0x09, "Altitude" },
4964 { 0x0A, "Building" },
4967 { 0x0D, "ClientInfo" },
4968 { 0x0E, "ClientProducer" },
4969 { 0x0F, "ClientType" },
4970 { 0x10, "ClientVersion" },
4972 { 0x12, "CommCap" },
4973 { 0x13, "ContactInfo" },
4974 { 0x14, "ContainedvCard" },
4975 { 0x15, "Country" },
4976 { 0x16, "Crossing1" },
4977 { 0x17, "Crossing2" },
4978 { 0x18, "DevManufacturer" },
4979 { 0x19, "DirectContent" },
4980 { 0x1A, "FreeTextLocation" },
4981 { 0x1B, "GeoLocation" },
4982 { 0x1C, "Language" },
4983 { 0x1D, "Latitude" },
4984 { 0x1E, "Longitude" },
4986 { 0x20, "NamedArea" },
4987 { 0x21, "OnlineStatus" },
4990 { 0x24, "PreferredContacts" },
4991 { 0x25, "PreferredLanguage" },
4992 { 0x26, "ReferredContent" },
4993 { 0x27, "ReferredvCard" },
4994 { 0x28, "Registration" },
4995 { 0x29, "StatusContent" },
4996 { 0x2A, "StatusMood" },
4997 { 0x2B, "StatusText" },
4999 { 0x2D, "TimeZone" },
5000 { 0x2E, "UserAvailability" },
5001 /* New in WV-CSP 1.1 */
5004 { 0x31, "Contact" },
5005 { 0x32, "Cpriority" },
5006 { 0x33, "Cstatus" },
5013 /* Messaging code page */
5014 static const value_string wbxml_wv_csp_11_tags_cp6
[] = {
5015 /* 0x00 -- 0x04 GLOBAL */
5016 { 0x05, "BlockList" },
5017 { 0x06, "BlockUser-Request" },
5018 { 0x07, "DeliveryMethod" },
5019 { 0x08, "DeliveryReport" },
5020 { 0x09, "DeliveryReport-Request" },
5021 { 0x0A, "ForwardMessage-Request" },
5022 { 0x0B, "GetBlockedList-Request" },
5023 { 0x0C, "GetBlockedList-Response" },
5024 { 0x0D, "GetMessageList-Request" },
5025 { 0x0E, "GetMessageList-Response" },
5026 { 0x0F, "GetMessage-Request" },
5027 { 0x10, "GetMessage-Response" },
5028 { 0x11, "GrantList" },
5029 { 0x12, "MessageDelivered" },
5030 { 0x13, "MessageInfo" },
5031 { 0x14, "MessageNotification" },
5032 { 0x15, "NewMessage" },
5033 { 0x16, "RejectMessage-Request" },
5034 { 0x17, "SendMessage-Request" },
5035 { 0x18, "SendMessage-Response" },
5036 { 0x19, "SetDeliveryMethod-Request" },
5037 /* New in WV-CSP 1.1 */
5038 { 0x1A, "DeliveryTime" },
5043 /* Group code page */
5044 static const value_string wbxml_wv_csp_11_tags_cp7
[] = {
5045 /* 0x00 -- 0x04 GLOBAL */
5046 { 0x05, "AddGroupMembers-Request" },
5048 { 0x07, "CreateGroup-Request" },
5049 { 0x08, "DeleteGroup-Request" },
5050 { 0x09, "GetGroupMembers-Request" },
5051 { 0x0A, "GetGroupMembers-Response" },
5052 { 0x0B, "GetGroupProps-Request" },
5053 { 0x0C, "GetGroupProps-Response" },
5054 { 0x0D, "GroupChangeNotice" },
5055 { 0x0E, "GroupProperties" },
5057 { 0x10, "JoinedRequest" },
5058 { 0x11, "JoinGroup-Request" },
5059 { 0x12, "JoinGroup-Response" },
5060 { 0x13, "LeaveGroup-Request" },
5061 { 0x14, "LeaveGroup-Response" },
5063 { 0x16, "MemberAccess-Request" },
5065 { 0x18, "OwnProperties" },
5066 { 0x19, "RejectList-Request" },
5067 { 0x1A, "RejectList-Response" },
5068 { 0x1B, "RemoveGroupMembers-Request" },
5069 { 0x1C, "SetGroupProps-Request" },
5070 { 0x1D, "SubscribeGroupNotice-Request" },
5071 { 0x1E, "SubscribeGroupNotice-Response" },
5073 { 0x20, "WelcomeNote" },
5074 /* New in WV-CSP 1.1 */
5075 { 0x21, "JoinGroup" },
5076 { 0x22, "SubscribeNotification" },
5077 { 0x23, "SubscribeType" },
5082 /***** Attribute Start tokens *****/
5083 /* Common code page */
5084 /* Same as cp0 of WV-CSP 1.0 */
5085 #define wbxml_wv_csp_11_attrStart_cp0 wbxml_wv_csp_10_attrStart_cp0
5087 /***** Attribute Value tokens *****/
5089 * Element value tokens
5091 * NOTE - WV-CSP uses the EXT_T_0 token in a peculiar way: the mb_u_int32
5092 * does *not* reference an offset in the string table, but it refers to
5093 * the index in the following value_string.
5096 * - Values 'T' and 'F' are Boolean values representing "True" and "False"
5097 * (or "Yes" and "No" in some circumstances) respectively.
5098 * - Values 'GR', 'IM', 'PR', 'SC', 'GM' and 'US' are enumerated values
5099 * representing "Group", "Instant Messaging", "Presence", "Shared Content",
5100 * "Group membership" and "User" respectively.
5101 * - Values 'G', 'S' and 'U' are enumerated values representing "Get", "Set"
5102 * and "Unset" respectively.
5103 * - Values 'N' and 'P' are enumerated values representing "Notify/Get" and
5104 * "Push" respectively.
5106 * I repeat: this is NOT a attrValue[] array hence it is not called
5107 * wbxml_wv_XXX but vals_wv_XXX.
5109 * Result: the attribute value token definitions from WV-CSP 1.0 are dropped.
5111 static const value_string vals_wv_csp_11_element_value_tokens
[] = {
5113 * Common value tokens
5115 { 0x00, "AccessType" },
5116 { 0x01, "ActiveUsers" },
5118 { 0x03, "application/" },
5119 { 0x04, "application/vnd.wap.mms-message" },
5120 { 0x05, "application/x-sms" },
5121 { 0x06, "AutoJoin" },
5124 { 0x09, "Default" },
5125 { 0x0A, "DisplayName" },
5129 { 0x0E, "http://" },
5130 { 0x0F, "https://" },
5134 { 0x13, "MaxActiveUsers" },
5140 { 0x19, "Outband" },
5142 { 0x1B, "Private" },
5143 { 0x1C, "PrivateMessaging" },
5144 { 0x1D, "PrivilegeLevel" },
5147 { 0x20, "Request" },
5148 { 0x21, "Response" },
5149 { 0x22, "Restricted" },
5150 { 0x23, "ScreenName" },
5151 { 0x24, "Searchable" },
5155 { 0x28, "text/plain" },
5156 { 0x29, "text/x-vCalendar" },
5157 { 0x2A, "text/x-vCard" },
5163 { 0x30, "www.wireless-village.org" },
5165 * Access value tokens
5167 { 0x3D, "GROUP_ID" },
5168 { 0x3E, "GROUP_NAME" },
5169 { 0x3F, "GROUP_TOPIC" },
5170 { 0x40, "GROUP_USER_ID_JOINED" },
5171 { 0x41, "GROUP_USER_ID_OWNER" },
5176 { 0x46, "USER_ALIAS" },
5177 { 0x47, "USER_EMAIL_ADDRESS" },
5178 { 0x48, "USER_FIRST_NAME" },
5179 { 0x49, "USER_ID" },
5180 { 0x4A, "USER_LAST_NAME" },
5181 { 0x4B, "USER_MOBILE_NUMBER" },
5182 { 0x4C, "USER_ONLINE_STATUS" },
5187 * Presence value tokens
5190 { 0x5C, "ANXIOUS" },
5191 { 0x5D, "ASHAMED" },
5192 { 0x5E, "AUDIO_CALL" },
5193 { 0x5F, "AVAILABLE" },
5197 { 0x63, "COMPUTER" },
5198 { 0x64, "DISCREET" },
5200 { 0x66, "EXCITED" },
5203 { 0x69, "IM_OFFLINE" },
5204 { 0x6A, "IM_ONLINE" },
5205 { 0x6B, "IN_LOVE" },
5206 { 0x6C, "INVINCIBLE" },
5207 { 0x6D, "JEALOUS" },
5209 { 0x6F, "MOBILE_PHONE" },
5210 { 0x70, "NOT_AVAILABLE" },
5216 { 0x76, "VIDEO_CALL" },
5217 { 0x77, "VIDEO_STREAM" },
5221 static value_string_ext vals_wv_csp_11_element_value_tokens_ext
= VALUE_STRING_EXT_INIT(vals_wv_csp_11_element_value_tokens
);
5224 /***** Token code page aggregation *****/
5227 ext_t_0_wv_cspc_11(tvbuff_t
*tvb _U_
, uint32_t value
, uint32_t str_tbl _U_
)
5229 char *str
= wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
5230 val_to_str_ext(value
, &vals_wv_csp_11_element_value_tokens_ext
,
5231 "<Unknown WV-CSP 1.1 Common Value token 0x%X>"));
5235 static const value_valuestring wbxml_wv_csp_11_global
[] = {
5236 { 0, wbxml_wv_csp_11_global_cp0
},
5240 static const value_valuestring wbxml_wv_csp_11_tags
[] = {
5241 { 0, wbxml_wv_csp_11_tags_cp0
},
5242 { 1, wbxml_wv_csp_11_tags_cp1
},
5243 { 2, wbxml_wv_csp_11_tags_cp2
},
5244 { 3, wbxml_wv_csp_11_tags_cp3
},
5245 { 4, wbxml_wv_csp_11_tags_cp4
},
5246 { 5, wbxml_wv_csp_11_tags_cp5
},
5247 { 6, wbxml_wv_csp_11_tags_cp6
},
5248 { 7, wbxml_wv_csp_11_tags_cp7
},
5252 static const value_valuestring wbxml_wv_csp_11_attrStart
[] = {
5253 { 0, wbxml_wv_csp_11_attrStart_cp0
},
5257 static const wbxml_decoding decode_wv_cspc_11
= {
5258 "Wireless-Village Client-Server Protocol 1.1",
5260 { ext_t_0_wv_cspc_11
, NULL
, NULL
},
5261 wv_csp11_opaque_binary_tag
,
5262 wv_csp11_opaque_literal_tag
,
5263 default_opaque_binary_attr
,
5264 default_opaque_literal_attr
,
5265 wbxml_wv_csp_11_global
,
5266 wbxml_wv_csp_11_tags
,
5267 wbxml_wv_csp_11_attrStart
,
5277 * Wireless Village Client Server Protocol
5278 ***************************************/
5280 /***** Global extension tokens *****/
5281 /* Same as WV-CSP 1.1 */
5283 /***** Tag tokens *****/
5284 /* Common code page */
5285 /* Same as cp0 of WV-CSP 1.1 */
5286 #define wbxml_wv_csp_12_tags_cp0 wbxml_wv_csp_11_tags_cp0
5287 /* Note that the table continues in code page 0x09 */
5289 /* Access code page (0x01) */
5290 static const value_string wbxml_wv_csp_12_tags_cp1
[] = {
5291 /* 0x00 -- 0x04 GLOBAL */
5292 { 0x05, "AllFunctions" },
5293 { 0x06, "AllFunctionsRequest" },
5294 { 0x07, "CancelInvite-Request" },
5295 { 0x08, "CancelInviteUser-Request" },
5296 { 0x09, "Capability" },
5297 { 0x0A, "CapabilityList" },
5298 { 0x0B, "CapabilityRequest" },
5299 { 0x0C, "ClientCapability-Request" },
5300 { 0x0D, "ClientCapability-Response" },
5301 { 0x0E, "DigestBytes" },
5302 { 0x0F, "DigestSchema" },
5303 { 0x10, "Disconnect" },
5304 { 0x11, "Functions" },
5305 { 0x12, "GetSPInfo-Request" },
5306 { 0x13, "GetSPInfo-Response" },
5307 { 0x14, "InviteID" },
5308 { 0x15, "InviteNote" },
5309 { 0x16, "Invite-Request" },
5310 { 0x17, "Invite-Response" },
5311 { 0x18, "InviteType" },
5312 { 0x19, "InviteUser-Request" },
5313 { 0x1A, "InviteUser-Response" },
5314 { 0x1B, "KeepAlive-Request" },
5315 { 0x1C, "KeepAliveTime" },
5316 { 0x1D, "Login-Request" },
5317 { 0x1E, "Login-Response" },
5318 { 0x1F, "Logout-Request" },
5320 { 0x21, "Password" },
5321 { 0x22, "Polling-Request" },
5322 { 0x23, "ResponseNote" },
5323 { 0x24, "SearchElement" },
5324 { 0x25, "SearchFindings" },
5325 { 0x26, "SearchID" },
5326 { 0x27, "SearchIndex" },
5327 { 0x28, "SearchLimit" },
5328 { 0x29, "KeepAlive-Response" },
5329 { 0x2A, "SearchPairList" },
5330 { 0x2B, "Search-Request" },
5331 { 0x2C, "Search-Response" },
5332 { 0x2D, "SearchResult" },
5333 { 0x2E, "Service-Request" },
5334 { 0x2F, "Service-Response" },
5335 { 0x30, "SessionCookie" },
5336 { 0x31, "StopSearch-Request" },
5337 { 0x32, "TimeToLive" },
5338 /* New in WV-CSP 1.1 */
5339 { 0x33, "SearchString" },
5340 { 0x34, "CompletionFlag" },
5341 /* New in WV-CSP 1.2 */
5342 { 0x36, "ReceiveList" },
5343 { 0x37, "VerifyID-Request" },
5344 { 0x38, "Extended-Request" },
5345 { 0x39, "Extended-Response" },
5346 { 0x3A, "AgreedCapabilityList" },
5347 { 0x3B, "ExtendedData" },
5348 { 0x3C, "OtherServer" },
5349 { 0x3D, "PresenceAttributeNSName" },
5350 { 0x3E, "SessionNSName" },
5351 { 0x3F, "TransactionNSName" },
5355 /* Note that the table continues in code page 0x0A */
5357 /* Service code page (0x02) */
5358 static const value_string wbxml_wv_csp_12_tags_cp2
[] = {
5359 /* 0x00 -- 0x04 GLOBAL */
5361 { 0x06, "AttListFunc" },
5367 { 0x0C, "ContListFunc" },
5372 { 0x11, "FundamentalFeat" },
5385 { 0x1E, "GroupAuthFunc" },
5386 { 0x1F, "GroupFeat" },
5387 { 0x20, "GroupMgmtFunc" },
5388 { 0x21, "GroupUseFunc" },
5389 { 0x22, "IMAuthFunc" },
5391 { 0x24, "IMReceiveFunc" },
5392 { 0x25, "IMSendFunc" },
5394 { 0x27, "InviteFunc" },
5400 { 0x2D, "PresenceAuthFunc" },
5401 { 0x2E, "PresenceDeliverFunc" },
5402 { 0x2F, "PresenceFeat" },
5407 { 0x34, "SearchFunc" },
5408 { 0x35, "ServiceFunc" },
5415 { 0x3C, "WVCSPFeat" },
5416 /* New in WV-CSP 1.2 */
5423 /* Note that the table continues in code page 0x08 */
5425 /* Client capability code page (0x03) */
5426 static const value_string wbxml_wv_csp_12_tags_cp3
[] = {
5427 /* 0x00 -- 0x04 GLOBAL */
5428 { 0x05, "AcceptedCharset" },
5429 { 0x06, "AcceptedContentLength" },
5430 { 0x07, "AcceptedContentType" },
5431 { 0x08, "AcceptedTransferEncoding" },
5432 { 0x09, "AnyContent" },
5433 { 0x0A, "DefaultLanguage" },
5434 { 0x0B, "InitialDeliveryMethod" },
5435 { 0x0C, "MultiTrans" },
5436 { 0x0D, "ParserSize" },
5437 { 0x0E, "ServerPollMin" },
5438 { 0x0F, "SupportedBearer" },
5439 { 0x10, "SupportedCIRMethod" },
5440 { 0x11, "TCPAddress" },
5441 { 0x12, "TCPPort" },
5442 { 0x13, "UDPPort" },
5450 /* Presence primitive code page (0x04) */
5451 static const value_string wbxml_wv_csp_12_tags_cp4
[] = {
5452 /* 0x00 -- 0x04 GLOBAL */
5453 { 0x05, "CancelAuth-Request" },
5454 { 0x06, "ContactListProperties" },
5455 { 0x07, "CreateAttributeList-Request" },
5456 { 0x08, "CreateList-Request" },
5457 { 0x09, "DefaultAttributeList" },
5458 { 0x0A, "DefaultContactList" },
5459 { 0x0B, "DefaultList" },
5460 { 0x0C, "DeleteAttributeList-Request" },
5461 { 0x0D, "DeleteList-Request" },
5462 { 0x0E, "GetAttributeList-Request" },
5463 { 0x0F, "GetAttributeList-Response" },
5464 { 0x10, "GetList-Request" },
5465 { 0x11, "GetList-Response" },
5466 { 0x12, "GetPresence-Request" },
5467 { 0x13, "GetPresence-Response" },
5468 { 0x14, "GetWatcherList-Request" },
5469 { 0x15, "GetWatcherList-Response" },
5470 { 0x16, "ListManage-Request" },
5471 { 0x17, "ListManage-Response" },
5472 { 0x18, "UnsubscribePresence-Request" },
5473 { 0x19, "PresenceAuth-Request" },
5474 { 0x1A, "PresenceAuth-User" },
5475 { 0x1B, "PresenceNotification-Request" },
5476 { 0x1C, "UpdatePresence-Request" },
5477 { 0x1D, "SubscribePresence-Request" },
5478 /* New in WV-CSP 1.2 */
5479 { 0x1E, "Auto-Subscribe" },
5480 /* 0x1E was defined in WV-CSP 1.0: UnsubscribePresence-Request */
5481 { 0x1F, "GetReactiveAuthStatus-Request" },
5482 /* 0x1F was defined in WV-CSP 1.0: UpdatePresence-Request */
5483 { 0x20, "GetReactiveAuthStatus-Response" },
5488 /* Presence attribute code page (0x05) */
5489 static const value_string wbxml_wv_csp_12_tags_cp5
[] = {
5490 /* 0x00 -- 0x04 GLOBAL */
5491 { 0x05, "Accuracy" },
5492 { 0x06, "Address" },
5493 { 0x07, "AddrPref" },
5495 { 0x09, "Altitude" },
5496 { 0x0A, "Building" },
5499 { 0x0D, "ClientInfo" },
5500 { 0x0E, "ClientProducer" },
5501 { 0x0F, "ClientType" },
5502 { 0x10, "ClientVersion" },
5504 { 0x12, "CommCap" },
5505 { 0x13, "ContactInfo" },
5506 { 0x14, "ContainedvCard" },
5507 { 0x15, "Country" },
5508 { 0x16, "Crossing1" },
5509 { 0x17, "Crossing2" },
5510 { 0x18, "DevManufacturer" },
5511 { 0x19, "DirectContent" },
5512 { 0x1A, "FreeTextLocation" },
5513 { 0x1B, "GeoLocation" },
5514 { 0x1C, "Language" },
5515 { 0x1D, "Latitude" },
5516 { 0x1E, "Longitude" },
5518 { 0x20, "NamedArea" },
5519 { 0x21, "OnlineStatus" },
5522 { 0x24, "PreferredContacts" },
5523 { 0x25, "PreferredLanguage" },
5524 { 0x26, "ReferredContent" },
5525 { 0x27, "ReferredvCard" },
5526 { 0x28, "Registration" },
5527 { 0x29, "StatusContent" },
5528 { 0x2A, "StatusMood" },
5529 { 0x2B, "StatusText" },
5531 { 0x2D, "TimeZone" },
5532 { 0x2E, "UserAvailability" },
5533 /* New in WV-CSP 1.1 */
5536 { 0x31, "Contact" },
5537 { 0x32, "Cpriority" },
5538 { 0x33, "Cstatus" },
5541 /* New in WV-CSP 1.2 */
5542 { 0x36, "ContentType" },
5543 { 0x37, "Inf_link" },
5544 { 0x38, "InfoLink" },
5551 /* Messaging code page (0x06) */
5552 static const value_string wbxml_wv_csp_12_tags_cp6
[] = {
5553 /* 0x00 -- 0x04 GLOBAL */
5554 { 0x05, "BlockList" },
5555 { 0x06, "BlockEntity-Request" }, /* Was: BlockUser-Request */
5556 { 0x07, "DeliveryMethod" },
5557 { 0x08, "DeliveryReport" },
5558 { 0x09, "DeliveryReport-Request" },
5559 { 0x0A, "ForwardMessage-Request" },
5560 { 0x0B, "GetBlockedList-Request" },
5561 { 0x0C, "GetBlockedList-Response" },
5562 { 0x0D, "GetMessageList-Request" },
5563 { 0x0E, "GetMessageList-Response" },
5564 { 0x0F, "GetMessage-Request" },
5565 { 0x10, "GetMessage-Response" },
5566 { 0x11, "GrantList" },
5567 { 0x12, "MessageDelivered" },
5568 { 0x13, "MessageInfo" },
5569 { 0x14, "MessageNotification" },
5570 { 0x15, "NewMessage" },
5571 { 0x16, "RejectMessage-Request" },
5572 { 0x17, "SendMessage-Request" },
5573 { 0x18, "SendMessage-Response" },
5574 { 0x19, "SetDeliveryMethod-Request" },
5575 { 0x1A, "DeliveryTime" },
5580 /* Group code page (0x07) */
5581 static const value_string wbxml_wv_csp_12_tags_cp7
[] = {
5582 /* 0x00 -- 0x04 GLOBAL */
5583 { 0x05, "AddGroupMembers-Request" },
5585 { 0x07, "CreateGroup-Request" },
5586 { 0x08, "DeleteGroup-Request" },
5587 { 0x09, "GetGroupMembers-Request" },
5588 { 0x0A, "GetGroupMembers-Response" },
5589 { 0x0B, "GetGroupProps-Request" },
5590 { 0x0C, "GetGroupProps-Response" },
5591 { 0x0D, "GroupChangeNotice" },
5592 { 0x0E, "GroupProperties" },
5594 { 0x10, "JoinedRequest" },
5595 { 0x11, "JoinGroup-Request" },
5596 { 0x12, "JoinGroup-Response" },
5597 { 0x13, "LeaveGroup-Request" },
5598 { 0x14, "LeaveGroup-Response" },
5600 { 0x16, "MemberAccess-Request" },
5602 { 0x18, "OwnProperties" },
5603 { 0x19, "RejectList-Request" },
5604 { 0x1A, "RejectList-Response" },
5605 { 0x1B, "RemoveGroupMembers-Request" },
5606 { 0x1C, "SetGroupProps-Request" },
5607 { 0x1D, "SubscribeGroupNotice-Request" },
5608 { 0x1E, "SubscribeGroupNotice-Response" },
5610 { 0x20, "WelcomeNote" },
5611 /* New in WV-CSP 1.1 */
5612 { 0x21, "JoinGroup" },
5613 { 0x22, "SubscribeNotification" },
5614 { 0x23, "SubscribeType" },
5615 /* New in WV-CSP 1.2 */
5616 { 0x24, "GetJoinedUsers-Request" },
5617 { 0x25, "GetJoinedUsers-Response" },
5618 { 0x26, "AdminMapList" },
5619 { 0x27, "AdminMapping" },
5620 { 0x28, "Mapping" },
5621 { 0x29, "ModMapping" },
5622 { 0x2A, "UserMapList" },
5623 { 0x2B, "UserMapping" },
5628 /* Service negotiation code page - continued (0x08) */
5629 static const value_string wbxml_wv_csp_12_tags_cp8
[] = {
5630 /* 0x00 -- 0x04 GLOBAL */
5635 { 0x09, "VerifyIDFunc" },
5640 /* Common code page - continued (0x09) */
5641 static const value_string wbxml_wv_csp_12_tags_cp9
[] = {
5642 /* 0x00 -- 0x04 GLOBAL */
5645 { 0x07, "ExtBlock" },
5646 { 0x08, "HistoryPeriod" },
5648 { 0x0A, "MaxWatcherList" },
5649 { 0x0B, "ReactiveAuthState" },
5650 { 0x0C, "ReactiveAuthStatus" },
5651 { 0x0D, "ReactiveAuthStatusList" },
5652 { 0x0E, "Watcher" },
5653 { 0x0F, "WatcherStatus" },
5658 /* Access code page - continued (0x0A) */
5659 static const value_string wbxml_wv_csp_12_tags_cp10
[] = {
5660 /* 0x00 -- 0x04 GLOBAL */
5661 { 0x05, "WV-CSP-NSDiscovery-Request" },
5662 { 0x06, "WV-CSP-NSDiscovery-Response" },
5663 { 0x07, "VersionList" },
5668 /***** Attribute Start tokens *****/
5669 /* Common code page (0x00) */
5670 static const value_string wbxml_wv_csp_12_attrStart_cp0
[] = {
5671 /* 0x00 -- 0x04 GLOBAL */
5672 { 0x05, "xmlns='http://www.wireless-village.org/CSP'" },
5673 { 0x06, "xmlns='http://www.wireless-village.org/PA'" },
5674 { 0x07, "xmlns='http://www.wireless-village.org/TRC'" },
5675 /* New in WV-CSP 1.2 */
5676 { 0x08, "xmlns='http://www.openmobilealliance.org/DTD/WV-CSP'" },
5677 { 0x09, "xmlns='http://www.openmobilealliance.org/DTD/WV-PA'" },
5678 { 0x0A, "xmlns http://www.openmobilealliance.org/DTD/WV-TRC'" },
5683 /***** Attribute Value tokens *****/
5685 * Element value tokens
5687 * NOTE - WV-CSP uses the EXT_T_0 token in a peculiar way: the mb_u_int32
5688 * does *not* reference an offset in the string table, but it refers to
5689 * the index in the following value_string.
5692 * - Values 'T' and 'F' are Boolean values representing "True" and "False"
5693 * (or "Yes" and "No" in some circumstances) respectively.
5694 * - Values 'GR', 'IM', 'PR', 'SC', 'GM' and 'US' are enumerated values
5695 * representing "Group", "Instant Messaging", "Presence", "Shared Content",
5696 * "Group membership" and "User" respectively.
5697 * - Values 'G', 'S' and 'U' are enumerated values representing "Get", "Set"
5698 * and "Unset" respectively.
5699 * - Values 'N' and 'P' are enumerated values representing "Notify/Get" and
5700 * "Push" respectively.
5702 * I repeat: this is NOT a attrValue[] array hence it is not called
5703 * wbxml_wv_XXX but vals_wv_XXX.
5705 static const value_string vals_wv_csp_12_element_value_tokens
[] = {
5707 * Common value tokens
5709 { 0x00, "AccessType" },
5710 { 0x01, "ActiveUsers" },
5712 { 0x03, "application/" },
5713 { 0x04, "application/vnd.wap.mms-message" },
5714 { 0x05, "application/x-sms" },
5715 { 0x06, "AutoJoin" },
5718 { 0x09, "Default" },
5719 { 0x0A, "DisplayName" },
5723 { 0x0E, "http://" },
5724 { 0x0F, "https://" },
5728 { 0x13, "MaxActiveUsers" },
5734 { 0x19, "Outband" },
5736 { 0x1B, "Private" },
5737 { 0x1C, "PrivateMessaging" },
5738 { 0x1D, "PrivilegeLevel" },
5741 { 0x20, "Request" },
5742 { 0x21, "Response" },
5743 { 0x22, "Restricted" },
5744 { 0x23, "ScreenName" },
5745 { 0x24, "Searchable" },
5749 { 0x28, "text/plain" },
5750 { 0x29, "text/x-vCalendar" },
5751 { 0x2A, "text/x-vCard" },
5757 { 0x30, "www.wireless-village.org" },
5758 /* New in WV-CSP 1.2 */
5759 { 0x31, "AutoDelete" },
5761 { 0x33, "Validity" },
5763 { 0x35, "GRANTED" },
5764 { 0x36, "PENDING" },
5768 * Access value tokens
5770 { 0x3D, "GROUP_ID" },
5771 { 0x3E, "GROUP_NAME" },
5772 { 0x3F, "GROUP_TOPIC" },
5773 { 0x40, "GROUP_USER_ID_JOINED" },
5774 { 0x41, "GROUP_USER_ID_OWNER" },
5779 { 0x46, "USER_ALIAS" },
5780 { 0x47, "USER_EMAIL_ADDRESS" },
5781 { 0x48, "USER_FIRST_NAME" },
5782 { 0x49, "USER_ID" },
5783 { 0x4A, "USER_LAST_NAME" },
5784 { 0x4B, "USER_MOBILE_NUMBER" },
5785 { 0x4C, "USER_ONLINE_STATUS" },
5789 /* New in WV-CSP 1.2 */
5790 { 0x50, "GROUP_USER_ID_AUTOJOIN" },
5792 * Presence value tokens
5795 { 0x5C, "ANXIOUS" },
5796 { 0x5D, "ASHAMED" },
5797 { 0x5E, "AUDIO_CALL" },
5798 { 0x5F, "AVAILABLE" },
5802 { 0x63, "COMPUTER" },
5803 { 0x64, "DISCREET" },
5805 { 0x66, "EXCITED" },
5807 /* { 0x68, "IM" }, Obsolete */
5808 { 0x69, "IM_OFFLINE" },
5809 { 0x6A, "IM_ONLINE" },
5810 { 0x6B, "IN_LOVE" },
5811 { 0x6C, "INVINCIBLE" },
5812 { 0x6D, "JEALOUS" },
5814 { 0x6F, "MOBILE_PHONE" },
5815 { 0x70, "NOT_AVAILABLE" },
5821 { 0x76, "VIDEO_CALL" },
5822 { 0x77, "VIDEO_STREAM" },
5825 * Access value tokens - continued
5835 /***** Token code page aggregation *****/
5838 ext_t_0_wv_cspc_12(tvbuff_t
*tvb _U_
, uint32_t value
, uint32_t str_tbl _U_
)
5840 char *str
= wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
5841 val_to_str(value
, vals_wv_csp_12_element_value_tokens
,
5842 "<Unknown WV-CSP 1.2 Common Value token 0x%X>"));
5846 #define wbxml_wv_csp_12_global wbxml_wv_csp_11_global
5848 static const value_valuestring wbxml_wv_csp_12_tags
[] = {
5849 { 0, wbxml_wv_csp_12_tags_cp0
},
5850 { 1, wbxml_wv_csp_12_tags_cp1
},
5851 { 2, wbxml_wv_csp_12_tags_cp2
},
5852 { 3, wbxml_wv_csp_12_tags_cp3
},
5853 { 4, wbxml_wv_csp_12_tags_cp4
},
5854 { 5, wbxml_wv_csp_12_tags_cp5
},
5855 { 6, wbxml_wv_csp_12_tags_cp6
},
5856 { 7, wbxml_wv_csp_12_tags_cp7
},
5857 { 8, wbxml_wv_csp_12_tags_cp8
},
5858 { 9, wbxml_wv_csp_12_tags_cp9
},
5859 { 10, wbxml_wv_csp_12_tags_cp10
},
5863 static const value_valuestring wbxml_wv_csp_12_attrStart
[] = {
5864 { 0, wbxml_wv_csp_12_attrStart_cp0
},
5868 static const wbxml_decoding decode_wv_cspc_12
= {
5869 "Wireless-Village Client-Server Protocol 1.2",
5871 { ext_t_0_wv_cspc_12
, NULL
, NULL
},
5872 wv_csp12_opaque_binary_tag
,
5873 wv_csp12_opaque_literal_tag
,
5874 default_opaque_binary_attr
,
5875 default_opaque_literal_attr
,
5876 wbxml_wv_csp_12_global
,
5877 wbxml_wv_csp_12_tags
,
5878 wbxml_wv_csp_12_attrStart
,
5885 * Wireless Village Client Server Protocol
5886 ***************************************/
5888 /***** Global extension tokens *****/
5889 /* Same as WV-CSP 1.1 */
5891 /***** Tag tokens *****/
5892 /* Common code page */
5893 static const value_string wbxml_wv_csp_13_tags_cp0
[] = {
5894 /* 0x00 -- 0x04 GLOBAL */
5895 { 0x05, "Acceptance"},
5896 { 0x06, "AddList" },
5897 { 0x07, "AddNickList"},
5898 { 0x09, "WV-CSP-Message"},
5899 { 0x0A, "ClientID"},
5901 { 0x0C, "ContactList"},
5902 { 0x0D, "ContentData"},
5903 { 0x0E, "ContentEncoding"},
5904 { 0x0F, "ContentSize" },
5905 { 0x10, "ContentType"},
5906 { 0x11, "DateTime" },
5907 { 0x12, "Description" },
5908 { 0x13, "DetailedResult"},
5909 { 0x14, "EntityList"},
5912 { 0x17, "GroupList"},
5914 { 0x1A, "MessageCount" },
5915 { 0x1B, "MessageID" },
5916 { 0x1C, "MessageURI"},
5919 { 0x1F, "NickList"},
5920 { 0x20, "NickName"},
5922 { 0x22, "Presence"},
5923 { 0x23, "PresenceSubList" },
5924 { 0x24, "PresenceValue"},
5925 { 0x25, "Property" },
5926 { 0x26, "Qualifier" },
5927 { 0x27, "Recipient" },
5928 { 0x28, "RemoveList"},
5929 { 0x29, "RemoveNickList" },
5931 { 0x2B, "ScreenName"},
5934 { 0x2E, "SessionDescriptor" },
5935 { 0x2F, "SessionID"},
5936 { 0x30, "SessionType" },
5939 { 0x32, "Transaction" },
5940 { 0x33, "TransactionContent" },
5941 { 0x34, "TransactionDescriptor"},
5942 { 0x35, "TransactionID"},
5943 { 0x36, "TransactionMode" },
5948 { 0x3B, "UserList" },
5949 { 0x3C, "Validity" },
5954 /* Note that the table continues in code page 0x09 */
5956 /* Access code page (0x01) */
5957 static const value_string wbxml_wv_csp_13_tags_cp1
[] = {
5958 /* 0x00 -- 0x04 GLOBAL */
5959 { 0x05, "AllFunctions" },
5960 { 0x06, "AllFunctionsRequest" },
5961 { 0x07, "CancelInvite-Request" },
5962 { 0x08, "CancelInviteUser-Request" },
5963 /* { 0x09, "Capability" }, - removed in WV 1.3*/
5964 { 0x0A, "CapabilityList" },
5965 { 0x0B, "CapabilityRequest" },
5966 { 0x0C, "ClientCapability-Request" },
5967 { 0x0D, "ClientCapability-Response" },
5968 { 0x0E, "DigestBytes" },
5969 { 0x0F, "DigestSchema" },
5970 { 0x10, "Disconnect" },
5971 { 0x11, "Functions" },
5972 { 0x12, "GetSPInfo-Request" },
5973 { 0x13, "GetSPInfo-Response" },
5974 { 0x14, "InviteID" },
5975 { 0x15, "InviteNote" },
5976 { 0x16, "Invite-Request" },
5977 { 0x17, "Invite-Response" },
5978 { 0x18, "InviteType" },
5979 { 0x19, "InviteUser-Request" },
5980 { 0x1A, "InviteUser-Response" },
5981 { 0x1B, "KeepAlive-Request" },
5982 { 0x1C, "KeepAliveTime" },
5983 { 0x1D, "Login-Request" },
5984 { 0x1E, "Login-Response" },
5985 { 0x1F, "Logout-Request" },
5987 { 0x21, "Password" },
5988 { 0x22, "Polling-Request" },
5989 { 0x23, "ResponseNote" },
5990 { 0x24, "SearchElement" },
5991 { 0x25, "SearchFindings" },
5992 { 0x26, "SearchID" },
5993 { 0x27, "SearchIndex" },
5994 { 0x28, "SearchLimit" },
5995 { 0x29, "KeepAlive-Response" },
5996 { 0x2A, "SearchPairList" },
5997 { 0x2B, "Search-Request" },
5998 { 0x2C, "Search-Response" },
5999 { 0x2D, "SearchResult" },
6000 { 0x2E, "Service-Request" },
6001 { 0x2F, "Service-Response" },
6002 { 0x30, "SessionCookie" },
6003 { 0x31, "StopSearch-Request" },
6004 { 0x32, "TimeToLive" },
6005 /* New in WV-CSP 1.1 */
6006 { 0x33, "SearchString" },
6007 { 0x34, "CompletionFlag" },
6008 /* New in WV-CSP 1.2 */
6009 { 0x36, "ReceiveList" },
6010 { 0x37, "VerifyID-Request" },
6011 { 0x38, "Extended-Request" },
6012 { 0x39, "Extended-Response" },
6013 { 0x3A, "AgreedCapabilityList" },
6014 { 0x3B, "ExtendedData" },
6015 { 0x3C, "OtherServer" },
6016 { 0x3D, "PresenceAttributeNSName" },
6017 { 0x3E, "SessionNSName" },
6018 { 0x3F, "TransactionNSName" },
6022 /* Note that the table continues in code page 0x0A */
6024 /* Service code page (0x02) */
6025 static const value_string wbxml_wv_csp_13_tags_cp2
[] = {
6026 /* 0x00 -- 0x04 GLOBAL */
6028 /* { 0x06, "AttListFunc" }, removed in WV 1.3 */
6030 /* { 0x08, "CAAUT" }, removed in WV 1.3 */
6032 /* { 0x0A, "CALI" }, removed in WV 1.3 */
6034 { 0x0C, "ContListFunc" },
6039 { 0x11, "FundamentalFeat" },
6041 /* { 0x13, "GALS" }, removed in WV 1.3 */
6052 { 0x1E, "GroupAuthFunc" },
6053 { 0x1F, "GroupFeat" },
6054 { 0x20, "GroupMgmtFunc" },
6055 { 0x21, "GroupUseFunc" },
6056 { 0x22, "IMAuthFunc" },
6058 { 0x24, "IMReceiveFunc" },
6059 { 0x25, "IMSendFunc" },
6061 { 0x27, "InviteFunc" },
6067 { 0x2D, "PresenceAuthFunc" },
6068 { 0x2E, "PresenceDeliverFunc"},
6069 { 0x2F, "PresenceFeat" },
6070 /* { 0x30, "REACT" }, removed in WV 1.3 */
6074 { 0x34, "SearchFunc" },
6075 { 0x35, "ServiceFunc" },
6082 { 0x3C, "WVCSPFeat" },
6083 /* New in WV-CSP 1.2 */
6090 /* Note that the table continues in code page 0x08 */
6092 /* Client capability code page (0x03) */
6093 static const value_string wbxml_wv_csp_13_tags_cp3
[] = {
6094 /* 0x00 -- 0x04 GLOBAL */
6095 /* {0x05, "AcceptedCharset"}, - removed in WV 1.3 */
6096 /* { 0x06, "AcceptedContentLength"}, - removed in WV 1.3 */
6097 { 0x07, "AcceptedContentType"},
6098 { 0x08, "AcceptedTransferEncoding"},
6099 { 0x09, "AnyContent"},
6100 { 0x0A, "DefaultLanguage"},
6101 { 0x0B, "InitialDeliveryMethod"},
6102 { 0x0C, "MultiTrans"},
6103 { 0x0D, "ParserSize"},
6104 { 0x0E, "ServerPollMin"},
6105 { 0x0F, "SupportedBearer"},
6106 { 0x10, "SupportedCIRMethod"},
6107 { 0x11, "TCPAddress"},
6110 /* New in WV-CSP 1.3*/
6111 { 0x14, "CIRHTTPAddress"},
6112 { 0x15, "UDPAddress"},
6113 { 0x16, "AcceptedPullLength"},
6114 { 0x17, "AcceptedPushLength"},
6115 { 0x18, "AcceptedRichContentLength"},
6116 { 0x19, "AcceptedTextContentLength"},
6117 { 0x1A, "OfflineETEMHandling"},
6118 { 0x1B, "PlainTextCharset"},
6119 { 0x1C, "SessionPriority"},
6120 { 0x1D, "SupportedOfflineBearer"},
6121 { 0x1F, "UserSessionLimit"},
6122 { 0x20, "CIRSMSAddress"},
6123 { 0x21, "MultiTransPerMessage"},
6124 { 0x22, "OnlineETEMHandling"},
6125 { 0x23,"ContentPolicy"},
6126 { 0x24, "ContentPolicyLimit"},
6131 /* Presence primitive code page (0x04) */
6132 static const value_string wbxml_wv_csp_13_tags_cp4
[] = {
6133 /* 0x00 -- 0x04 GLOBAL */
6134 /* { 0x05, "CancelAuth-Request" }, - removed in WV 1.3 */
6135 { 0x06, "ContactListProperties" },
6136 { 0x07, "CreateAttributeList-Request" },
6137 { 0x08, "CreateList-Request" },
6138 { 0x09, "DefaultAttributeList" },
6139 { 0x0A, "DefaultContactList" },
6140 { 0x0B, "DefaultList" },
6141 { 0x0C, "DeleteAttributeList-Request" },
6142 { 0x0D, "DeleteList-Request" },
6143 { 0x0E, "GetAttributeList-Request" },
6144 { 0x0F, "GetAttributeList-Response" },
6145 { 0x10, "GetList-Request" },
6146 { 0x11, "GetList-Response" },
6147 { 0x12, "GetPresence-Request" },
6148 { 0x13, "GetPresence-Response" },
6149 { 0x14, "GetWatcherList-Request" },
6150 { 0x15, "GetWatcherList-Response" },
6151 { 0x16, "ListManage-Request" },
6152 { 0x17, "ListManage-Response" },
6153 { 0x18, "UnsubscribePresence-Request" },
6154 { 0x19, "PresenceAuth-Request" },
6155 { 0x1A, "PresenceAuth-User" },
6156 { 0x1B, "PresenceNotification-Request" },
6157 { 0x1C, "UpdatePresence-Request" },
6158 { 0x1D, "SubscribePresence-Request" },
6159 /* New in WV-CSP 1.2 */
6160 /* { 0x1E, "Auto-Subscribe" }, - removed in WV 1.3 */
6161 /* { 0x1F, "GetReactiveAuthStatus-Request" }, */
6162 /* { 0x20, "GetReactiveAuthStatus-Response" }, */
6163 /* New in WV-CSP 1.3 */
6164 { 0x21, "CreateList-Response"},
6169 /* Presence attribute code page (0x05) */
6170 static const value_string wbxml_wv_csp_13_tags_cp5
[] = {
6171 /* 0x00 -- 0x04 GLOBAL */
6172 { 0x05, "Accuracy" },
6173 { 0x06, "Address" },
6174 { 0x07, "AddrPref" },
6176 { 0x09, "Altitude" },
6177 { 0x0A, "Building" },
6180 { 0x0D, "ClientInfo" },
6181 { 0x0E, "ClientProducer" },
6182 { 0x0F, "ClientType" },
6183 { 0x10, "ClientVersion" },
6185 { 0x12, "CommCap" },
6186 { 0x13, "ContactInfo" },
6187 { 0x14, "ContainedvCard" },
6188 { 0x15, "Country" },
6189 { 0x16, "Crossing1" },
6190 { 0x17, "Crossing2" },
6191 { 0x18, "DevManufacturer" },
6192 { 0x19, "DirectContent" },
6193 { 0x1A, "FreeTextLocation" },
6194 { 0x1B, "GeoLocation" },
6195 { 0x1C, "Language" },
6196 { 0x1D, "Latitude" },
6197 { 0x1E, "Longitude" },
6199 { 0x20, "NamedArea" },
6200 { 0x21, "OnlineStatus" },
6203 { 0x24, "PreferredContacts" },
6204 { 0x25, "PreferredLanguage" },
6205 { 0x26, "ReferredContent" },
6206 { 0x27, "ReferredvCard" },
6207 { 0x28, "Registration" },
6208 { 0x29, "StatusContent" },
6209 { 0x2A, "StatusMood" },
6210 { 0x2B, "StatusText" },
6212 { 0x2D, "TimeZone" },
6213 { 0x2E, "UserAvailability" },
6214 /* New in WV-CSP 1.1 */
6217 { 0x31, "Contact" },
6218 { 0x32, "Cpriority" },
6219 { 0x33, "Cstatus" },
6222 /* New in WV-CSP 1.2 */
6223 { 0x36, "ContentType" },
6224 { 0x37, "Inf_link" },
6225 { 0x38, "InfoLink" },
6228 /* New in WV-CSP 1.3 */
6229 { 0x3B, "ClientContentLimit"},
6230 { 0x3C, "ClientIMPriority"},
6231 { 0x3D, "MaxPullLength"},
6232 { 0x3E, "MaxPushLength"},
6237 /* Messaging code page (0x06) */
6238 static const value_string wbxml_wv_csp_13_tags_cp6
[] = {
6239 /* 0x00 -- 0x04 GLOBAL */
6240 { 0x05, "BlockList" },
6241 { 0x06, "BlockEntity-Request" }, /* Was: BlockUser-Request */
6242 { 0x07, "DeliveryMethod" },
6243 { 0x08, "DeliveryReport" },
6244 { 0x09, "DeliveryReport-Request" },
6245 { 0x0A, "ForwardMessage-Request" },
6246 { 0x0B, "GetBlockedList-Request" },
6247 { 0x0C, "GetBlockedList-Response" },
6248 { 0x0D, "GetMessageList-Request" },
6249 { 0x0E, "GetMessageList-Response" },
6250 { 0x0F, "GetMessage-Request" },
6251 { 0x10, "GetMessage-Response" },
6252 { 0x11, "GrantList" },
6253 { 0x12, "MessageDelivered" },
6254 { 0x13, "MessageInfo" },
6255 { 0x14, "MessageNotification" },
6256 { 0x15, "NewMessage" },
6257 { 0x16, "RejectMessage-Request" },
6258 { 0x17, "SendMessage-Request" },
6259 { 0x18, "SendMessage-Response" },
6260 { 0x19, "SetDeliveryMethod-Request" },
6261 { 0x1A, "DeliveryTime" },
6262 /* New in WV-CSP 1.3 */
6263 { 0x20, "MessageInfoList"},
6264 { 0x21, "ForwardMessage-Response"},
6269 /* Group code page (0x07) */
6270 static const value_string wbxml_wv_csp_13_tags_cp7
[] = {
6271 /* 0x00 -- 0x04 GLOBAL */
6272 { 0x05, "AddGroupMembers-Request" },
6274 { 0x07, "CreateGroup-Request" },
6275 { 0x08, "DeleteGroup-Request" },
6276 { 0x09, "GetGroupMembers-Request" },
6277 { 0x0A, "GetGroupMembers-Response" },
6278 { 0x0B, "GetGroupProps-Request" },
6279 { 0x0C, "GetGroupProps-Response" },
6280 { 0x0D, "GroupChangeNotice" },
6281 { 0x0E, "GroupProperties" },
6283 { 0x10, "JoinedRequest" },
6284 { 0x11, "JoinGroup-Request" },
6285 { 0x12, "JoinGroup-Response" },
6286 { 0x13, "LeaveGroup-Request" },
6287 { 0x14, "LeaveGroup-Response" },
6289 { 0x16, "MemberAccess-Request" },
6291 { 0x18, "OwnProperties" },
6292 { 0x19, "RejectList-Request" },
6293 { 0x1A, "RejectList-Response" },
6294 { 0x1B, "RemoveGroupMembers-Request" },
6295 { 0x1C, "SetGroupProps-Request" },
6296 { 0x1D, "SubscribeGroupNotice-Request" },
6297 { 0x1E, "SubscribeGroupNotice-Response" },
6298 /* { 0x1F, "Users" }, - removed in WV 1.3 */
6299 { 0x20, "WelcomeNote" },
6300 /* New in WV-CSP 1.1 */
6301 { 0x21, "JoinGroup" },
6302 { 0x22, "SubscribeNotification" },
6303 { 0x23, "SubscribeType" },
6304 /* New in WV-CSP 1.2 */
6305 { 0x24, "GetJoinedUsers-Request" },
6306 { 0x25, "GetJoinedUsers-Response" },
6307 { 0x26, "AdminMapList" },
6308 { 0x27, "AdminMapping" },
6309 { 0x28, "Mapping" },
6310 { 0x29, "ModMapping" },
6311 { 0x2A, "UserMapList" },
6312 { 0x2B, "UserMapping" },
6313 /* New in WV-CSP 1.3 */
6314 { 0x2C, "JoinedBlocked" },
6315 { 0x2D, "LeftBlocked" },
6320 /* Service negotiation code page - continued (0x08) */
6321 static const value_string wbxml_wv_csp_13_tags_cp8
[] = {
6322 /* 0x00 -- 0x04 GLOBAL */
6323 /* New in WV-CSP 1.2 */
6328 { 0x09, "VerifyIDFunc" },
6329 /* New in WV-CSP 1.3 */
6333 { 0x0D, "OFFNOTIF" },
6339 /* Common code page - continued (0x09) */
6340 static const value_string wbxml_wv_csp_13_tags_cp9
[] = {
6341 /* 0x00 -- 0x04 GLOBAL */
6342 /* New in WV-CSP 1.2 */
6345 { 0x07, "ExtBlock" },
6346 { 0x08, "HistoryPeriod" },
6348 { 0x0A, "MaxWatcherList" },
6349 /* { 0x0B, "ReactiveAuthState" }, - removed in WV 1.3 */
6350 /* { 0x0C, "ReactiveAuthStatus" }, - removed in WV 1.3 */
6351 /* { 0x0D, "ReactiveAuthStatusList" }, - removed in WV 1.3 */
6352 { 0x0E, "Watcher" },
6353 { 0x0F, "WatcherStatus" },
6354 /* New in WV-CSP 1.3 */
6355 { 0x1B, "AnswerOption"},
6356 { 0x1C, "AnswerOptionID" },
6357 { 0x1D, "AnswerOptions"},
6358 { 0x0B, "AnswerOptionText"},
6359 { 0x1E, "ApplicationID"},
6360 { 0x1F, "AuthorizeAndGrant"},
6361 { 0x20, "ChosenOptionID"},
6362 { 0x19, "ClearPublicProfile"},
6364 { 0x21, "ContactListNotify"},
6365 { 0x14, "ContentName"},
6366 { 0x22, "DefaultNotify"},
6367 { 0x39, "ExtBlockETEM"},
6368 { 0x36, "ExtendConversationID"},
6369 { 0x23, "ExtendConversationUser"},
6371 { 0x18, "FriendlyName"},
6372 { 0x34 , "GetMap-Request"},
6373 { 0x35, "GetMap-Response"},
6374 { 0x3A, "GroupContentLimit" },
6377 { 0x3B, "MessageTotalCount"},
6378 { 0x16, "NotificationType"},
6379 { 0x17, "NotificationTypeList"},
6380 { 0x1A, "PublicProfile"},
6381 { 0x38, "RequiresResponse"},
6382 { 0x25, "SegmentCount"},
6383 { 0x26, "SegmentID" },
6384 { 0x27, "SegmentInfo"},
6385 { 0x28, "SegmentReference"},
6388 { 0x29, "SystemMessage"},
6389 { 0x2A, "SystemMessageID"},
6390 { 0x2B, "SystemMessageList"},
6391 { 0x2C, "SystemMessageResponse"},
6392 { 0x2D, "SystemMessageResponseList" },
6393 { 0x2F, "SystemMessageText"},
6394 { 0x30, "TryAgainTimeout"},
6395 { 0x3C, "UnrecognizedUserID"},
6396 { 0x3F , "UserIDList"},
6397 { 0x3D, "UserIDPair"},
6398 { 0x31, "UserNotify"},
6399 { 0x3E, "ValidUserID"},
6400 { 0x32, "VerificationKey"},
6401 { 0x33, "VerificationMechanism"},
6402 { 0x37, "WatcherCount"},
6407 /* Access code page - continued (0x0A) */
6408 static const value_string wbxml_wv_csp_13_tags_cp10
[] = {
6409 /* 0x00 -- 0x04 GLOBAL */
6410 /* New in WV-CSP 1.2 */
6411 { 0x05, "WV-CSP-NSDiscovery-Request" },
6412 { 0x06, "WV-CSP-NSDiscovery-Response" },
6413 { 0x07, "VersionList"},
6414 /* New in WV-CSP 1.3 */
6415 { 0x08, "SubscribeNotification-Request" },
6416 { 0x09, "UnsubscribeNotification-Request" },
6417 { 0x0A, "Notification-Request" },
6418 { 0x0B, "AdvancedCriteria" },
6420 { 0x0D, "GetPublicProfile-Request" },
6421 { 0x0E, "GetPublicProfile-Response" },
6422 { 0x0F, "UpdatePublicProfile-Request" },
6423 { 0x10, "DropSegment-Request" },
6424 { 0x11, "ExtendConversation-Response" },
6425 { 0x12, "ExtendConversation-Request" },
6426 { 0x13, "GetSegment-Request" },
6427 { 0x14, "GetSegment-Response" },
6428 { 0x15, "SystemMessage-Request" },
6429 { 0x16, "SystemMessage-User" },
6430 { 0x17, "SearchPair" },
6431 { 0x18, "SegmentContent" },
6436 /* Common code page - continued (0x0B) */
6437 static const value_string wbxml_wv_csp_13_tags_cp11
[] = {
6438 /* 0x00 -- 0x04 GLOBAL */
6439 /* New in WV-CSP 1.3 */
6440 { 0x05, "GrantListInUse" },
6441 { 0x06, "BlockListInUse" },
6442 { 0x07, "ContactListIDList" },
6443 { 0x08, "AnswerOptionsText" },
6449 /***** Attribute Start tokens *****/
6450 /* Common code page (0x00) */
6451 static const value_string wbxml_wv_csp_13_attrStart_cp0
[] = {
6452 /* 0x00 -- 0x04 GLOBAL */
6453 { 0x05, "xmlns='http://www.wireless-village.org/CSP'" },
6454 { 0x06, "xmlns='http://www.wireless-village.org/PA'" },
6455 { 0x07, "xmlns='http://www.wireless-village.org/TRC'" },
6456 /* New in WV-CSP 1.2 */
6457 { 0x08, "xmlns='http://www.openmobilealliance.org/DTD/WV-CSP'" },
6458 { 0x09, "xmlns='http://www.openmobilealliance.org/DTD/WV-PA'" },
6459 { 0x0A, "xmlns='http://www.openmobilealliance.org/DTD/WV-TRC'" },
6460 /* New in WV-CSP 1.3 */
6461 { 0x0B, "xmlns='http://www.openmobilealliance.org/DTD/IMPS-CSP'" },
6462 { 0x0C, "xmlns='http://www.openmobilealliance.org/DTD/IMPS-PA'" },
6463 { 0x0D, "xmlns='http://www.openmobilealliance.org/DTD/IMPS-TRC'" },
6468 /***** Attribute Value tokens *****/
6470 * Element value tokens
6472 static const value_string vals_wv_csp_13_element_value_tokens
[] = {
6474 * Common value tokens
6477 { 0x00, "AccessType" },
6478 { 0x01, "ActiveUsers" },
6484 { 0x03, "application/" },
6485 { 0x04, "application/vnd.wap.mms-message" },
6486 { 0x05, "application/x-sms" },
6489 { 0x31, "AutoDelete" },
6490 { 0x06, "AutoJoin" },
6503 { 0xBD, "CURRENT_SUBSCRIBER" },
6504 { 0x09, "Default" },
6507 { 0x0A, "DisplayName" },
6508 { 0xA6, "DoNotNotify" },
6512 { 0xAC, "FORKALL" },
6513 { 0xBE, "FORMER_SUBSCRIBER" },
6514 { 0x87, "Fuchsia" },
6526 { 0x35, "GRANTED" },
6529 { 0x0E, "http://" },
6530 { 0x0F, "https://" },
6541 { 0x13, "MaxActiveUsers" },
6543 { 0xBB, "MinimumAge" },
6552 { 0x19, "Outband" },
6553 { 0x36, "PENDING" },
6556 { 0xBF, "PRESENCE_ACCESS" },
6557 { 0x1B, "Private" },
6558 { 0x1C, "PrivateMessaging" },
6559 { 0x1D, "PrivilegeLevel" },
6565 { 0x20, "Request" },
6566 { 0x21, "Response" },
6567 { 0x22, "Restricted" },
6568 { 0x38, "RequireInvitation" },
6569 { 0x23, "ScreenName" },
6570 { 0x24, "Searchable" },
6573 { 0xAE, "SERVERLOGIC" },
6580 { 0x28, "text/plain" },
6581 { 0x29, "text/x-vCalendar" },
6582 { 0x2A, "text/x-vCard" },
6588 { 0x7F, "Underline" },
6590 { 0x33, "Validity" },
6592 { 0x78, "www.openmobilealliance.org" },
6593 { 0x30, "www.wireless-village.org" },
6596 * Access value tokens
6598 { 0x3D, "GROUP_ID" },
6599 { 0x3E, "GROUP_NAME" },
6600 { 0x3F, "GROUP_TOPIC" },
6601 { 0x40, "GROUP_USER_ID_JOINED" },
6602 { 0x41, "GROUP_USER_ID_OWNER" },
6607 { 0x46, "USER_ALIAS" },
6608 { 0x47, "USER_EMAIL_ADDRESS" },
6609 { 0x48, "USER_FIRST_NAME" },
6610 { 0x49, "USER_ID" },
6611 { 0x4A, "USER_LAST_NAME" },
6612 { 0x4B, "USER_MOBILE_NUMBER" },
6613 { 0x4C, "USER_ONLINE_STATUS" },
6617 { 0x50, "GROUP_USER_ID_AUTOJOIN" },
6619 * Presence value tokens
6622 { 0x5C, "ANXIOUS" },
6623 { 0x5D, "ASHAMED" },
6624 { 0x5F, "AVAILABLE" },
6628 { 0x63, "COMPUTER" },
6629 { 0x64, "DISCREET" },
6631 { 0x66, "EXCITED" },
6633 { 0x6B, "IN_LOVE" },
6634 { 0x6C, "INVINCIBLE" },
6635 { 0x6D, "JEALOUS" },
6637 { 0x6F, "MOBILE_PHONE" },
6638 { 0x70, "NOT_AVAILABLE" },
6645 * Access value tokens - continued
6647 { 0x93, "USER_CITY" },
6648 { 0x94, "USER_COUNTRY" },
6649 { 0x95, "USER_FRIENDLY_NAME" },
6650 { 0x96, "USER_GENDER" },
6651 { 0x97, "USER_INTENTION" },
6652 { 0x98, "USER_INTERESTS_HOBBIES" },
6653 { 0x99, "USER_MARITAL_STATUS" },
6654 { 0x9A, "PRIORITYREJECT" },
6655 { 0x9B, "PRIORITYSTORE" },
6657 { 0x9D, "SENDREJECT" },
6658 { 0x9E, "SENDSTORE" },
6662 { 0xB0, "PP_CITY" },
6663 { 0xB1, "PP_COUNTRY" },
6664 { 0xB2, "PP_FRIENDLY_NAME" },
6665 { 0xB3, "PP_FREE_TEXT" },
6666 { 0xB4, "PP_GENDER" },
6667 { 0xB5, "PP_INTENTION" },
6668 { 0xB6, "PP_INTERESTS" },
6669 { 0xB7, "PP_MARITAL_STATUS" },
6670 { 0xB8, "USER_AGE_MAX" },
6671 { 0xB9, "USER_AGE_MIN" },
6676 /***** Token code page aggregation *****/
6678 ext_t_0_wv_cspc_13(tvbuff_t
*tvb _U_
, uint32_t value
, uint32_t str_tbl _U_
)
6680 char *str
= wmem_strdup_printf(wmem_packet_scope(), "Common Value: '%s'",
6681 val_to_str(value
, vals_wv_csp_13_element_value_tokens
,
6682 "<Unknown WV-CSP 1.3 Common Value token 0x%X>"));
6686 #define wbxml_wv_csp_13_global wbxml_wv_csp_12_global /*TODO*/
6688 static const value_valuestring wbxml_wv_csp_13_tags
[] = {
6689 { 0, wbxml_wv_csp_13_tags_cp0
},
6690 { 1, wbxml_wv_csp_13_tags_cp1
},
6691 { 2, wbxml_wv_csp_13_tags_cp2
},
6692 { 3, wbxml_wv_csp_13_tags_cp3
},
6693 { 4, wbxml_wv_csp_13_tags_cp4
},
6694 { 5, wbxml_wv_csp_13_tags_cp5
},
6695 { 6, wbxml_wv_csp_13_tags_cp6
},
6696 { 7, wbxml_wv_csp_13_tags_cp7
},
6697 { 8, wbxml_wv_csp_13_tags_cp8
},
6698 { 9, wbxml_wv_csp_13_tags_cp9
},
6699 { 10, wbxml_wv_csp_13_tags_cp10
},
6700 { 11, wbxml_wv_csp_13_tags_cp11
},
6704 static const value_valuestring wbxml_wv_csp_13_attrStart
[] = {
6705 { 0, wbxml_wv_csp_13_attrStart_cp0
},
6709 static const wbxml_decoding decode_wv_cspc_13
= {
6710 "Wireless-Village Client-Server Protocol 1.3",
6712 { ext_t_0_wv_cspc_13
, NULL
, NULL
},
6713 wv_csp13_opaque_binary_tag
,
6714 wv_csp13_opaque_literal_tag
,
6715 default_opaque_binary_attr
,
6716 default_opaque_literal_attr
,
6717 wbxml_wv_csp_13_global
,
6718 wbxml_wv_csp_13_tags
,
6719 wbxml_wv_csp_13_attrStart
,
6727 /****************************** Discriminators ******************************/
6728 /* Discriminator for WV-CSP; allows version detection based on parsing parts
6729 * of the start of the WBXML body.
6731 static const wbxml_decoding
*
6732 wv_csp_discriminator(tvbuff_t
*tvb
, uint32_t offset
)
6734 uint32_t magic_1
= tvb_get_ntohl(tvb
, offset
+ 0);
6735 uint16_t magic_2
= tvb_get_ntohs(tvb
, offset
+ 4);
6737 if (magic_1
== 0xFE050331 && magic_2
== 0x2e30)
6739 /* FE 05 03 31 2E 30 --> WV-CSP 1.0 */
6740 return &decode_wv_cspc_10
;
6742 else if (magic_1
== 0xC9050331 && magic_2
== 0x2e31)
6744 /* C9 05 03 31 2E 31 --> WV-CSP 1.1 */
6745 return &decode_wv_cspc_11
;
6747 else if (magic_1
== 0xC9080331 && magic_2
== 0x2e32)
6749 /* C9 08 03 31 2E 32 --> WV-CSP 1.2 */
6750 return &decode_wv_cspc_12
;
6752 else if ( magic_1
== 0xC90B0331 && magic_2
== 0x2E33)
6754 /* C9 0B 03 31 2E 33 --> WV-CSP 1.3 */
6755 return &decode_wv_cspc_13
;
6759 /* Default: WV-CSP 1.2 */
6760 return &decode_wv_cspc_12
;
6763 /********************** WBXML token mapping aggregation **********************/
6765 static const wbxml_decoding
*get_wbxml_decoding_from_public_id (uint32_t publicid
);
6766 static const wbxml_decoding
*get_wbxml_decoding_from_content_type (
6767 const char *content_type
, tvbuff_t
*tvb
, uint32_t offset
);
6771 ** Aggregation of content type and aggregated code pages
6772 ** Content type map lookup will stop at the 1st entry with 3rd member = false
6776 * The following map contains entries registered with a registered WBXML
6777 * public ID. See WAP WINA or OMA OMNA for registered values:
6778 * http://www.openmobilealliance.org/tech/omna/ */
6779 static const wbxml_integer_list well_known_public_id_list
[] = {
6780 /* 0x00 - Unknown or missing Public ID */
6781 /* 0x01 - LITERAL PublicID - see String Table */
6782 { 0x02, &decode_wmlc_10
}, /* WML 1.0 */
6783 /* 0x03 - WTA 1.0 */
6784 { 0x04, &decode_wmlc_11
}, /* WML 1.1 */
6785 { 0x05, &decode_sic_10
}, /* SI 1.0 */
6786 { 0x06, &decode_slc_10
}, /* SL 1.0 */
6787 { 0x07, &decode_coc_10
}, /* CO 1.0 */
6788 { 0x08, &decode_channelc_10
}, /* CHANNEL 1.0 */
6789 { 0x09, &decode_wmlc_12
}, /* WML 1.2 */
6790 { 0x0A, &decode_wmlc_13
}, /* WML 1.3 */
6791 { 0x0B, &decode_provc_10
}, /* PROV 1.0 */
6792 /* 0x0C - WTA-WML 1.2 */
6793 { 0x0D, &decode_emnc_10
}, /* EMN 1.0 */
6794 /* 0x0E - DRMREL 1.0 */
6795 { 0x0F, &decode_wv_cspc_10
}, /* WV-CSP 1.0 */
6796 { 0x10, &decode_wv_cspc_11
}, /* WV-CSP 1.1 */
6797 /*See http://www.openmobilealliance.org/tech/omna/omna-wbxml-public-docid.htm */
6798 { 0x11, &decode_wv_cspc_12
}, /* OMA IMPS - CSP protocol DTD v1.2 */
6799 { 0x12, &decode_wv_cspc_13
}, /* OMA IMPS - CSP protocol DTD v1.3 */
6800 { 0x020B, &decode_nokiaprovc_70
},/* Nokia OTA Provisioning 7.0 */
6801 { 0x0FD1, &decode_syncmlc_10
}, /* SyncML 1.0 */
6802 { 0x0FD3, &decode_syncmlc_11
}, /* SyncML 1.1 */
6803 /* Note: I assumed WML+ 1.x would be not that different from WML 1.x,
6804 * the real mapping should come from Phone.com (OpenWave)! */
6805 { 0x1108, &decode_wmlc_11
}, /* Phone.com WMLC+ 1.1 - not 100% correct */
6806 { 0x110D, &decode_wmlc_13
}, /* Phone.com WMLC+ 1.3 - not 100% correct */
6808 { 0x1201, &decode_syncmlc_12
}, /* SyncML 1.2 */
6813 /* The following map contains entries only registered with a literal media
6815 static const wbxml_literal_list content_type_list
[] = {
6816 { "application/x-wap-prov.browser-settings",
6818 &decode_nokiaprovc_70
6820 { "application/x-wap-prov.browser-bookmarks",
6822 &decode_nokiaprovc_70
6824 { "application/vnd.wv.csp.wbxml",
6825 wv_csp_discriminator
,
6828 { "application/vnd.ms-sync.wbxml",
6832 { "application/vnd.ms-sync",
6836 { NULL
, NULL
, NULL
}
6840 /* Returns a pointer to the WBXML token map for the given WBXML public
6841 * identifier value (see WINA for a table with defined identifiers). */
6842 static const wbxml_decoding
*get_wbxml_decoding_from_public_id (uint32_t public_id
)
6844 const wbxml_decoding
*map
= NULL
;
6846 DebugLog(("get_wbxml_decoding_from_public_id: public_id = %u\n",
6848 if (public_id
>= 2) {
6849 const wbxml_integer_list
*item
= well_known_public_id_list
;
6851 while (item
&& item
->public_id
&& item
->map
) {
6852 if (item
->public_id
== public_id
) {
6862 static const wbxml_decoding
*get_wbxml_decoding_from_content_type (
6863 const char *content_type
, tvbuff_t
*tvb
, uint32_t offset
)
6865 const wbxml_decoding
*map
= NULL
;
6867 DebugLog(("get_wbxml_decoding_from_content_type: content_type = [%s]\n",
6869 if (content_type
&& content_type
[0]) {
6870 const wbxml_literal_list
*item
= content_type_list
;
6872 while (item
&& item
->content_type
) {
6873 if (g_ascii_strcasecmp(content_type
, item
->content_type
) == 0) {
6874 /* Try the discriminator */
6875 if (item
->discriminator
!= NULL
) {
6876 map
= item
->discriminator(tvb
, offset
);
6890 /* WBXML content token mapping depends on the following parameters:
6891 * - Content type (uint32_t)
6892 * - Token type (global, tags, attrStart, attrValue)
6893 * - Code page for tag and attribute
6895 * This results in the following steps:
6896 * 1. Retrieve content type mapping
6897 * 2. If exists, retrieve token type mapping
6898 * 3. If exists, retrieve required code page
6899 * 4. If exists, retrieve token mapping
6902 #define wbxml_UNDEFINED_TOKEN \
6903 "(Requested token not defined for this content type)"
6904 #define wbxml_UNDEFINED_TOKEN_CODE_PAGE \
6905 "(Requested token code page not defined for this content type)"
6906 #define wbxml_UNDEFINED_TOKEN_MAP \
6907 "(Requested token map not defined for this content type)"
6908 /* Return token mapping for a given content mapping entry. */
6910 map_token (const value_valuestring
*token_map
, uint8_t codepage
, uint8_t token
) {
6911 const value_string
*vs
;
6914 if (token_map
) { /* Found map */
6915 if ((vs
= val_to_valstr (codepage
, token_map
))) {
6916 /* Found codepage map */
6917 s
= try_val_to_str (token
, vs
);
6918 if (s
) { /* Found valid token */
6919 DebugLog(("map_token(codepage = %u, token = %u: [%s]\n", codepage
, token
, s
));
6922 /* No valid token mapping in specified code page of token map */
6923 DebugLog(("map_token(codepage = %u, token = %u: "
6924 wbxml_UNDEFINED_TOKEN
"\n", codepage
, token
));
6925 return wbxml_UNDEFINED_TOKEN
;
6927 /* There is no token map entry for the requested code page */
6928 DebugLog(("map_token(codepage = %u, token = %u: "
6929 wbxml_UNDEFINED_TOKEN_CODE_PAGE
"\n", codepage
, token
));
6930 return wbxml_UNDEFINED_TOKEN_CODE_PAGE
;
6932 /* The token map does not exist */
6933 DebugLog(("map_token(codepage = %u, token = %u: "
6934 wbxml_UNDEFINED_TOKEN_MAP
"\n", codepage
, token
));
6935 return wbxml_UNDEFINED_TOKEN_MAP
;
6940 /* Parse and display the WBXML string table. */
6942 show_wbxml_string_table (proto_tree
*tree
, tvbuff_t
*tvb
, uint32_t str_tbl
,
6943 uint32_t str_tbl_len
, unsigned charset
)
6945 unsigned encoding
= mibenum_charset_to_encoding(charset
);
6946 uint32_t off
= str_tbl
;
6947 uint32_t end
= str_tbl
+ str_tbl_len
;
6948 proto_tree
*item_tree
;
6955 * XXX - use the string encoding.
6957 item_tree
= proto_tree_add_subtree_format (tree
, tvb
, off
, 0,
6958 ett_wbxml_string_table_item
,
6962 proto_tree_add_uint (item_tree
,
6963 hf_wbxml_string_table_item_offset
,
6964 tvb
, 0, 0, off
- str_tbl
);
6965 proto_tree_add_item_ret_string_and_length (item_tree
,
6966 hf_wbxml_string_table_item_string
,
6967 tvb
, off
, -1, encoding
, wmem_packet_scope(), &str
, &len
);
6968 proto_item_append_text(ti
, " '%s'", format_text(wmem_packet_scope(), str
, strlen(str
)));
6969 proto_item_set_len(ti
, len
);
6975 /* Indentation code is based on a static const array of space characters.
6976 * At least one single space is returned */
6977 static const char indent_buffer
[514] = " "
6986 ; /* Generate XML indentation (length = 1 + 2 * 256 + 1 for '\0') */
6988 static const char * Indent (uint8_t level
) {
6989 return indent_buffer
+ (512 - 2 * (level
));
6993 /********************
6994 * WBXML tag tokens *
6995 ********************
6997 * Bit Mask : Example
6998 * -------------------
6999 * 00.. .... : <tag />
7006 * atrtribute1="value1"
7007 * atrtribute2="value2"
7011 * atrtribute1="value1"
7012 * atrtribute2="value2"
7018 * - An XML PI is parsed as an attribute list (same syntax).
7019 * - A code page switch only applies to the single token that follows.
7022 /**************************
7023 * WBXML Attribute tokens *
7024 **************************
7025 * Bit Mask : Example
7026 * -------------------
7027 * 0... .... : attr= (attribute name)
7028 * href='http://' (attribute name with start of attribute value)
7029 * 1... .... : 'www.' (attribute value, or part of it)
7034 /* This function parses the WBXML and maps known token interpretations
7035 * to the WBXML tokens. As a result, the original XML document can be
7036 * recreated. Indentation is generated in order to ease reading.
7038 * This function performs attribute list parsing.
7040 * The wbxml_decoding entry *map contains the actual token mapping.
7042 * NOTE: See above for known token mappings.
7045 parse_wbxml_attribute_list_defined (proto_tree
*tree
, tvbuff_t
*tvb
, packet_info
*pinfo
,
7046 uint32_t offset
, uint32_t str_tbl
, uint8_t *codepage_attr
,
7047 const wbxml_decoding
*map
)
7049 uint32_t tvb_len
= tvb_reported_length (tvb
);
7050 uint32_t off
= offset
;
7056 uint8_t attr_save_known
= 0; /* Will contain peek & 0x3F (attr identity) */
7057 const char *attr_save_literal
= NULL
; /* Will contain the LITERAL attr identity */
7059 unsigned recursion_level
= p_get_proto_depth(pinfo
, proto_wbxml
);
7060 unsigned encoding
= GPOINTER_TO_UINT(p_get_proto_data(pinfo
->pool
, pinfo
, proto_wbxml
, 0));
7062 DebugLog(("parse_wbxml_attr_defined (level = %u, offset = %u)\n", recursion_level
, offset
));
7063 /* Parse attributes */
7064 while (off
< tvb_len
) {
7065 peek
= tvb_get_uint8 (tvb
, off
);
7066 DebugLog(("ATTR: (top of while) level = %3u, peek = 0x%02X, "
7067 "off = %u, tvb_len = %u\n", recursion_level
, peek
, off
, tvb_len
));
7068 if ((peek
& 0x3F) < 5) switch (peek
) { /* Global tokens
7070 case 0x00: /* SWITCH_PAGE */
7071 *codepage_attr
= tvb_get_uint8 (tvb
, off
+1);
7072 proto_tree_add_uint_format(tree
, hf_wbxml_switch_page
, tvb
, off
, 2, *codepage_attr
,
7073 " | Attr | A -->%3d | SWITCH_PAGE (Attr code page) |",
7077 case 0x01: /* END */
7079 * The Attribute END token means either ">" or "/>"
7080 * and as a consequence both must be treated separately.
7081 * This is done in the TAG state parser.
7084 DebugLog(("ATTR: level = %u, Return: len = %u\n",
7085 recursion_level
, off
- offset
));
7086 return (off
- offset
);
7087 case 0x02: /* ENTITY */
7088 ent
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7089 if (len
<= tvb_len
) {
7090 proto_tree_add_uint_format(tree
, hf_wbxml_entity
, tvb
, off
, 1+len
, ent
,
7091 " %3d | Attr | A %3d | ENTITY | %s'&#%u;'",
7092 recursion_level
, *codepage_attr
, Indent (recursion_level
), ent
);
7095 /* Stop processing as it is impossible to parse now */
7099 case 0x03: /* STR_I */
7100 str
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, off
+1, &len
, encoding
);
7101 proto_tree_add_string_format(tree
, hf_wbxml_str_i
, tvb
, off
, 1+len
, str
,
7102 " %3d | Attr | A %3d | STR_I (Inline string) | %s\'%s\'",
7103 recursion_level
, *codepage_attr
, Indent (recursion_level
), str
);
7106 case 0x04: /* LITERAL */
7107 /* ALWAYS means the start of a new attribute,
7108 * and may only contain the NAME of the attribute.
7110 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7111 if (len
<= tvb_len
) {
7112 attr_save_known
= 0;
7113 attr_save_literal
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, str_tbl
+idx
, &str_len
, encoding
);
7114 proto_tree_add_string_format(tree
, hf_wbxml_literal
, tvb
, off
, 1+len
, attr_save_literal
,
7115 " %3d | Attr | A %3d | LITERAL (Literal Attribute) | %s<%s />",
7116 recursion_level
, *codepage_attr
, Indent (recursion_level
), attr_save_literal
);
7119 /* Stop processing as it is impossible to parse now */
7123 case 0x40: /* EXT_I_0 */
7124 case 0x41: /* EXT_I_1 */
7125 case 0x42: /* EXT_I_2 */
7126 /* Extension tokens */
7127 str
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, off
+1, &len
, encoding
);
7128 proto_tree_add_string_format(tree
, hf_wbxml_ext_i
, tvb
, off
, 1+len
, str
,
7129 " %3d | Attr | A %3d | EXT_I_%1x (Extension Token) | %s(%s: \'%s\')",
7130 recursion_level
, *codepage_attr
, peek
& 0x0f, Indent (recursion_level
),
7131 ((map
!= NULL
) ? map_token (map
->global
, 0, peek
) : "Inline string extension"), str
);
7134 /* 0x43 impossible in ATTR state */
7135 /* 0x44 impossible in ATTR state */
7136 case 0x80: /* EXT_T_0 */
7137 case 0x81: /* EXT_T_1 */
7138 case 0x82: /* EXT_T_2 */
7139 /* Extension tokens */
7140 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7145 if (map
->ext_t
[peek
& 0x03])
7146 s
= (map
->ext_t
[peek
& 0x03])(tvb
, idx
, str_tbl
);
7148 s
= wmem_strdup_printf(pinfo
->pool
, "EXT_T_%1x (%s)", peek
& 0x03,
7149 map_token (map
->global
, 0, peek
));
7151 s
= wmem_strdup_printf(pinfo
->pool
, "Extension Token, integer value: (%u", idx
);
7153 proto_tree_add_string_format(tree
, hf_wbxml_ext_t
, tvb
, off
, 1+len
, s
,
7154 " %3d | Tag | T %3d | EXT_T_%1x (Extension Token) | %s%s)",
7155 recursion_level
, *codepage_attr
, peek
& 0x0f, Indent (recursion_level
),
7158 if (len
<= tvb_len
) {
7161 /* Stop processing as it is impossible to parse now */
7165 case 0x83: /* STR_T */
7166 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7167 if (len
<= tvb_len
) {
7168 str
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, str_tbl
+idx
, &str_len
, encoding
);
7169 proto_tree_add_string_format(tree
, hf_wbxml_str_t
, tvb
, off
, 1+len
, str
,
7170 " %3d | Attr | A %3d | STR_T (Tableref string) | %s\'%s\'",
7171 recursion_level
, *codepage_attr
, Indent (recursion_level
), str
);
7174 /* Stop processing as it is impossible to parse now */
7178 /* 0x84 impossible in ATTR state */
7179 case 0xC0: /* EXT_0 */
7180 case 0xC1: /* EXT_1 */
7181 case 0xC2: /* EXT_2 */
7182 /* Extension tokens */
7183 str
= (map
!= NULL
) ? map_token (map
->global
, 0, peek
) : "Single-byte extension";
7184 proto_tree_add_string_format(tree
, hf_wbxml_extension_token
, tvb
, off
, 1, str
,
7185 " %3d | Attr | A %3d | EXT_%1x (Extension Token) | %s(%s)",
7186 recursion_level
, *codepage_attr
, peek
& 0x0f, Indent (recursion_level
), str
);
7189 case 0xC3: /* OPAQUE - WBXML 1.1 and newer */
7190 if (tvb_get_uint8 (tvb
, 0)) { /* WBXML 1.x (x > 0) */
7193 if (attr_save_known
) { /* Knwon attribute */
7194 if (map
->opaque_binary_attr
) {
7195 tmp_str
= map
->opaque_binary_attr(tvb
, off
+ 1,
7196 attr_save_known
, *codepage_attr
, &len
, pinfo
);
7198 tmp_str
= default_opaque_binary_attr(tvb
, off
+ 1,
7199 attr_save_known
, *codepage_attr
, &len
, pinfo
);
7201 } else { /* lITERAL attribute */
7202 if (map
->opaque_literal_tag
) {
7203 tmp_str
= map
->opaque_literal_attr(tvb
, off
+ 1,
7204 attr_save_literal
, *codepage_attr
, &len
, pinfo
);
7206 tmp_str
= default_opaque_literal_attr(tvb
, off
+ 1,
7207 attr_save_literal
, *codepage_attr
, &len
, pinfo
);
7211 if (len
<= tvb_len
) {
7212 proto_tree_add_bytes_format(tree
, hf_wbxml_opaque_data
, tvb
, off
, 1 + len
, NULL
,
7213 " %3d | Attr | A %3d | OPAQUE (Opaque data) | %s%s",
7214 recursion_level
, *codepage_attr
, Indent (recursion_level
), tmp_str
);
7217 /* Stop processing as it is impossible to parse now */
7221 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7222 if ((len
<= tvb_len
) && (idx
< tvb_len
)) {
7223 proto_tree_add_bytes_format(tree
, hf_wbxml_opaque_data
, tvb
, off
, 1 + len
+ idx
, NULL
,
7224 " %3d | Attr | A %3d | OPAQUE (Opaque data) | %s(%u bytes of opaque data)",
7225 recursion_level
, *codepage_attr
, Indent (recursion_level
), idx
);
7228 /* Stop processing as it is impossible to parse now */
7232 } else { /* WBXML 1.0 - RESERVED_2 token (invalid) */
7233 proto_tree_add_none_format(tree
, hf_wbxml_reserved_2
, tvb
, off
, 1,
7234 " %3d | Attr | A %3d | RESERVED_2 (Invalid Token!) | WBXML 1.0 parsing stops here.",
7235 recursion_level
, *codepage_attr
);
7236 /* Stop processing as it is impossible to parse now */
7238 DebugLog(("ATTR: level = %u, Return: len = %u\n",
7239 recursion_level
, off
- offset
));
7240 return (off
- offset
);
7243 /* 0xC4 impossible in ATTR state */
7245 proto_tree_add_none_format(tree
, hf_wbxml_invalid_token
, tvb
, off
, 1,
7246 " %3d | Attr | A %3d | %-10s (Invalid Token!) | WBXML parsing stops here.",
7247 recursion_level
, *codepage_attr
, val_to_str_ext (peek
, &vals_wbxml1x_global_tokens_ext
, "(unknown 0x%x)"));
7248 /* Move to end of buffer */
7251 } else { /* Known attribute token */
7253 if (peek
& 0x80) { /* attrValue */
7255 s
= map_token (map
->attrValue
, *codepage_attr
, peek
);
7257 s
= wmem_strdup_printf(wmem_packet_scope(), "attrValue_0x%02X", peek
);
7259 proto_tree_add_string_format(tree
, hf_wbxml_known_attrvalue
, tvb
, off
, 1, s
,
7260 " %3d | Attr | A %3d | Known attrValue 0x%02X | %s%s",
7261 recursion_level
, *codepage_attr
, peek
& 0x7f, Indent (recursion_level
),
7264 } else { /* attrStart */
7265 attr_save_known
= peek
& 0x7f;
7267 s
= map_token (map
->attrStart
, *codepage_attr
, peek
);
7269 s
= wmem_strdup_printf(wmem_packet_scope(), "attrStart_0x%02X", peek
);
7271 proto_tree_add_string_format(tree
, hf_wbxml_known_attrstart
, tvb
, off
, 1, s
,
7272 " %3d | Attr | A %3d | Known attrStart 0x%02X | %s%s",
7273 recursion_level
, *codepage_attr
, attr_save_known
, Indent (recursion_level
),
7279 DebugLog(("ATTR: level = %u, Return: len = %u (end of function body)\n",
7280 recursion_level
, off
- offset
));
7281 return (off
- offset
);
7285 /* This function parses the WBXML and maps known token interpretations
7286 * to the WBXML tokens. As a result, the original XML document can be
7287 * recreated. Indentation is generated in order to ease reading.
7289 * Attribute parsing is done in parse_wbxml_attribute_list_defined().
7291 * The wbxml_decoding entry *map contains the actual token mapping.
7293 * NOTE: In order to parse the content, some recursion is required.
7294 * However, for performance reasons, recursion has been avoided
7295 * where possible (tags without content within tags with content).
7296 * This is achieved by means of the parsing_tag_content and tag_save*
7299 * NOTE: See above for known token mappings.
7301 * NOTE: As tags can be opened and closed, a tag representation lookup
7302 * may happen once or twice for a given tag. For efficiency reasons,
7303 * the literal tag value is stored and used throughout the code.
7304 * With the introduction of code page support, this solution is robust
7305 * as the lookup only occurs once, removing the need for storage of
7306 * the used code page.
7308 #define WBXML_MAX_RECURSION_LEVEL 255
7310 // NOLINTNEXTLINE(misc-no-recursion)
7311 parse_wbxml_tag_defined (proto_tree
*tree
, tvbuff_t
*tvb
, packet_info
*pinfo
, uint32_t offset
,
7312 uint32_t str_tbl
, uint8_t *codepage_stag
, uint8_t *codepage_attr
,
7313 const wbxml_decoding
*map
)
7315 uint32_t tvb_len
= tvb_reported_length (tvb
);
7316 uint32_t off
= offset
;
7322 uint32_t tag_len
; /* Length of the index (uintvar) from a LITERAL tag */
7323 uint8_t tag_save_known
= 0; /* Will contain peek & 0x3F (tag identity) */
7324 uint8_t tag_new_known
= 0; /* Will contain peek & 0x3F (tag identity) */
7325 const char *tag_save_literal
= NULL
; /* Will contain the LITERAL tag identity */
7326 const char *tag_new_literal
; /* Will contain the LITERAL tag identity */
7328 uint8_t parsing_tag_content
= false; /* Are we parsing content from a
7329 tag with content: <x>Content</x>
7331 The initial state is false.
7332 This state will trigger recursion. */
7334 unsigned recursion_level
= p_get_proto_depth(pinfo
, proto_wbxml
);
7335 unsigned encoding
= GPOINTER_TO_UINT(p_get_proto_data(pinfo
->pool
, pinfo
, proto_wbxml
, 0));
7336 if (recursion_level
>= WBXML_MAX_RECURSION_LEVEL
) {
7337 proto_tree_add_expert(tree
, pinfo
, &ei_wbxml_too_much_recursion
, tvb
, offset
, tvb_captured_length_remaining(tvb
, offset
));
7340 DebugLog(("parse_wbxml_tag_defined (level = %u, offset = %u)\n", recursion_level
, offset
));
7341 while (off
< tvb_len
) {
7342 peek
= tvb_get_uint8 (tvb
, off
);
7343 DebugLog(("STAG: (top of while) level = %3u, peek = 0x%02X, off = %u, tvb_len = %u\n", recursion_level
, peek
, off
, tvb_len
));
7344 if ((peek
& 0x3F) < 4) switch (peek
) { /* Global tokens in state = STAG
7345 but not the LITERAL tokens */
7346 case 0x00: /* SWITCH_PAGE */
7347 *codepage_stag
= tvb_get_uint8 (tvb
, off
+1);
7348 proto_tree_add_uint_format(tree
, hf_wbxml_switch_page
, tvb
, off
, 2, *codepage_stag
,
7349 " | Tag | T -->%3d | SWITCH_PAGE (Tag code page) |",
7353 case 0x01: /* END: only possible for Tag with Content */
7354 if (tag_save_known
) { /* Known TAG */
7355 proto_tree_add_string_format(tree
, hf_wbxml_end_known_tag
, tvb
, off
, 1, tag_save_literal
,
7356 " %3d | Tag | T %3d | END (Known Tag 0x%02X) | %s</%s>",
7357 recursion_level
, *codepage_stag
,
7358 tag_save_known
, Indent (recursion_level
),
7359 tag_save_literal
); /* We already looked it up! */
7360 } else { /* Literal TAG */
7361 proto_tree_add_string_format(tree
, hf_wbxml_end_literal_tag
, tvb
, off
, 1, tag_save_literal
? tag_save_literal
: "",
7362 " %3d | Tag | T %3d | END (Literal Tag) | %s</%s>",
7363 recursion_level
, *codepage_stag
, Indent (recursion_level
), tag_save_literal
? tag_save_literal
: "");
7366 p_set_proto_depth(pinfo
, proto_wbxml
, recursion_level
);
7368 /* Reset code page: not needed as return from recursion */
7369 DebugLog(("STAG: level = %u, Return: len = %u\n", recursion_level
, off
- offset
));
7370 return (off
- offset
);
7371 case 0x02: /* ENTITY */
7372 ent
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7373 proto_tree_add_uint_format(tree
, hf_wbxml_entity
, tvb
, off
, 1+len
, ent
,
7374 " %3d | Tag | T %3d | ENTITY | %s'&#%u;'",
7375 recursion_level
, *codepage_stag
, Indent (recursion_level
), ent
);
7378 case 0x03: /* STR_I */
7379 str
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, off
+1, &len
, encoding
);
7380 proto_tree_add_string_format(tree
, hf_wbxml_str_i
, tvb
, off
, 1+len
, str
,
7381 " %3d | Tag | T %3d | STR_I (Inline string) | %s\'%s\'",
7382 recursion_level
, *codepage_stag
, Indent(recursion_level
),
7386 case 0x40: /* EXT_I_0 */
7387 case 0x41: /* EXT_I_1 */
7388 case 0x42: /* EXT_I_2 */
7389 /* Extension tokens */
7390 str
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, off
+1, &len
, encoding
);
7391 proto_tree_add_string_format(tree
, hf_wbxml_ext_i
, tvb
, off
, 1+len
, str
,
7392 " %3d | Tag | T %3d | EXT_I_%1x (Extension Token) | %s(%s: \'%s\')",
7393 recursion_level
, *codepage_stag
,
7394 peek
& 0x0f, Indent (recursion_level
),
7395 ((map
!= NULL
) ? map_token (map
->global
, 0, peek
) : "Inline string extension"),
7400 proto_tree_add_none_format(tree
, hf_wbxml_pi_xml
, tvb
, off
, 1,
7401 " %3d | Tag | T %3d | PI (XML Processing Instruction) | %s<?xml",
7402 recursion_level
, *codepage_stag
, Indent (recursion_level
));
7403 len
= parse_wbxml_attribute_list_defined (tree
, tvb
, pinfo
, off
,
7404 str_tbl
, codepage_attr
, map
);
7405 /* Check that there is still room in packet */
7407 if (off
>= tvb_len
) {
7408 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n",
7409 recursion_level
, off
- offset
));
7412 proto_tree_add_none_format(tree
, hf_wbxml_end_pi
, tvb
, off
-1, 1,
7413 " %3d | Tag | T %3d | END (PI) | %s?>",
7414 recursion_level
, *codepage_stag
, Indent (recursion_level
));
7416 case 0x80: /* EXT_T_0 */
7417 case 0x81: /* EXT_T_1 */
7418 case 0x82: /* EXT_T_2 */
7419 /* Extension tokens */
7420 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7425 if (map
->ext_t
[peek
& 0x03])
7426 s
= (map
->ext_t
[peek
& 0x03])(tvb
, idx
, str_tbl
);
7428 s
= wmem_strdup_printf(pinfo
->pool
, "EXT_T_%1x (%s)", peek
& 0x03,
7429 map_token (map
->global
, 0, peek
));
7433 s
= wmem_strdup_printf(pinfo
->pool
, "(Extension Token, integer value: %u)", idx
);
7435 proto_tree_add_string_format(tree
, hf_wbxml_ext_t
, tvb
, off
, 1+len
, s
,
7436 " %3d | Tag | T %3d | EXT_T_%1x (Extension Token) | %s%s",
7437 recursion_level
, *codepage_stag
, peek
& 0x0f, Indent (recursion_level
), s
);
7441 case 0x83: /* STR_T */
7442 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7443 str
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, str_tbl
+idx
, &str_len
, encoding
);
7444 proto_tree_add_string_format(tree
, hf_wbxml_str_t
, tvb
, off
, 1+len
, str
,
7445 " %3d | Tag | T %3d | STR_T (Tableref string) | %s\'%s\'",
7446 recursion_level
, *codepage_stag
, Indent (recursion_level
), str
);
7449 case 0xC0: /* EXT_0 */
7450 case 0xC1: /* EXT_1 */
7451 case 0xC2: /* EXT_2 */
7452 /* Extension tokens */
7453 str
= (map
!= NULL
) ? map_token (map
->global
, 0, peek
) : "Single-byte extension";
7454 proto_tree_add_string_format(tree
, hf_wbxml_extension_token
, tvb
, off
, 1, str
,
7455 " %3d | Tag | T %3d | EXT_%1x (Extension Token) | %s(%s)",
7456 recursion_level
, *codepage_stag
, peek
& 0x0f, Indent (recursion_level
), str
);
7459 case 0xC3: /* OPAQUE - WBXML 1.1 and newer */
7460 if (tvb_get_uint8 (tvb
, 0)) { /* WBXML 1.x (x > 0) */
7464 if (tag_save_known
) { /* Known tag */
7465 if (map
->opaque_binary_tag
) {
7466 tmp_str
= map
->opaque_binary_tag(tvb
, off
+ 1,
7467 tag_save_known
, *codepage_stag
, &len
, pinfo
);
7469 tmp_str
= default_opaque_binary_tag(tvb
, off
+ 1,
7470 tag_save_known
, *codepage_stag
, &len
, pinfo
);
7472 } else { /* lITERAL tag */
7473 if (map
->opaque_literal_tag
) {
7474 tmp_str
= map
->opaque_literal_tag(tvb
, off
+ 1,
7475 tag_save_literal
, *codepage_stag
, &len
, pinfo
);
7477 tmp_str
= default_opaque_literal_tag(tvb
, off
+ 1,
7478 tag_save_literal
, *codepage_stag
, &len
, pinfo
);
7481 proto_tree_add_bytes_format(tree
, hf_wbxml_opaque_data
, tvb
, off
, 1 + len
, NULL
,
7482 " %3d | Tag | T %3d | OPAQUE (Opaque data) | %s%s",
7483 recursion_level
, *codepage_stag
, Indent (recursion_level
), tmp_str
);
7486 idx
= tvb_get_uintvar (tvb
, off
+1, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7487 if ((len
<= tvb_len
) && (idx
< tvb_len
))
7489 proto_tree_add_bytes_format(tree
, hf_wbxml_opaque_data
, tvb
, off
, 1 + len
+ idx
, NULL
,
7490 " %3d | Tag | T %3d | OPAQUE (Opaque data) | %s(%u bytes of opaque data)",
7491 recursion_level
, *codepage_stag
, Indent (recursion_level
), idx
);
7494 /* Stop processing as it is impossible to parse now */
7498 } else { /* WBXML 1.0 - RESERVED_2 token (invalid) */
7499 proto_tree_add_none_format(tree
, hf_wbxml_reserved_2
, tvb
, off
, 1,
7500 " %3d | Tag | T %3d | RESERVED_2 (Invalid Token!) | WBXML 1.0 parsing stops here.",
7501 recursion_level
, *codepage_stag
);
7502 /* Stop processing as it is impossible to parse now */
7504 DebugLog(("STAG: level = %u, Return: len = %u\n", recursion_level
, off
- offset
));
7505 return (off
- offset
);
7509 /* No default clause, as all cases have been treated */
7510 } else { /* LITERAL or Known TAG */
7511 /* We must store the initial tag, and also retrieve the new tag.
7512 * For efficiency reasons, we store the literal tag representation
7513 * for known tags too, so we can easily close the tag without the
7514 * need of a new lookup and avoiding storage of token codepage.
7516 * There are 4 possibilities:
7518 * 1. Known tag followed by a known tag
7519 * 2. Known tag followed by a LITERAL tag
7520 * 3. LITERAL tag followed by Known tag
7521 * 4. LITERAL tag followed by LITERAL tag
7524 /* Store the new tag */
7526 if ((peek
& 0x3F) == 4) { /* LITERAL */
7527 DebugLog(("STAG: LITERAL tag (peek = 0x%02X, off = %u) - TableRef follows!\n", peek
, off
));
7528 idx
= tvb_get_uintvar (tvb
, off
+1, &tag_len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7529 tag_new_literal
= tvb_get_stringz_enc(pinfo
->pool
, tvb
, str_tbl
+idx
, &str_len
, encoding
);
7530 tag_new_known
= 0; /* invalidate known tag_new */
7531 } else { /* Known tag */
7532 tag_new_known
= peek
& 0x3F;
7534 tag_new_literal
= map_token (map
->tags
, *codepage_stag
,
7537 tag_new_literal
= wmem_strdup_printf(wmem_packet_scope(), "Tag_0x%02X",
7540 /* Stored looked up tag name string */
7543 /* Parsing of TAG starts HERE */
7544 if (peek
& 0x40) { /* Content present */
7546 * [!] An explicit END token is expected in these cases!
7547 * ==> Recursion possible if we encounter a tag with content;
7548 * recursion will return at the explicit END token.
7550 if (parsing_tag_content
) { /* Recurse */
7551 DebugLog(("STAG: Tag in Tag - RECURSE! (off = %u)\n", off
));
7552 /* Do not process the attribute list:
7553 * recursion will take care of it */
7554 p_set_proto_depth(pinfo
, proto_wbxml
, recursion_level
+ 1);
7555 len
= parse_wbxml_tag_defined (tree
, tvb
, pinfo
, off
, str_tbl
,
7556 codepage_stag
, codepage_attr
, map
);
7558 } else { /* Now we will have content to parse */
7559 /* Save the start tag so we can properly close it later. */
7560 if ((peek
& 0x3F) == 4) { /* Literal tag */
7561 tag_save_literal
= tag_new_literal
;
7563 } else { /* Known tag */
7564 tag_save_known
= tag_new_known
;
7565 tag_save_literal
= tag_new_literal
;
7566 /* The last statement avoids needless lookups */
7568 /* Process the attribute list if present */
7569 if (peek
& 0x80) { /* Content and Attribute list present */
7570 if (tag_new_known
) { /* Known tag */
7571 proto_tree_add_string_format(tree
, hf_wbxml_known_tag
, tvb
, off
, 1, tag_new_literal
,
7572 " %3d | Tag | T %3d | Known Tag 0x%02X (AC) | %s<%s",
7573 recursion_level
, *codepage_stag
, tag_new_known
,
7574 Indent (recursion_level
), tag_new_literal
);
7575 /* Tag string already looked up earlier! */
7577 } else { /* LITERAL tag */
7578 proto_tree_add_string_format(tree
, hf_wbxml_literal_ac
, tvb
, off
, 1, tag_new_literal
,
7579 " %3d | Tag | T %3d | LITERAL_AC (Literal tag) (AC) | %s<%s",
7580 recursion_level
, *codepage_stag
, Indent (recursion_level
), tag_new_literal
);
7583 len
= parse_wbxml_attribute_list_defined (tree
, tvb
, pinfo
,
7584 off
, str_tbl
, codepage_attr
, map
);
7585 /* Check that there is still room in packet */
7587 if (off
>= tvb_len
) {
7588 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n",
7589 recursion_level
, off
- offset
));
7592 proto_tree_add_none_format(tree
, hf_wbxml_end_attribute_list
, tvb
, off
-1, 1,
7593 " %3d | Tag | T %3d | END (attribute list) | %s>",
7594 recursion_level
, *codepage_stag
, Indent (recursion_level
));
7595 } else { /* Content, no Attribute list */
7596 if (tag_new_known
) { /* Known tag */
7597 proto_tree_add_string_format(tree
, hf_wbxml_known_tag
, tvb
, off
, 1, tag_new_literal
,
7598 " %3d | Tag | T %3d | Known Tag 0x%02X (.C) | %s<%s>",
7599 recursion_level
, *codepage_stag
, tag_new_known
,
7600 Indent (recursion_level
), tag_new_literal
);
7601 /* Tag string already looked up earlier! */
7603 } else { /* LITERAL tag */
7604 proto_tree_add_string_format(tree
, hf_wbxml_literal_c
, tvb
, off
, 1, tag_new_literal
,
7605 " %3d | Tag | T %3d | LITERAL_C (Literal Tag) (.C) | %s<%s>",
7606 recursion_level
, *codepage_stag
, Indent (recursion_level
), tag_new_literal
);
7610 /* The data that follows in the parsing process
7611 * represents content for the opening tag
7612 * we've just processed in the lines above.
7613 * Next time we encounter a tag with content: recurse
7615 parsing_tag_content
= true;
7616 DebugLog(("Tag in Tag - No recursion this time! (off = %u)\n", off
));
7618 } else { /* No Content */
7619 DebugLog(("<Tag/> in Tag - No recursion! (off = %u)\n", off
));
7621 p_set_proto_depth(pinfo
, proto_wbxml
, recursion_level
);
7622 if (peek
& 0x80) { /* No Content, Attribute list present */
7623 if (tag_new_known
) { /* Known tag */
7624 proto_tree_add_string_format(tree
, hf_wbxml_known_tag
, tvb
, off
, 1, tag_new_literal
,
7625 " %3d | Tag | T %3d | Known Tag 0x%02X (A.) | %s<%s",
7626 recursion_level
, *codepage_stag
, tag_new_known
,
7627 Indent (recursion_level
), tag_new_literal
);
7628 /* Tag string already looked up earlier! */
7630 len
= parse_wbxml_attribute_list_defined (tree
, tvb
, pinfo
,
7631 off
, str_tbl
, codepage_attr
, map
);
7632 /* Check that there is still room in packet */
7634 if (off
> tvb_len
) {
7635 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n",
7636 recursion_level
, off
- offset
));
7638 proto_tree_add_uint_format(tree
, hf_wbxml_end_known_tag_uint
, tvb
, off
-1, 1, *codepage_stag
,
7639 " %3d | Tag | T %3d | END (Known Tag) | %s/>",
7640 recursion_level
, *codepage_stag
, Indent (recursion_level
));
7641 } else { /* LITERAL tag */
7642 proto_tree_add_string_format(tree
, hf_wbxml_literal_a
, tvb
, off
, 1, tag_new_literal
,
7643 " %3d | Tag | T %3d | LITERAL_A (Literal Tag) (A.) | %s<%s",
7644 recursion_level
, *codepage_stag
, Indent (recursion_level
), tag_new_literal
);
7646 len
= parse_wbxml_attribute_list_defined (tree
, tvb
, pinfo
,
7647 off
, str_tbl
, codepage_attr
, map
);
7648 /* Check that there is still room in packet */
7650 if (off
>= tvb_len
) {
7651 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n",
7652 recursion_level
, off
- offset
));
7654 proto_tree_add_string_format(tree
, hf_wbxml_end_literal_tag
, tvb
, off
-1, 1, "",
7655 " %3d | Tag | T %3d | END (Literal Tag) | %s/>",
7656 recursion_level
, *codepage_stag
, Indent (recursion_level
));
7658 } else { /* No Content, No Attribute list */
7659 if (tag_new_known
) { /* Known tag */
7660 proto_tree_add_string_format(tree
, hf_wbxml_known_tag
, tvb
, off
, 1, tag_new_literal
,
7661 " %3d | Tag | T %3d | Known Tag 0x%02x (..) | %s<%s />",
7662 recursion_level
, *codepage_stag
, tag_new_known
,
7663 Indent (recursion_level
), tag_new_literal
);
7664 /* Tag string already looked up earlier! */
7666 } else { /* LITERAL tag */
7667 proto_tree_add_string_format(tree
, hf_wbxml_literal
, tvb
, off
, 1, tag_new_literal
,
7668 " %3d | Tag | T %3d | LITERAL (Literal Tag) (..) | %s<%s />",
7669 recursion_level
, *codepage_stag
, Indent (recursion_level
),
7675 p_set_proto_depth(pinfo
, proto_wbxml
, recursion_level
);
7676 /* TODO: Do I have to reset code page here? */
7678 } /* if (tag & 0x3F) >= 5 */
7680 DebugLog(("STAG: level = %u, Return: len = %u (end of function body)\n", recursion_level
, off
- offset
));
7681 return (off
- offset
);
7684 /****************** WBXML protocol dissection functions ******************/
7686 /* Code to actually dissect the packets */
7688 dissect_wbxml_common(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
,
7689 const wbxml_decoding
*override_content_map
)
7691 /* Set up structures needed to add the protocol subtree and manage it */
7693 proto_tree
*wbxml_tree
; /* Main WBXML tree */
7694 proto_tree
*wbxml_str_tbl_tree
; /* String table subtree */
7695 proto_tree
*wbxml_content_tree
; /* Content subtree */
7696 proto_tree
*tag_tree
;
7698 unsigned offset
= 0;
7700 uint32_t charset
= 0;
7701 uint32_t charset_len
= 0;
7704 uint32_t publicid_index
= 0;
7705 uint32_t publicid_len
;
7707 uint32_t str_tbl_len
;
7708 uint32_t str_tbl_len_len
= 0;
7709 const wbxml_decoding
*content_map
= NULL
;
7710 char *summary
= NULL
;
7711 uint8_t codepage_stag
= 0;
7712 uint8_t codepage_attr
= 0;
7714 DebugLog(("dissect_wbxml: Dissecting packet %u\n", pinfo
->num
));
7717 * Version 1.0: version publicid strtbl BODY
7718 * Version 1.x: version publicid charset strtbl BODY
7720 * Last valid format: WBXML 1.3
7722 switch ( version
= tvb_get_uint8 (tvb
, 0) ) {
7723 case 0x00: /* WBXML/1.0 */
7726 case 0x01: /* WBXML/1.1 */
7727 case 0x02: /* WBXML/1.2 */
7728 case 0x03: /* WBXML/1.3 */
7732 /* Put some information here, so that the user knows what's going on. */
7734 /* Add summary to INFO column if it is enabled */
7735 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Unknown WBXML version 0x%02x)", version
);
7736 ti
= proto_tree_add_item (tree
, proto_wbxml
, tvb
, 0, -1, ENC_NA
);
7737 proto_item_append_text(ti
, ", Unknown version 0x%02x", version
);
7741 /* In order to properly construct the packet summary,
7742 * I need to read the entire WBXML header
7743 * up to the string table length.
7747 publicid
= tvb_get_uintvar(tvb
, 1, &publicid_len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7749 /* Public identifier in string table */
7750 publicid_index
= tvb_get_uintvar (tvb
, 1+publicid_len
, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7751 publicid_len
+= len
;
7753 offset
= 1 + publicid_len
;
7755 /* Version-specific handling of Charset */
7756 switch ( version
) {
7757 case 0x00: /* WBXML/1.0 */
7761 case 0x01: /* WBXML/1.1 */
7762 case 0x02: /* WBXML/1.2 */
7763 case 0x03: /* WBXML/1.3 */
7765 charset
= tvb_get_uintvar (tvb
, offset
, &charset_len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7766 offset
+= charset_len
;
7769 default: /* Impossible since we returned already earlier */
7770 DISSECTOR_ASSERT_NOT_REACHED();
7775 encoding
= mibenum_charset_to_encoding(charset
);
7777 /* XXX: If the charset is 0 we should look if there is a charset
7778 * parameter in the Content-Type / media_type if passed to
7779 * the dissector. Otherwise the default is UTF-8.
7781 encoding
= ENC_UTF_8
;
7783 p_add_proto_data(pinfo
->pool
, pinfo
, proto_wbxml
, 0, GUINT_TO_POINTER(encoding
));
7785 /* String table: read string table length in bytes */
7786 tvb_get_uintvar (tvb
, offset
, &str_tbl_len_len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7787 str_tbl
= offset
+ str_tbl_len_len
; /* Start of 1st string in string table */
7789 /* Compose the summary line */
7791 summary
= wmem_strdup_printf(pinfo
->pool
, "%s, Public ID: \"%s\"",
7792 val_to_str_ext (version
, &vals_wbxml_versions_ext
, "(unknown 0x%x)"),
7793 val_to_str_ext (publicid
, &vals_wbxml_public_ids_ext
, "(unknown 0x%x)"));
7795 /* Read length of Public ID from string table */
7796 summary
= wmem_strdup_printf(pinfo
->pool
, "%s, Public ID: \"%s\"",
7797 val_to_str_ext (version
, &vals_wbxml_versions_ext
, "(unknown 0x%x)"),
7798 tvb_get_stringz_enc(pinfo
->pool
, tvb
, str_tbl
+ publicid_index
, &len
, encoding
));
7801 /* Add summary to INFO column if it is enabled */
7802 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (WBXML %s)", summary
);
7804 /* create display subtree for the protocol */
7805 ti
= proto_tree_add_item (tree
, proto_wbxml
, tvb
, 0, -1, ENC_NA
);
7806 proto_item_append_text(ti
, ", Version: %s", summary
);
7809 * Now show the protocol subtree, if tree is set.
7811 wbxml_tree
= proto_item_add_subtree(ti
, ett_wbxml
);
7814 proto_tree_add_uint (wbxml_tree
, hf_wbxml_version
,
7815 tvb
, 0, 1, version
);
7818 if (publicid
) { /* Known Public ID */
7819 proto_tree_add_uint(wbxml_tree
, hf_wbxml_public_id_known
,
7820 tvb
, 1, publicid_len
, publicid
);
7821 } else { /* Public identifier in string table */
7822 proto_tree_add_item (wbxml_tree
, hf_wbxml_public_id_literal
,
7823 tvb
, 1, publicid_len
, ENC_ASCII
);
7825 offset
= 1 + publicid_len
;
7827 if ( charset
) { /* Charset */
7828 proto_tree_add_uint (wbxml_tree
, hf_wbxml_charset
,
7829 tvb
, 1 + publicid_len
, charset_len
, charset
);
7830 offset
+= charset_len
;
7833 str_tbl_len
= tvb_get_uintvar (tvb
, offset
, &len
, pinfo
, &ei_wbxml_oversized_uintvar
);
7834 str_tbl
= offset
+ len
; /* Start of 1st string in string table */
7837 wbxml_str_tbl_tree
= proto_tree_add_subtree_format(wbxml_tree
,
7838 tvb
, offset
, len
+ str_tbl_len
, ett_wbxml_str_tbl
, NULL
, "String table: %u bytes",
7841 if (str_tbl_len
) { /* Display string table as subtree */
7842 show_wbxml_string_table (wbxml_str_tbl_tree
, tvb
,
7843 str_tbl
, str_tbl_len
,
7847 /* Data starts HERE */
7848 offset
+= len
+ str_tbl_len
;
7850 wbxml_content_tree
= proto_tree_add_subtree(wbxml_tree
, tvb
, offset
, -1,
7851 ett_wbxml_content
, &ti
, "Data representation");
7852 /* The WBXML BODY starts here */
7853 if (disable_wbxml_token_parsing
) {
7854 expert_add_info(pinfo
, ti
, &ei_wbxml_data_not_shown
);
7858 /* The parse_wbxml_X() functions will process the content correctly,
7859 * irrespective of the WBXML version used. For the WBXML body, this
7860 * means that there is a different processing for the global token
7861 * RESERVED_2 (WBXML 1.0) or OPAQUE (WBXML 1.x with x > 0). */
7862 if (override_content_map
!= NULL
) {
7863 content_map
= override_content_map
;
7864 proto_item_append_text(ti
,
7868 /* Retrieve the content token mapping if available */
7869 content_map
= get_wbxml_decoding_from_public_id (publicid
);
7870 if (! content_map
) {
7871 content_map
= get_wbxml_decoding_from_content_type(
7872 pinfo
->match_string
, tvb
, offset
);
7873 if (! content_map
) {
7874 expert_add_info(pinfo
, ti
, &ei_wbxml_content_type_not_supported
);
7876 proto_item_append_text(ti
,
7877 " is based on Content-Type: %s "
7878 "(chosen decoding: %s)",
7879 pinfo
->match_string
, content_map
->name
);
7883 if (content_map
&& skip_wbxml_token_mapping
) {
7884 expert_add_info(pinfo
, ti
, &ei_wbxml_content_type_disabled
);
7887 tag_tree
= proto_tree_add_subtree(wbxml_content_tree
, tvb
, offset
, -1, ett_wbxml_tags
, NULL
,
7888 "Level | State | Codepage | WBXML Token Description | Rendering");
7890 /* If content_map == NULL, WBXML only, no interpretation of the content */
7891 parse_wbxml_tag_defined (tag_tree
,
7892 tvb
, pinfo
, offset
, str_tbl
, &codepage_stag
,
7893 &codepage_attr
, content_map
);
7897 dissect_wbxml(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
7899 dissect_wbxml_common(tvb
, pinfo
, tree
, NULL
);
7900 return tvb_captured_length(tvb
);
7904 dissect_uaprof(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
7906 dissect_wbxml_common(tvb
, pinfo
, tree
, &decode_uaprof_wap_248
);
7907 return tvb_captured_length(tvb
);
7910 /****************** Register the protocol with Wireshark ******************/
7913 /* This format is required because a script is used to build the C function
7914 * that calls the protocol registration. */
7917 proto_register_wbxml(void)
7919 module_t
*wbxml_module
; /* WBXML Preferences */
7921 /* Setup list of header fields. */
7922 static hf_register_info hf
[] = {
7923 { &hf_wbxml_version
,
7926 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
,
7927 &vals_wbxml_versions_ext
, 0x00,
7928 "WBXML Version", HFILL
}
7930 { &hf_wbxml_public_id_known
,
7931 { "Public Identifier (known)",
7932 "wbxml.public_id.known",
7933 FT_UINT32
, BASE_HEX
|BASE_EXT_STRING
,
7934 &vals_wbxml_public_ids_ext
, 0x00,
7935 "WBXML Known Public Identifier (integer)", HFILL
}
7937 { &hf_wbxml_public_id_literal
,
7938 { "Public Identifier (literal)",
7939 "wbxml.public_id.literal",
7940 FT_STRING
, BASE_NONE
,
7942 "WBXML Literal Public Identifier (text string)", HFILL
}
7944 { &hf_wbxml_charset
,
7947 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
,
7948 &mibenum_vals_character_sets_ext
, 0x00,
7949 "WBXML Character Set", HFILL
}
7951 { &hf_wbxml_string_table_item_offset
,
7953 "wbxml.string_table_item_offset",
7954 FT_UINT32
, BASE_DEC
,
7958 { &hf_wbxml_string_table_item_string
,
7960 "wbxml.string_table_item_string",
7961 FT_STRINGZ
, BASE_NONE
,
7965 { &hf_wbxml_switch_page
,
7967 "wbxml.switch_page",
7968 FT_UINT32
, BASE_DEC
,
7972 { &hf_wbxml_known_tag
,
7975 FT_STRING
, BASE_NONE
,
7979 { &hf_wbxml_end_known_tag
,
7981 "wbxml.end_known_tag",
7982 FT_STRING
, BASE_NONE
,
7986 { &hf_wbxml_end_known_tag_uint
,
7988 "wbxml.end_known_tag.uint",
7989 FT_UINT32
, BASE_DEC
,
7996 FT_STRING
, BASE_NONE
,
8003 FT_STRING
, BASE_NONE
,
8007 { &hf_wbxml_opaque_data
,
8009 "wbxml.opaque_data",
8010 FT_BYTES
, BASE_NONE
,
8017 FT_UINT32
, BASE_DEC
,
8021 { &hf_wbxml_literal
,
8024 FT_STRING
, BASE_NONE
,
8031 FT_STRING
, BASE_NONE
,
8038 FT_STRING
, BASE_NONE
,
8042 { &hf_wbxml_extension_token
,
8043 { "Extension Token",
8044 "wbxml.extension_token",
8045 FT_STRING
, BASE_NONE
,
8049 { &hf_wbxml_reserved_2
,
8056 { &hf_wbxml_invalid_token
,
8058 "wbxml.invalid_token",
8063 { &hf_wbxml_known_attrvalue
,
8064 { "Known attrValue",
8065 "wbxml.known_attrvalue",
8066 FT_STRING
, BASE_NONE
,
8070 { &hf_wbxml_known_attrstart
,
8071 { "Known attrStart",
8072 "wbxml.known_attrstart",
8073 FT_STRING
, BASE_NONE
,
8077 { &hf_wbxml_end_literal_tag
,
8078 { "END (Literal Tag)",
8079 "wbxml.end_literal_tag",
8080 FT_STRING
, BASE_NONE
,
8084 { &hf_wbxml_literal_a
,
8087 FT_STRING
, BASE_NONE
,
8091 { &hf_wbxml_literal_c
,
8094 FT_STRING
, BASE_NONE
,
8098 { &hf_wbxml_literal_ac
,
8101 FT_STRING
, BASE_NONE
,
8112 { &hf_wbxml_end_attribute_list
,
8113 { "END (attribute list)",
8114 "wbxml.end_attribute_list",
8120 { "PI (XML Processing Instruction)",
8128 /* Setup protocol subtree array */
8129 static int *ett
[] = {
8134 &ett_wbxml_string_table_item
,
8137 static ei_register_info ei
[] = {
8138 { &ei_wbxml_data_not_shown
, { "wbxml.data_not_shown", PI_PROTOCOL
, PI_NOTE
, "Data representation not shown (edit WBXML preferences to show)", EXPFILL
}},
8139 { &ei_wbxml_content_type_not_supported
, { "wbxml.content_type.not_supported", PI_UNDECODED
, PI_WARN
, "Rendering of this content type not (yet) supported", EXPFILL
}},
8140 { &ei_wbxml_content_type_disabled
, { "wbxml.content_type.disabled", PI_PROTOCOL
, PI_NOTE
, "Rendering of this content type has been disabled (edit WBXML preferences to enable)", EXPFILL
}},
8141 { &ei_wbxml_oversized_uintvar
, { "wbxml.oversized_uintvar", PI_MALFORMED
, PI_ERROR
, "Uintvar is oversized", EXPFILL
}},
8142 { &ei_wbxml_too_much_recursion
, { "wbxml.too_much_recursion", PI_UNDECODED
, PI_WARN
, "Too much recursion", EXPFILL
}}
8145 expert_module_t
* expert_wbxml
;
8147 /* Register the protocol name and description */
8148 proto_wbxml
= proto_register_protocol("WAP Binary XML", "WBXML", "wbxml");
8150 /* Required function calls to register the header fields
8151 * and subtrees used */
8152 proto_register_field_array(proto_wbxml
, hf
, array_length(hf
));
8153 proto_register_subtree_array(ett
, array_length(ett
));
8154 expert_wbxml
= expert_register_protocol(proto_wbxml
);
8155 expert_register_field_array(expert_wbxml
, ei
, array_length(ei
));
8158 wbxml_module
= prefs_register_protocol(proto_wbxml
, NULL
);
8159 prefs_register_bool_preference(wbxml_module
,
8160 "skip_wbxml_token_mapping",
8161 "Skip the mapping of WBXML tokens to media type tokens.",
8162 "Enable this preference if you want to view the WBXML "
8163 "tokens without the representation in a media type "
8164 "(e.g., WML). Tokens will show up as Tag_0x12, "
8165 "attrStart_0x08 or attrValue_0x0B for example.",
8166 &skip_wbxml_token_mapping
);
8167 prefs_register_bool_preference(wbxml_module
,
8168 "disable_wbxml_token_parsing",
8169 "Disable the parsing of the WBXML tokens.",
8170 "Enable this preference if you want to skip the "
8171 "parsing of the WBXML tokens that constitute the body "
8172 "of the WBXML document. Only the WBXML header will be "
8173 "dissected (and visualized) then.",
8174 &disable_wbxml_token_parsing
);
8176 register_dissector("wbxml", dissect_wbxml
, proto_wbxml
);
8177 register_dissector("wbxml-uaprof", dissect_uaprof
, proto_wbxml
);
8182 proto_reg_handoff_wbxml(void)
8184 /* Heuristic dissectors would be declared by means of:
8185 * heur_dissector_add("wsp", dissect_wbxml_heur, proto_wbxml);
8188 wbxml_handle
= find_dissector("wbxml");
8190 /* Register the WSP content types (defined as protocol port)
8191 * for WBXML dissection.
8193 * See http://www.wapforum.org/wina/wsp-content-type.htm
8195 * As the media types for WSP and HTTP are the same, the WSP dissector
8196 * uses the same string dissector table as the HTTP protocol.
8199 /**** Well-known WBXML WSP Content-Type values ****/
8201 dissector_add_string("media_type",
8202 "application/vnd.wap.wmlc", wbxml_handle
);
8203 dissector_add_string("media_type",
8204 "application/vnd.wap.wta-eventc", wbxml_handle
);
8205 dissector_add_string("media_type",
8206 "application/vnd.wap.wbxml", wbxml_handle
);
8207 dissector_add_string("media_type",
8208 "application/vnd.wap.sic", wbxml_handle
);
8209 dissector_add_string("media_type",
8210 "application/vnd.wap.slc", wbxml_handle
);
8211 dissector_add_string("media_type",
8212 "application/vnd.wap.coc", wbxml_handle
);
8213 dissector_add_string("media_type",
8214 "application/vnd.wap.connectivity-wbxml", wbxml_handle
);
8215 dissector_add_string("media_type",
8216 "application/vnd.wap.locc+wbxml", wbxml_handle
);
8217 dissector_add_string("media_type",
8218 "application/vnd.syncml+wbxml", wbxml_handle
);
8219 dissector_add_string("media_type",
8220 "application/vnd.syncml.dm+wbxml", wbxml_handle
);
8221 dissector_add_string("media_type",
8222 "application/vnd.oma.drm.rights+wbxml", wbxml_handle
);
8223 dissector_add_string("media_type",
8224 "application/vnd.wv.csp.wbxml", wbxml_handle
);
8225 dissector_add_string("media_type",
8226 "application/vnd.ms-sync.wbxml", wbxml_handle
);
8227 dissector_add_string("media_type",
8228 "application/vnd.ms-sync", wbxml_handle
);
8230 /**** Registered WBXML WSP Content-Type values ****/
8232 dissector_add_string("media_type",
8233 "application/vnd.uplanet.cacheop-wbxml", wbxml_handle
);
8234 dissector_add_string("media_type",
8235 "application/vnd.uplanet.alert-wbxml", wbxml_handle
);
8236 dissector_add_string("media_type",
8237 "application/vnd.uplanet.list-wbxml", wbxml_handle
);
8238 dissector_add_string("media_type",
8239 "application/vnd.uplanet.listcmd-wbxml", wbxml_handle
);
8240 dissector_add_string("media_type",
8241 "application/vnd.uplanet.channel-wbxml", wbxml_handle
);
8242 dissector_add_string("media_type",
8243 "application/vnd.uplanet.bearer-choice-wbxml", wbxml_handle
);
8244 dissector_add_string("media_type",
8245 "application/vnd.phonecom.mmc-wbxml", wbxml_handle
);
8246 dissector_add_string("media_type",
8247 "application/vnd.nokia.syncset+wbxml", wbxml_handle
);
8249 /***** Content types that only have a textual representation *****/
8250 dissector_add_string("media_type",
8251 "application/x-wap-prov.browser-bookmarks", wbxml_handle
);
8252 dissector_add_string("media_type",
8253 "application/x-wap-prov.browser-settings", wbxml_handle
);
8254 /* Same as application/vnd.nokia.syncset+wbxml */
8255 dissector_add_string("media_type",
8256 "application/x-prov.syncset+wbxml", wbxml_handle
);
8259 dissector_add_string("media_type.suffix", "wbxml", wbxml_handle
);
8268 * indent-tabs-mode: t
8271 * ex: set shiftwidth=8 tabstop=8 noexpandtab:
8272 * :indentSize=8:tabSize=8:noTabs=false: