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.
11 * Refer to the AUTHORS file or the AUTHORS section in the man page
12 * for contacting the author(s) of this file.
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * WAP Binary XML decoding functionality provided by Olivier Biot.
19 * WV-CSP 1.2 updated to Release version and WV-CSP 1.3 protocol
20 * decoding functionality provided by Andrei Rubaniuk.
22 * The WAP specifications used to be found at the WAP Forum:
23 * <http://www.wapforum.org/what/Technical.htm>
24 * But now the correct link is at the Open Mobile Alliance:
25 * <http://www.openmobilealliance.org/tech/affiliates/wap/wapindex.html>
26 * Media types defined by OMA affiliates will have their standards at:
27 * <http://www.openmobilealliance.org/tech/affiliates/index.html>
28 * <http://www.openmobilealliance.org/release_program/index.html>
30 * This program is free software; you can redistribute it and/or
31 * modify it under the terms of the GNU General Public License
32 * as published by the Free Software Foundation; either version 2
33 * of the License, or (at your option) any later version.
35 * This program is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
40 * You should have received a copy of the GNU General Public License
41 * along with this program; if not, write to the Free Software
42 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
45 /* Edit this file with 4-space tabulation */
57 #include <epan/packet.h>
59 #include <epan/prefs.h>
60 #include <epan/emem.h>
62 /* We need the function tvb_get_guintvar() */
63 #include "packet-wap.h"
65 #ifdef NEED_G_ASCII_STRCASECMP_H
66 #include "g_ascii_strcasecmp.h"
69 /* General-purpose debug logger.
70 * Requires double parentheses because of variable arguments of printf().
72 * Enable debug logging for WBXML by defining AM_FLAGS
73 * so that it contains "-DDEBUG_wbxml"
77 g_print("%s:%u: ", __FILE__, __LINE__); \
83 /* The code in this source file dissects the WAP Binary XML content,
84 * and if possible renders it. WBXML mappings are defined in the
85 * "wbxml_decoding" structure.
89 * - Some WBXML content is *not* backwards compatible across minor versions.
90 * This painful remark is true for:
91 * o WMLC 1.0 with respect to later WMLC 1.x
92 * o All WV-CSP versions (never backwards compatible)
93 * The only way of correctly rendering the WBXML is to let the end-user
94 * choose from the possible renderings. This only applies to the case when
95 * the WBXML DocType is not included in the WBXML header (unknown/missing).
97 * - Some WBXML content uses EXT_T_* in a non-tableref manner. This is the
98 * case with WV-CSP 1.1 and up, where the index points to a value_string
99 * containing WV-CSP specific token values. This is allowed as it is not
100 * explicitly forbidden in the WBXML specifications. Hence the global token
101 * map for content must also contain a function pointer if no tableref
104 * - Code page switches apply until a new code page switch. In the WBXML/1.x
105 * ABNF notation, it can be proven that the switch_page can only precede
106 * the following tokens:
107 * o stag : TAG | LITERAL | LITERAL_A | LITERAL_C | LITERAL_AC
108 * o attr : ATTRSTART | ATTRVALUE
109 * o extension : EXT_I | EXT_T | EXT
110 * Code page switches are displayed in a separate column.
112 * - The WBXML spec states that code pages are static to both the tag and the
113 * attribute state parser. A SWITCH_PAGE within a state switches the code
114 * page of the active state only. Note that code page 255 is reserved for
115 * application-specific (read: testing) purposes.
117 * - In order to render the XML content, recursion is inevitable at some
118 * point (when a tag with content occurs in the content of a tag with
119 * content). The code will however not recurse if this is not strictly
120 * required (e.g., tag without content in the content of a tag with
123 * - I found it useful to display the XML nesting level as a first "column",
124 * followed by the abbreviated WBXML token interpretation. When a mapping
125 * is defined for the parsed WBXML content, then the XML rendering is
126 * displayed with appropriate indentation (maximum nesting level = 255,
127 * after which the nesting and level will safely roll-over to 0).
129 * - The WAP Forum defines the order of precedence for finding out the
130 * WBXML content type (same rules for charset) as follows:
131 * 1. Look in the Content-Type WSP header
132 * 2. Look in the WBXML header
133 * Currently there is no means of using content type parameters:
135 * o Charset=<charset_of_the_content>
136 * So it is possible some WBXML content types are incorrectly parsed.
137 * This would only be the case when the content type declaration in the
138 * WSP Content-Type header would be different (or would have parameters
139 * which are relevant to the WBXML decoding) from the content type
140 * identifier specified in the WBXML header. This has to do with the
141 * decoding of terminated text strings in the different character codings.
142 * TODO: investigate this and provide correct decoding at all times.
145 typedef struct _value_valuestring {
147 const value_string *valstrptr;
150 /* Tries to match val against each element in the value_value_string array vvs.
151 * Returns the associated value_string ptr on a match, or NULL on failure. */
152 static const value_string *
153 val_to_valstr(guint32 val, const value_valuestring *vvs)
157 while (vvs[i].valstrptr) {
158 if (vvs[i].value == val)
159 return(vvs[i].valstrptr);
166 /* Note on Token mapping
167 * ---------------------
169 * The WBXML dissector will try mapping the token decoding to their textual
170 * representation if the media type has a defined token representation. The
171 * following logic applies:
173 * a. Inspect the WBXML PublicID
174 * This means that I need a list { PublicID, decoding }
176 * b. Inspect the literal media type
177 * This requires a list { "media/type", discriminator, { decodings } }
179 * b.1. Use a discriminator to choose an appropriate token mapping;
180 * The disciminator needs a small number of bytes from the data tvbuff_t.
183 * b.2. Provide a list to the end-user with all possible token mappings.
185 * c. If none match then only show the tokens without mapping.
189 /* ext_t_func_ptr is a pointer to a function handling the EXT_T_i tokens:
191 * char * ext_t_function(tvbuff_t *tvb, guint32 value, guint32 strtbl);
193 typedef char * (* ext_t_func_ptr)(tvbuff_t *, guint32, guint32);
195 /* Note on parsing of OPAQUE data
196 * ------------------------------
198 * The WBXML encapsulation allows the insertion of opaque binary data in the
199 * WBXML body. Although this opaque data has no meaning in WBXML, the media
200 * type itself may define compact encoding of given input by encoding it in
201 * such a OPAQUE blob of bytes.
203 * The WBXML dissector now supports dissection of OPAQUE data by means of a
204 * mapping function that will operate based on the token (well-known or literal)
205 * and the active code page.
207 * For well-known tokens the simplest approach is to use a switch for the code
208 * pages and another switch for the relevant tokens within a code page.
210 * For literal tokens (tags and attribute names), the only approach is a string
211 * comparison with the literal representation of the given tag or attribute
214 * opaque_token_func_ptr is a pointer to a function handling OPAQUE values
215 * for binary tokens representing tags or attribute starts.
216 * opaque_literal_func_ptr is a pointer to a function handling OPAQUE values
217 * for literal tokens representing tags or attribute starts.
219 * The length field of the OPAQUE entry starts at offset (not offset + 1).
221 * The length of the processed OPAQUE value is returned by reference.
223 * char * opaque_token_function(tvbuff_t *tvb, guint32 offset,
224 * guint8 token, guint8 codepage, guint32 *length);
225 * char * opaque_literal_function(tvbuff_t *tvb, guint32 offset,
226 * const char *token, guint8 codepage, guint32 *length);
228 typedef char * (* opaque_token_func_ptr)(tvbuff_t *, guint32, guint8, guint8, guint32 *);
229 typedef char * (* opaque_literal_func_ptr)(tvbuff_t *, guint32, const char *, guint8, guint32 *);
232 default_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
233 guint8 token _U_, guint8 codepage _U_, guint32 *length)
235 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
236 char *str = g_strdup_printf("(%d bytes of opaque data)", data_len);
242 default_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
243 const char *token _U_, guint8 codepage _U_, guint32 *length)
245 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
246 char *str = g_strdup_printf("(%d bytes of opaque data)", data_len);
252 default_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
253 guint8 token _U_, guint8 codepage _U_, guint32 *length)
255 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
256 char *str = g_strdup_printf("(%d bytes of opaque data)", data_len);
262 default_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
263 const char *token _U_, guint8 codepage _U_, guint32 *length)
265 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
266 char *str = g_strdup_printf("(%d bytes of opaque data)", data_len);
271 /* Render a hex %dateTime encoded timestamp as a string.
272 * 0x20011231123456 becomes "2001-12-31T12:34:56Z" */
274 date_time_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
279 case 4: /* YYYY-MM-DD[T00:00:00Z] */
280 str = g_strdup_printf("%%DateTime: "
281 "%02x%02x-%02x-%02xT00:00:00Z",
282 tvb_get_guint8(tvb, offset),
283 tvb_get_guint8(tvb, offset + 1),
284 tvb_get_guint8(tvb, offset + 2),
285 tvb_get_guint8(tvb, offset + 3));
287 case 5: /* YYYY-MM-DDThh[:00:00Z] */
288 str = g_strdup_printf("%%DateTime: "
289 "%02x%02x-%02x-%02xT%02x:00:00Z",
290 tvb_get_guint8(tvb, offset),
291 tvb_get_guint8(tvb, offset + 1),
292 tvb_get_guint8(tvb, offset + 2),
293 tvb_get_guint8(tvb, offset + 3),
294 tvb_get_guint8(tvb, offset + 4));
296 case 6: /* YYYY-MM-DDThh:mm[:00Z] */
297 str = g_strdup_printf("%%DateTime: "
298 "%02x%02x-%02x-%02xT%02x:%02x:00Z",
299 tvb_get_guint8(tvb, offset),
300 tvb_get_guint8(tvb, offset + 1),
301 tvb_get_guint8(tvb, offset + 2),
302 tvb_get_guint8(tvb, offset + 3),
303 tvb_get_guint8(tvb, offset + 4),
304 tvb_get_guint8(tvb, offset + 5));
306 case 7: /* YYYY-MM-DDThh:mm[:00Z] */
307 str = g_strdup_printf("%%DateTime: "
308 "%02x%02x-%02x-%02xT%02x:%02x:%02xZ",
309 tvb_get_guint8(tvb, offset),
310 tvb_get_guint8(tvb, offset + 1),
311 tvb_get_guint8(tvb, offset + 2),
312 tvb_get_guint8(tvb, offset + 3),
313 tvb_get_guint8(tvb, offset + 4),
314 tvb_get_guint8(tvb, offset + 5),
315 tvb_get_guint8(tvb, offset + 6));
318 str = g_strdup_printf("<Error: invalid binary %%DateTime "
319 "(%d bytes of opaque data)>", data_len);
326 /* Is ALWAYS 6 bytes long:
327 * 00YY YYYY YYYY YYMM MMDD DDDh hhhh mmmm mmss ssss ZZZZ ZZZZ */
329 wv_datetime_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
333 guint8 month, day, hour, minute, second, timezone;
336 if (data_len == 6) { /* Valid */
338 /* Octet 1: 00YY YYYY */
339 year = tvb_get_guint8(tvb, offset) & 0x3F; /* ..11 1111 */
341 /* Octet 2: YYYY YYMM */
342 peek = tvb_get_guint8(tvb, offset + 1);
343 year += (peek >> 2); /* 1111 11.. */
344 month = (peek & 0x03) << 2; /* .... ..11 */
345 /* Octet 3: MMDD DDDh */
346 peek = tvb_get_guint8(tvb, offset + 2);
347 month += (peek >> 6); /* 11.. .... */
348 day = (peek & 0x3E) >> 1; /* ..11 111. */
349 hour = (peek & 0x01) << 4; /* .... ...1 */
350 /* Octet 4: hhhh mmmm */
351 peek = tvb_get_guint8(tvb, offset + 3);
353 minute = (peek & 0x0F) << 2; /* .... 1111 */
354 /* Octet 5: mmss ssss */
355 peek = tvb_get_guint8(tvb, offset + 4);
356 minute += (peek >> 6); /* 11.. .... */
357 second = peek & 0x3F; /* ..11 1111 */
358 /* octet 6: ZZZZZZZZ */
359 timezone = tvb_get_guint8(tvb, offset + 5);
360 /* Now construct the string */
361 str = g_strdup_printf("WV-CSP DateTime: "
362 "%04d-%02d-%02dT%02d:%02d:%02d%c",
363 year, month, day, hour, minute, second, timezone);
364 } else { /* Invalid length for a WV-CSP DateTime tag value */
365 str = g_strdup_printf("<Error: invalid binary WV-CSP DateTime value "
366 "(%d bytes of opaque data)>", data_len);
371 /* WV-CSP integer values for tag content is encoded in a fashion similar
372 * to a Long-Integer in WSP */
374 wv_integer_from_opaque(tvbuff_t *tvb, guint32 offset, guint32 data_len)
380 str = g_strdup_printf("WV-CSP Integer: %d",
381 tvb_get_guint8(tvb, offset));
384 str = g_strdup_printf("WV-CSP Integer: %d",
385 tvb_get_ntohs(tvb, offset));
388 str = g_strdup_printf("WV-CSP Integer: %d",
389 tvb_get_ntoh24(tvb, offset));
392 str = g_strdup_printf("WV-CSP Integer: %d",
393 tvb_get_ntohl(tvb, offset));
396 str = g_strdup_printf("<Error: invalid binary WV-CSP Integer value "
397 "(%d bytes of opaque data)>", data_len);
405 wv_csp10_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
406 guint8 token, guint8 codepage, guint32 *length)
408 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
412 case 0: /* Common code page */
414 case 0x0B: /* <Code> */
415 case 0x0F: /* <ContentSize> */
416 case 0x1A: /* <MessageCount> */
417 case 0x3C: /* <Validity> */
418 str = wv_integer_from_opaque(tvb,
419 offset + *length, data_len);
421 case 0x11: /* <DateTime> */
422 str = wv_datetime_from_opaque(tvb,
423 offset + *length, data_len);
429 case 1: /* Access code page */
431 case 0x1C: /* <KeepAliveTime> */
432 case 0x32: /* <TimeToLive> */
433 str = wv_integer_from_opaque(tvb,
434 offset + *length, data_len);
440 case 3: /* Client capability code page */
442 case 0x06: /* <AcceptedContentLength> */
443 case 0x0C: /* <MultiTrans> */
444 case 0x0D: /* <ParserSize> */
445 case 0x0E: /* <ServerPollMin> */
446 case 0x11: /* <TCPAddress> */
447 case 0x12: /* <TCPPort> */
448 case 0x13: /* <UDPPort> */
449 str = wv_integer_from_opaque(tvb,
450 offset + *length, data_len);
459 if (str == NULL) { /* Error, or not parsed */
460 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
468 wv_csp10_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
469 const char *token, guint8 codepage _U_, guint32 *length)
471 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
474 if ( token && ( (strcmp(token, "Code") == 0)
475 || (strcmp(token, "ContentSize") == 0)
476 || (strcmp(token, "MessageCount") == 0)
477 || (strcmp(token, "Validity") == 0)
478 || (strcmp(token, "KeepAliveTime") == 0)
479 || (strcmp(token, "TimeToLive") == 0)
480 || (strcmp(token, "AcceptedContentLength") == 0)
481 || (strcmp(token, "MultiTrans") == 0)
482 || (strcmp(token, "ParserSize") == 0)
483 || (strcmp(token, "ServerPollMin") == 0)
484 || (strcmp(token, "TCPAddress") == 0)
485 || (strcmp(token, "TCPPort") == 0)
486 || (strcmp(token, "UDPPort") == 0) ) )
488 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
490 else if ( token && ( strcmp(token, "DateTime") == 0) )
492 str = wv_datetime_from_opaque(tvb, offset + *length, data_len);
495 if (str == NULL) { /* Error, or not parsed */
496 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
503 wv_csp11_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
504 guint8 token, guint8 codepage, guint32 *length)
506 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
510 case 0: /* Common code page */
512 case 0x0B: /* <Code> */
513 case 0x0F: /* <ContentSize> */
514 case 0x1A: /* <MessageCount> */
515 case 0x3C: /* <Validity> */
516 str = wv_integer_from_opaque(tvb,
517 offset + *length, data_len);
519 case 0x11: /* <DateTime> */
520 str = wv_datetime_from_opaque(tvb,
521 offset + *length, data_len);
527 case 1: /* Access code page */
529 case 0x1C: /* <KeepAliveTime> */
530 case 0x32: /* <TimeToLive> */
531 str = wv_integer_from_opaque(tvb,
532 offset + *length, data_len);
538 case 3: /* Client capability code page */
540 case 0x06: /* <AcceptedContentLength> */
541 case 0x0C: /* <MultiTrans> */
542 case 0x0D: /* <ParserSize> */
543 case 0x0E: /* <ServerPollMin> */
544 case 0x12: /* <TCPPort> */
545 case 0x13: /* <UDPPort> */
546 str = wv_integer_from_opaque(tvb,
547 offset + *length, data_len);
553 case 6: /* Messaging code page */
555 case 0x1A: /* <DeliveryTime> - not in 1.0 */
556 str = wv_datetime_from_opaque(tvb,
557 offset + *length, data_len);
566 if (str == NULL) { /* Error, or not parsed */
567 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
575 wv_csp11_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
576 const char *token, guint8 codepage _U_, guint32 *length)
578 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
581 if ( token && ( (strcmp(token, "Code") == 0)
582 || (strcmp(token, "ContentSize") == 0)
583 || (strcmp(token, "MessageCount") == 0)
584 || (strcmp(token, "Validity") == 0)
585 || (strcmp(token, "KeepAliveTime") == 0)
586 || (strcmp(token, "TimeToLive") == 0)
587 || (strcmp(token, "AcceptedContentLength") == 0)
588 || (strcmp(token, "MultiTrans") == 0)
589 || (strcmp(token, "ParserSize") == 0)
590 || (strcmp(token, "ServerPollMin") == 0)
591 || (strcmp(token, "TCPPort") == 0)
592 || (strcmp(token, "UDPPort") == 0) ) )
594 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
597 if ( token && ( (strcmp(token, "DateTime") == 0)
598 || (strcmp(token, "DeliveryTime") == 0) ) )
600 str = wv_datetime_from_opaque(tvb, offset + *length, data_len);
603 if (str == NULL) { /* Error, or not parsed */
604 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
612 wv_csp12_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
613 guint8 token, guint8 codepage, guint32 *length)
615 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
619 case 0: /* Common code page */
621 case 0x0B: /* <Code> */
622 case 0x0F: /* <ContentSize> */
623 case 0x1A: /* <MessageCount> */
624 case 0x3C: /* <Validity> */
625 str = wv_integer_from_opaque(tvb,
626 offset + *length, data_len);
628 case 0x11: /* <DateTime> */
629 str = wv_datetime_from_opaque(tvb,
630 offset + *length, data_len);
636 case 1: /* Access code page */
638 case 0x1C: /* <KeepAliveTime> */
639 case 0x32: /* <TimeToLive> */
640 str = wv_integer_from_opaque(tvb,
641 offset + *length, data_len);
647 case 3: /* Client capability code page */
649 case 0x06: /* <AcceptedContentLength> */
650 case 0x0C: /* <MultiTrans> */
651 case 0x0D: /* <ParserSize> */
652 case 0x0E: /* <ServerPollMin> */
653 case 0x12: /* <TCPPort> */
654 case 0x13: /* <UDPPort> */
655 str = wv_integer_from_opaque(tvb,
656 offset + *length, data_len);
662 case 6: /* Messaging code page */
664 case 0x1A: /* <DeliveryTime> - not in 1.0 */
665 str = wv_datetime_from_opaque(tvb,
666 offset + *length, data_len);
672 case 9: /* Common code page (continued) */
674 case 0x08: /* <HistoryPeriod> - 1.2 only */
675 case 0x0A: /* <MaxWatcherList> - 1.2 only */
676 str = wv_integer_from_opaque(tvb,
677 offset + *length, data_len);
686 if (str == NULL) { /* Error, or not parsed */
687 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
695 wv_csp12_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
696 const char *token, guint8 codepage _U_, guint32 *length)
698 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
701 if ( token && ( (strcmp(token, "Code") == 0)
702 || (strcmp(token, "ContentSize") == 0)
703 || (strcmp(token, "MessageCount") == 0)
704 || (strcmp(token, "Validity") == 0)
705 || (strcmp(token, "KeepAliveTime") == 0)
706 || (strcmp(token, "TimeToLive") == 0)
707 || (strcmp(token, "AcceptedContentLength") == 0)
708 || (strcmp(token, "MultiTrans") == 0)
709 || (strcmp(token, "ParserSize") == 0)
710 || (strcmp(token, "ServerPollMin") == 0)
711 || (strcmp(token, "TCPPort") == 0)
712 || (strcmp(token, "UDPPort") == 0)
713 || (strcmp(token, "HistoryPeriod") == 0)
714 || (strcmp(token, "MaxWatcherList") == 0) ) )
716 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
719 if ( token && ( (strcmp(token, "DateTime") == 0)
720 || (strcmp(token, "DeliveryTime") == 0) ) )
722 str = wv_datetime_from_opaque(tvb, offset + *length, data_len);
725 if (str == NULL) { /* Error, or not parsed */
726 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
733 wv_csp13_opaque_binary_tag(tvbuff_t *tvb, guint32 offset,
734 guint8 token, guint8 codepage, guint32 *length)
736 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
741 case 0: /* Common code page */
744 case 0x0B: /* <Code> */
745 case 0x0F: /* <ContentSize> */
746 case 0x1A: /* <MessageCount> */
747 case 0x3C: /* <Validity> */
748 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
750 case 0x11: /* <DateTime> */
751 str = wv_datetime_from_opaque(tvb, offset + *length, data_len);
758 case 1: /* Access code page */
761 case 0x1C: /* <KeepAliveTime> */
762 case 0x25: /* <SearchFindings> */
763 case 0x26: /* <SearchID> */
764 case 0x27: /* <SearchIndex> */
765 case 0x28: /* <SearchLimit> */
766 case 0x32: /* <TimeToLive> */
767 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
774 case 3: /* Client capability code page */
777 case 0x06: /* <AcceptedContentLength> */
778 case 0x0C: /* <MultiTrans> */
779 case 0x0D: /* <ParserSize> */
780 case 0x0E: /* <ServerPollMin> */
781 case 0x12: /* <TCPPort> */
782 case 0x13: /* <UDPPort> */
783 /* New in WV-CSP 1.3*/
784 case 0x16: /* <AcceptedPullLength> */
785 case 0x17: /* <AcceptedPushLength> */
786 case 0x18: /* <AcceptedRichContentLength> */
787 case 0x19: /* <AcceptedTextContentLength> */
788 case 0x1B: /* <PlainTextCharset> MIBenum number - character set, i.e. UTF-8, windows-1251, etc. */
789 case 0x1C: /* <SessionPriority> */
790 case 0x1F: /* <UserSessionLimit> */
791 case 0x21: /* <MultiTransPerMessage> */
792 case 0x24: /* <ContentPolicyLimit> */
793 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
800 case 5: /* Presence attribute code page */
803 /* New in WV-CSP 1.3*/
804 /* case 0x3B: */ /* <ClientContentLimit> */
805 case 0x3C: /* <ClientIMPriority> */
806 case 0x3D: /* <MaxPullLength> */
807 case 0x3E: /* <MaxPushLength> */
808 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
815 case 6: /* Messaging code page */
818 case 0x1A: /* <DeliveryTime> - not in 1.0 */
819 /* New in WV-CSP 1.3*/
820 case 0x1C: /* <AnswerOptionID> */
821 str = wv_datetime_from_opaque(tvb, offset + *length, data_len);
828 case 9: /* Common code page (continued) */
831 case 0x08: /* <HistoryPeriod> - 1.2 only */
832 case 0x0A: /* <MaxWatcherList> - 1.2 only */
833 /* New in WV-CSP 1.3*/
834 case 0x25: /* <SegmentCount> */
835 case 0x28: /* <SegmentReference> */
836 case 0x30: /* <TryAgainTimeout> */
837 case 0x3A: /* <GroupContentLimit> */
838 case 0x3B: /* <MessageTotalCount> */
839 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
849 /* New in WV-CSP 1.3*/
850 case 0x0C: /* <PairID> */
851 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
862 { /* Error, or not parsed */
863 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
872 wv_csp13_opaque_literal_tag(tvbuff_t *tvb, guint32 offset,
873 const char *token, guint8 codepage _U_, guint32 *length)
875 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
878 if ( token && ( (strcmp(token, "Code") == 0)
879 || (strcmp(token, "ContentSize") == 0)
880 || (strcmp(token, "MessageCount") == 0)
881 || (strcmp(token, "Validity") == 0)
882 || (strcmp(token, "KeepAliveTime") == 0)
883 || (strcmp(token, "TimeToLive") == 0)
884 || (strcmp(token, "AcceptedContentLength") == 0)
885 || (strcmp(token, "MultiTrans") == 0)
886 || (strcmp(token, "ParserSize") == 0)
887 || (strcmp(token, "ServerPollMin") == 0)
888 || (strcmp(token, "TCPPort") == 0)
889 || (strcmp(token, "UDPPort") == 0)
890 || (strcmp(token, "HistoryPeriod") == 0)
891 || (strcmp(token, "MaxWatcherList") == 0)
892 /* New in WV-CSP 1.3*/
893 || (strcmp(token, "SearchFindings") == 0)
894 || (strcmp(token, "SearchID") == 0)
895 || (strcmp(token, "SearchIndex") == 0)
896 || (strcmp(token, "SearchLimit") == 0)
897 || (strcmp(token, "AcceptedPullLength") == 0)
898 || (strcmp(token, "AcceptedPushLength") == 0)
899 || (strcmp(token, "AcceptedRichContentLength") == 0)
900 || (strcmp(token, "AcceptedTextContentLength") == 0)
901 || (strcmp(token, "SessionPriority") == 0)
902 || (strcmp(token, "UserSessionLimit") == 0)
903 || (strcmp(token, "MultiTransPerMessage") == 0)
904 || (strcmp(token, "ContentPolicyLimit") == 0)
905 || (strcmp(token, "AnswerOptionID") == 0)
906 || (strcmp(token, "SegmentCount") == 0)
907 || (strcmp(token, "SegmentReference") == 0)
908 || (strcmp(token, "TryAgainTimeout") == 0)
909 || (strcmp(token, "GroupContentLimit") == 0)
910 || (strcmp(token, "MessageTotalCount") == 0)
911 || (strcmp(token, "PairID") == 0) ) )
913 str = wv_integer_from_opaque(tvb, offset + *length, data_len);
916 if ( token && ( (strcmp(token, "DateTime") == 0)
917 || (strcmp(token, "DeliveryTime") == 0) ) )
919 str = wv_datetime_from_opaque(tvb, offset + *length, data_len);
922 if (str == NULL) { /* Error, or not parsed */
923 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
930 sic10_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
931 const char *token, guint8 codepage _U_, guint32 *length)
933 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
936 if ( token && ( (strcmp(token, "created") == 0)
937 || (strcmp(token, "si-expires") == 0) ) )
939 str = date_time_from_opaque(tvb, offset + *length, data_len);
941 if (str == NULL) { /* Error, or not parsed */
942 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
950 sic10_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
951 guint8 token, guint8 codepage, guint32 *length)
953 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
957 case 0: /* Only valid codepage for SI */
959 case 0x0A: /* created= */
960 case 0x10: /* si-expires= */
961 str = date_time_from_opaque(tvb,
962 offset + *length, data_len);
971 if (str == NULL) { /* Error, or not parsed */
972 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
980 emnc10_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
981 const char *token, guint8 codepage _U_, guint32 *length)
983 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
986 if ( token && (strcmp(token, "timestamp") == 0) )
988 str = date_time_from_opaque(tvb, offset + *length, data_len);
990 if (str == NULL) { /* Error, or not parsed */
991 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
999 emnc10_opaque_binary_attr(tvbuff_t *tvb, guint32 offset,
1000 guint8 token, guint8 codepage, guint32 *length)
1002 guint32 data_len = tvb_get_guintvar(tvb, offset, length);
1006 case 0: /* Only valid codepage for EMN */
1008 case 0x05: /* timestamp= */
1009 str = date_time_from_opaque(tvb,
1010 offset + *length, data_len);
1019 if (str == NULL) { /* Error, or not parsed */
1020 str = g_strdup_printf("(%d bytes of unparsed opaque data)", data_len);
1022 *length += data_len;
1027 typedef struct _wbxml_decoding {
1030 ext_t_func_ptr ext_t[3];
1031 opaque_token_func_ptr opaque_binary_tag;
1032 opaque_literal_func_ptr opaque_literal_tag;
1033 opaque_token_func_ptr opaque_binary_attr;
1034 opaque_literal_func_ptr opaque_literal_attr;
1035 const value_valuestring *global;
1036 const value_valuestring *tags;
1037 const value_valuestring *attrStart;
1038 const value_valuestring *attrValue;
1041 /* Define a pointer to a discriminator function taking a tvb and the start
1042 * offset of the WBXML tokens in the body as arguments.
1044 typedef const wbxml_decoding * (* discriminator_func_ptr)(tvbuff_t *, guint32);
1046 /* For the decoding lists based on the known WBXML public ID */
1047 typedef struct _wbxml_integer_list {
1049 const wbxml_decoding *map;
1050 } wbxml_integer_list;
1052 /* For the decoding lists on the literal content type */
1053 typedef struct _wbxml_literal_list {
1054 const char *content_type;
1055 discriminator_func_ptr discriminator; /* TODO */
1056 const wbxml_decoding *map;
1057 } wbxml_literal_list;
1059 /************************** Variable declarations **************************/
1062 /* Initialize the protocol and registered fields */
1063 static int proto_wbxml = -1;
1064 static int hf_wbxml_version = -1;
1065 static int hf_wbxml_public_id_known = -1;
1066 static int hf_wbxml_public_id_literal = -1;
1067 static int hf_wbxml_charset = -1;
1069 /* Initialize the subtree pointers */
1070 static gint ett_wbxml = -1;
1071 static gint ett_wbxml_str_tbl = -1;
1072 static gint ett_wbxml_content = -1;
1074 /* WBXML Preferences */
1075 static gboolean skip_wbxml_token_mapping = FALSE;
1076 static gboolean disable_wbxml_token_parsing = FALSE;
1079 /**************** WBXML related declarations and definitions ****************/
1082 /* WBXML public ID mappings. For an up-to-date list, see
1083 * http://www.openmobilealliance.org/tech/omna/ */
1084 static const value_string vals_wbxml_public_ids[] = {
1085 /* 0x00 = literal public identifier */
1086 { 0x01, "Unknown or missing Public Identifier" },
1087 { 0x02, "-//WAPFORUM//DTD WML 1.0//EN (WML 1.0)" },
1088 { 0x03, "-//WAPFORUM//DTD WTA 1.0//EN (WTA Event 1.0) - Deprecated" },
1089 { 0x04, "-//WAPFORUM//DTD WML 1.1//EN (WML 1.1)" },
1090 { 0x05, "-//WAPFORUM//DTD SI 1.0//EN (Service Indication 1.0)" },
1091 { 0x06, "-//WAPFORUM//DTD SL 1.0//EN (Service Loading 1.0)" },
1092 { 0x07, "-//WAPFORUM//DTD CO 1.0//EN (Cache Operation 1.0)" },
1093 { 0x08, "-//WAPFORUM//DTD CHANNEL 1.1//EN (Channel 1.1)" },
1094 { 0x09, "-//WAPFORUM//DTD WML 1.2//EN (WML 1.2)" },
1095 { 0x0a, "-//WAPFORUM//DTD WML 1.3//EN (WML 1.3)" },
1096 { 0x0b, "-//WAPFORUM//DTD PROV 1.0//EN (Provisioning 1.0)" },
1097 { 0x0c, "-//WAPFORUM//DTD WTA-WML 1.2//EN (WTA-WML 1.2)" },
1098 { 0x0d, "-//WAPFORUM//DTD EMN 1.0//EN (Email Notification 1.0)" },
1099 { 0x0e, "-//WAPFORUM//DTD DRMREL 1.0//EN (DRMREL 1.0)" },
1100 { 0x0f, "-//WIRELESSVILLAGE//DTD CSP 1.0//EN"
1101 " (Wireless Village Client-Server Protocol DTD v1.0)" },
1102 { 0x10, "-//WIRELESSVILLAGE//DTD CSP 1.1//EN"
1103 " (Wireless Village Client-Server Protocol DTD v1.1)" },
1104 { 0x11, "-//OMA//DTD WV-CSP 1.2//EN (OMA IMPS - CSP protocol DTD v1.2)" },
1105 { 0x12, "-//OMA//DTD IMPS-CSP 1.3//EN (OMA IMPS - CSP protocol DTD v1.3)" },
1106 { 0x13, "-//OMA//DRM 2.1//EN (OMA DRM 2.1)" },
1107 /* 0x14 -- 0x7F: reserved */
1109 /* Registered values - www.syncml.org */
1110 { 0x0fd1, "-//SYNCML//DTD SyncML 1.0//EN (SyncML 1.0)" },
1111 { 0x0fd3, "-//SYNCML//DTD SyncML 1.1//EN (SyncML 1.1)" },
1113 /* Registered values - www.wapforum.org/wina/ */
1114 { 0x1100, "-//PHONE.COM//DTD ALERT 1.0//EN" },
1115 { 0x1101, "-//PHONE.COM//DTD CACHE-OPERATION 1.0//EN" },
1116 { 0x1102, "-//PHONE.COM//DTD SIGNAL 1.0//EN" },
1117 { 0x1103, "-//PHONE.COM//DTD LIST 1.0//EN" },
1118 { 0x1104, "-//PHONE.COM//DTD LISTCMD 1.0//EN" },
1119 { 0x1105, "-//PHONE.COM//DTD CHANNEL 1.0//EN" },
1120 { 0x1106, "-//PHONE.COM//DTD MMC 1.0//EN" },
1121 { 0x1107, "-//PHONE.COM//DTD BEARER-CHOICE 1.0//EN" },
1122 { 0x1108, "-//PHONE.COM//DTD WML 1.1//EN (WML+ 1.1)" },
1123 { 0x1109, "-//PHONE.COM//DTD CHANNEL 1.1//EN" },
1124 { 0x110a, "-//PHONE.COM//DTD LIST 1.1//EN" },
1125 { 0x110b, "-//PHONE.COM//DTD LISTCMD 1.1//EN" },
1126 { 0x110c, "-//PHONE.COM//DTD MMC 1.1//EN" },
1127 { 0x110d, "-//PHONE.COM//DTD WML 1.3//EN (WML+ 1.3)" },
1128 { 0x110e, "-//PHONE.COM//DTD MMC 2.0//EN" },
1129 /* 0x110F -- 0x11FF: unassigned */
1130 { 0x1200, "-//3GPP2.COM//DTD IOTA 1.0//EN" },
1131 { 0x1201, "-//SYNCML//DTD SyncML 1.2//EN" },
1132 { 0x1202, "-//SYNCML//DTD MetaInf 1.2//EN" },
1133 { 0x1203, "-//SYNCML//DTD DevInf 1.2//EN" },
1134 { 0x1204, "-//NOKIA//DTD LANDMARKS 1.0//EN" },
1139 static const value_string vals_wbxml_versions[] = {
1140 { 0x00, "1.0" }, /* WAP-104-WBXML */
1141 { 0x01, "1.1" }, /* WAP-135-WBXML */
1142 { 0x02, "1.2" }, /* WAP-154-WBXML */
1143 { 0x03, "1.3" }, /* WAP-192-WBXML */
1148 /* WBXML 1.0 global tokens: WAP-104-WBXML
1149 * Same token mapping as in vals_wbxml1x_global_tokens, but:
1150 * { 0xC3, "RESERVED_2" }
1153 /* WBXML 1.x (x>0) global tokens: WAP-135-WBXML, WAP-154-WBXML, WAP-192-WBXML
1155 static const value_string vals_wbxml1x_global_tokens[] = {
1156 { 0x00, "SWITCH_PAGE" },
1160 { 0x04, "LITERAL" },
1162 { 0x40, "EXT_I_0" },
1163 { 0x41, "EXT_I_1" },
1164 { 0x42, "EXT_I_2" },
1166 { 0x44, "LITERAL_C" },
1168 { 0x80, "EXT_T_0" },
1169 { 0x81, "EXT_T_1" },
1170 { 0x82, "EXT_T_2" },
1172 { 0x84, "LITERAL_A" },
1178 { 0xC4, "LITERAL_AC" },
1187 /********************** WBXML token mapping definition **********************/
1190 * NOTE: Please make sure the Attribute Start values all contain an equal sign
1191 * even in cases where they do not contain the start of an Attribute
1198 * Wireless Markup Language
1199 ***************************************/
1201 ext_t_0_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
1203 gint str_len = tvb_strsize (tvb, str_tbl + value);
1204 char *str = g_strdup_printf("Variable substitution - escaped: '%s'",
1205 tvb_get_ptr(tvb, str_tbl + value, str_len));
1210 ext_t_1_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
1212 gint str_len = tvb_strsize (tvb, str_tbl + value);
1213 char *str = g_strdup_printf("Variable substitution - unescaped: '%s'",
1214 tvb_get_ptr(tvb, str_tbl + value, str_len));
1219 ext_t_2_wml_10(tvbuff_t *tvb, guint32 value, guint32 str_tbl)
1221 gint str_len = tvb_strsize (tvb, str_tbl + value);
1222 char *str = g_strdup_printf("Variable substitution - no transformation: '%s'",
1223 tvb_get_ptr(tvb, str_tbl + value, str_len));
1226 /***** Global extension tokens *****/
1227 static const value_string wbxml_wmlc10_global_cp0[] = {
1228 { 0x40, "Variable substitution - escaped" },
1229 { 0x41, "Variable substitution - unescaped" },
1230 { 0x42, "Variable substitution - no transformation" },
1231 { 0x80, "Variable substitution - escaped" },
1232 { 0x81, "Variable substitution - unescaped" },
1233 { 0x82, "Variable substitution - no transformation" },
1234 { 0xC0, "Reserved" },
1235 { 0xC1, "Reserved" },
1236 { 0xC2, "Reserved" },
1241 /***** Tag tokens *****/
1242 static const value_string wbxml_wmlc10_tags_cp0[] = {
1243 /* 0x00 -- 0x04 GLOBAL */
1253 { 0x2A, "FIELDSET" },
1262 { 0x33, "ONEVENT" },
1263 { 0x34, "OPTGROUP" },
1265 { 0x36, "REFRESH" },
1270 { 0x3B, "TEMPLATE" },
1279 /***** Attribute Start tokens *****/
1280 static const value_string wbxml_wmlc10_attrStart_cp0[] = {
1281 /* 0x00 -- 0x04 GLOBAL */
1282 { 0x05, "ACCEPT-CHARSET=" },
1283 { 0x06, "ALIGN='BOTTOM'" },
1284 { 0x07, "ALIGN='CENTER'" },
1285 { 0x08, "ALIGN='LEFT'" },
1286 { 0x09, "ALIGN='MIDDLE'" },
1287 { 0x0A, "ALIGN='RIGHT'" },
1288 { 0x0B, "ALIGN='TOP'" },
1290 { 0x0D, "CONTENT=" },
1291 { 0x0E, "DEFAULT=" },
1292 { 0x0F, "DOMAIN=" },
1293 { 0x10, "EMPTYOK='FALSE'" },
1294 { 0x11, "EMPTYOK='TRUE'" },
1295 { 0x12, "FORMAT=" },
1296 { 0x13, "HEIGHT=" },
1297 { 0x14, "HSPACE=" },
1298 { 0x15, "IDEFAULT=" },
1302 { 0x19, "LOCALSRC=" },
1303 { 0x1A, "MAXLENGTH=" },
1304 { 0x1B, "METHOD='GET'" },
1305 { 0x1C, "METHOD='POST'" },
1306 { 0x1D, "MODE='NOWRAP'" },
1307 { 0x1E, "MODE='WRAP'" },
1308 { 0x1F, "MULTIPLE='FALSE'" },
1309 { 0x20, "MULTIPLE='TRUE'" },
1311 { 0x22, "NEWCONTEXT='FALSE'" },
1312 { 0x23, "NEWCONTEXT='TRUE'" },
1313 { 0x24, "ONCLICK=" },
1314 { 0x25, "ONENTERBACKWARD=" },
1315 { 0x26, "ONENTERFORWARD=" },
1316 { 0x27, "ONTIMER=" },
1317 { 0x28, "OPTIONAL='FALSE'" },
1318 { 0x29, "OPTIONAL='TRUE'" },
1320 { 0x2B, "POSTDATA=" },
1321 { 0x2C, "PUBLIC='FALSE'" },
1322 { 0x2D, "PUBLIC='TRUE'" },
1323 { 0x2E, "SCHEME=" },
1324 { 0x2F, "SENDREFERER='FALSE'" },
1325 { 0x30, "SENDREFERER='TRUE'" },
1328 { 0x33, "STYLE='LIST'" },
1329 { 0x34, "STYLE='SET'" },
1330 { 0x35, "TABINDEX=" },
1333 { 0x38, "TYPE='ACCEPT'" },
1334 { 0x39, "TYPE='DELETE'" },
1335 { 0x3A, "TYPE='HELP'" },
1336 { 0x3B, "TYPE='PASSWORD'" },
1337 { 0x3C, "TYPE='ONCLICK'" },
1338 { 0x3D, "TYPE='ONENTERBACKWARD'" },
1339 { 0x3E, "TYPE='ONENTERFORWARD'" },
1340 { 0x3F, "TYPE='ONTIMER'" },
1341 /* 0x40 -- 0x44 GLOBAL */
1342 { 0x45, "TYPE='OPTIONS'" },
1343 { 0x46, "TYPE='PREV'" },
1344 { 0x47, "TYPE='RESET'" },
1345 { 0x48, "TYPE='TEXT'" },
1346 { 0x49, "TYPE='vnd.'" },
1348 { 0x4B, "URL='http://'" },
1349 { 0x4C, "URL='https://'" },
1350 { 0x4D, "USER-AGENT=" },
1352 { 0x4F, "VSPACE=" },
1354 { 0x51, "xml:lang=" },
1359 /***** Attribute Value tokens *****/
1360 static const value_string wbxml_wmlc10_attrValue_cp0[] = {
1361 /* 0x80 -- 0x84 GLOBAL */
1362 { 0x85, "'.com/'" },
1363 { 0x86, "'.edu/'" },
1364 { 0x87, "'.net/'" },
1365 { 0x88, "'.org/'" },
1366 { 0x89, "'ACCEPT'" },
1367 { 0x8A, "'BOTTOM'" },
1368 { 0x8B, "'CLEAR'" },
1369 { 0x8C, "'DELETE'" },
1371 { 0x8E, "'http://'" },
1372 { 0x8F, "'http://www.'" },
1373 { 0x90, "'https://'" },
1374 { 0x91, "'https://www.'" },
1376 { 0x93, "'MIDDLE'" },
1377 { 0x94, "'NOWRAP'" },
1378 { 0x95, "'ONCLICK'" },
1379 { 0x96, "'ONENTERBACKWARD'" },
1380 { 0x97, "'ONENTERFORWARD'" },
1381 { 0x98, "'ONTIMER'" },
1382 { 0x99, "'OPTIONS'" },
1383 { 0x9A, "'PASSWORD'" },
1384 { 0x9B, "'RESET'" },
1388 { 0x9F, "'UNKNOWN'" },
1395 /***** Token code page aggregation *****/
1396 static const value_valuestring wbxml_wmlc10_global[] = {
1397 { 0, wbxml_wmlc10_global_cp0 },
1401 static const value_valuestring wbxml_wmlc10_tags[] = {
1402 { 0, wbxml_wmlc10_tags_cp0 },
1406 static const value_valuestring wbxml_wmlc10_attrStart[] = {
1407 { 0, wbxml_wmlc10_attrStart_cp0 },
1411 static const value_valuestring wbxml_wmlc10_attrValue[] = {
1412 { 0, wbxml_wmlc10_attrValue_cp0 },
1416 static const wbxml_decoding decode_wmlc_10 = {
1417 "Wireless Markup Language 1.0",
1419 { ext_t_0_wml_10, ext_t_1_wml_10, ext_t_2_wml_10 },
1420 default_opaque_binary_tag,
1421 default_opaque_literal_tag,
1422 default_opaque_binary_attr,
1423 default_opaque_literal_attr,
1424 wbxml_wmlc10_global,
1426 wbxml_wmlc10_attrStart,
1427 wbxml_wmlc10_attrValue
1435 * Wireless Markup Language
1436 ***************************************/
1438 /***** Global extension tokens *****/
1439 /* Same as in WML 1.0 */
1441 /***** Tag tokens *****/
1442 static const value_string wbxml_wmlc11_tags_cp0[] = {
1443 /* 0x00 -- 0x04 GLOBAL */
1450 { 0x21, "postfield" },
1459 { 0x2A, "fieldset" },
1468 { 0x33, "onevent" },
1469 { 0x34, "optgroup" },
1471 { 0x36, "refresh" },
1476 { 0x3B, "template" },
1485 /***** Attribute Start tokens *****/
1486 static const value_string wbxml_wmlc11_attrStart_cp0[] = {
1487 /* 0x00 -- 0x04 GLOBAL */
1488 { 0x05, "accept-charset=" },
1489 { 0x06, "align='bottom'" },
1490 { 0x07, "align='center'" },
1491 { 0x08, "align='left'" },
1492 { 0x09, "align='middle'" },
1493 { 0x0A, "align='right'" },
1494 { 0x0B, "align='top'" },
1496 { 0x0D, "content=" },
1498 { 0x0F, "domain=" },
1499 { 0x10, "emptyok='false'" },
1500 { 0x11, "emptyok='true'" },
1501 { 0x12, "format=" },
1502 { 0x13, "height=" },
1503 { 0x14, "hspace=" },
1504 { 0x15, "ivalue=" },
1508 { 0x19, "localsrc=" },
1509 { 0x1A, "maxlength=" },
1510 { 0x1B, "method='get'" },
1511 { 0x1C, "method='post'" },
1512 { 0x1D, "mode='nowrap'" },
1513 { 0x1E, "mode='wrap'" },
1514 { 0x1F, "multiple='false'" },
1515 { 0x20, "multiple='true'" },
1517 { 0x22, "newcontext='false'" },
1518 { 0x23, "newcontext='true'" },
1519 { 0x24, "onpick=" },
1520 { 0x25, "onenterbackward=" },
1521 { 0x26, "onenterforward=" },
1522 { 0x27, "ontimer=" },
1523 { 0x28, "optional='false'" },
1524 { 0x29, "optional='true'" },
1527 { 0x2E, "scheme=" },
1528 { 0x2F, "sendreferer='false'" },
1529 { 0x30, "sendreferer='true'" },
1532 { 0x33, "ordered='false'" },
1533 { 0x34, "ordered='true'" },
1534 { 0x35, "tabindex=" },
1537 { 0x38, "type='accept'" },
1538 { 0x39, "type='delete'" },
1539 { 0x3A, "type='help'" },
1540 { 0x3B, "type='password'" },
1541 { 0x3C, "type='onpick'" },
1542 { 0x3D, "type='onenterbackward'" },
1543 { 0x3E, "type='onenterforward'" },
1544 { 0x3F, "type='ontimer'" },
1545 /* 0x40 -- 0x44 GLOBAL */
1546 { 0x45, "type='options'" },
1547 { 0x46, "type='prev'" },
1548 { 0x47, "type='reset'" },
1549 { 0x48, "type='text'" },
1550 { 0x49, "type='vnd.'" },
1552 { 0x4B, "href='http://'" },
1553 { 0x4C, "href='https://'" },
1555 { 0x4E, "vspace=" },
1557 { 0x50, "xml:lang=" },
1560 { 0x53, "columns=" },
1563 { 0x56, "forua='false'" },
1564 { 0x57, "forua='true'" },
1565 { 0x58, "src='http://'" },
1566 { 0x59, "src='https://'" },
1567 { 0x5A, "http-equiv=" },
1568 { 0x5B, "http-equiv='Content-Type'" },
1569 { 0x5C, "content='application/vnd.wap.wmlc;charset='" },
1570 { 0x5D, "http-equiv='Expires'" },
1575 /***** Attribute Value tokens *****/
1576 static const value_string wbxml_wmlc11_attrValue_cp0[] = {
1577 /* 0x80 -- 0x84 GLOBAL */
1578 { 0x85, "'.com/'" },
1579 { 0x86, "'.edu/'" },
1580 { 0x87, "'.net/'" },
1581 { 0x88, "'.org/'" },
1582 { 0x89, "'accept'" },
1583 { 0x8A, "'bottom'" },
1584 { 0x8B, "'clear'" },
1585 { 0x8C, "'delete'" },
1587 { 0x8E, "'http://'" },
1588 { 0x8F, "'http://www.'" },
1589 { 0x90, "'https://'" },
1590 { 0x91, "'https://www.'" },
1592 { 0x93, "'middle'" },
1593 { 0x94, "'nowrap'" },
1594 { 0x95, "'onpick'" },
1595 { 0x96, "'onenterbackward'" },
1596 { 0x97, "'onenterforward'" },
1597 { 0x98, "'ontimer'" },
1598 { 0x99, "'options'" },
1599 { 0x9A, "'password'" },
1600 { 0x9B, "'reset'" },
1604 { 0x9F, "'unknown'" },
1611 /***** Token code page aggregation *****/
1612 static const value_valuestring wbxml_wmlc11_global[] = {
1613 { 0, wbxml_wmlc10_global_cp0 }, /* Same as WML 1.0 */
1617 static const value_valuestring wbxml_wmlc11_tags[] = {
1618 { 0, wbxml_wmlc11_tags_cp0 },
1622 static const value_valuestring wbxml_wmlc11_attrStart[] = {
1623 { 0, wbxml_wmlc11_attrStart_cp0 },
1627 static const value_valuestring wbxml_wmlc11_attrValue[] = {
1628 { 0, wbxml_wmlc11_attrValue_cp0 },
1632 static const wbxml_decoding decode_wmlc_11 = {
1633 "Wireless Markup Language 1.1",
1635 { ext_t_0_wml_10, ext_t_1_wml_10, ext_t_2_wml_10 },
1636 default_opaque_binary_tag,
1637 default_opaque_literal_tag,
1638 default_opaque_binary_attr,
1639 default_opaque_literal_attr,
1640 wbxml_wmlc11_global,
1642 wbxml_wmlc11_attrStart,
1643 wbxml_wmlc11_attrValue
1652 * Wireless Markup Language
1653 ***************************************/
1655 /***** Global extension tokens *****/
1656 /* Same as in WML 1.0 */
1658 /***** Tag tokens *****/
1659 static const value_string wbxml_wmlc12_tags_cp0[] = {
1660 /* 0x00 -- 0x04 GLOBAL */
1668 { 0x21, "postfield" },
1677 { 0x2A, "fieldset" },
1686 { 0x33, "onevent" },
1687 { 0x34, "optgroup" },
1689 { 0x36, "refresh" },
1694 { 0x3B, "template" },
1703 /***** Attribute Start tokens *****/
1704 static const value_string wbxml_wmlc12_attrStart_cp0[] = {
1705 /* 0x00 -- 0x04 GLOBAL */
1706 { 0x05, "accept-charset=" },
1707 { 0x06, "align='bottom'" },
1708 { 0x07, "align='center'" },
1709 { 0x08, "align='left'" },
1710 { 0x09, "align='middle'" },
1711 { 0x0A, "align='right'" },
1712 { 0x0B, "align='top'" },
1714 { 0x0D, "content=" },
1716 { 0x0F, "domain=" },
1717 { 0x10, "emptyok='false'" },
1718 { 0x11, "emptyok='true'" },
1719 { 0x12, "format=" },
1720 { 0x13, "height=" },
1721 { 0x14, "hspace=" },
1722 { 0x15, "ivalue=" },
1726 { 0x19, "localsrc=" },
1727 { 0x1A, "maxlength=" },
1728 { 0x1B, "method='get'" },
1729 { 0x1C, "method='post'" },
1730 { 0x1D, "mode='nowrap'" },
1731 { 0x1E, "mode='wrap'" },
1732 { 0x1F, "multiple='false'" },
1733 { 0x20, "multiple='true'" },
1735 { 0x22, "newcontext='false'" },
1736 { 0x23, "newcontext='true'" },
1737 { 0x24, "onpick=" },
1738 { 0x25, "onenterbackward=" },
1739 { 0x26, "onenterforward=" },
1740 { 0x27, "ontimer=" },
1741 { 0x28, "optional='false'" },
1742 { 0x29, "optional='true'" },
1745 { 0x2E, "scheme=" },
1746 { 0x2F, "sendreferer='false'" },
1747 { 0x30, "sendreferer='true'" },
1750 { 0x33, "ordered='false'" },
1751 { 0x34, "ordered='true'" },
1752 { 0x35, "tabindex=" },
1755 { 0x38, "type='accept'" },
1756 { 0x39, "type='delete'" },
1757 { 0x3A, "type='help'" },
1758 { 0x3B, "type='password'" },
1759 { 0x3C, "type='onpick'" },
1760 { 0x3D, "type='onenterbackward'" },
1761 { 0x3E, "type='onenterforward'" },
1762 { 0x3F, "type='ontimer'" },
1763 /* 0x40 -- 0x44 GLOBAL */
1764 { 0x45, "type='options'" },
1765 { 0x46, "type='prev'" },
1766 { 0x47, "type='reset'" },
1767 { 0x48, "type='text'" },
1768 { 0x49, "type='vnd.'" },
1770 { 0x4B, "href='http://'" },
1771 { 0x4C, "href='https://'" },
1773 { 0x4E, "vspace=" },
1775 { 0x50, "xml:lang=" },
1778 { 0x53, "columns=" },
1781 { 0x56, "forua='false'" },
1782 { 0x57, "forua='true'" },
1783 { 0x58, "src='http://'" },
1784 { 0x59, "src='https://'" },
1785 { 0x5A, "http-equiv=" },
1786 { 0x5B, "http-equiv='Content-Type'" },
1787 { 0x5C, "content='application/vnd.wap.wmlc;charset='" },
1788 { 0x5D, "http-equiv='Expires'" },
1789 { 0x5E, "accesskey=" },
1790 { 0x5F, "enctype=" },
1791 { 0x60, "enctype='application/x-www-form-urlencoded'" },
1792 { 0x61, "enctype='multipart/form-data'" },
1797 /***** Attribute Value tokens *****/
1798 /* Same as in WML 1.1 */
1800 /***** Token code page aggregation *****/
1801 static const value_valuestring wbxml_wmlc12_global[] = {
1802 { 0, wbxml_wmlc10_global_cp0 }, /* Same as WML 1.0 */
1806 static const value_valuestring wbxml_wmlc12_tags[] = {
1807 { 0, wbxml_wmlc12_tags_cp0 },
1811 static const value_valuestring wbxml_wmlc12_attrStart[] = {
1812 { 0, wbxml_wmlc12_attrStart_cp0 },
1816 static const value_valuestring wbxml_wmlc12_attrValue[] = {
1817 { 0, wbxml_wmlc11_attrValue_cp0 }, /* Same as WML 1.1 */
1821 static const wbxml_decoding decode_wmlc_12 = {
1822 "Wireless Markup Language 1.2",
1824 { ext_t_0_wml_10, ext_t_1_wml_10, ext_t_2_wml_10 },
1825 default_opaque_binary_tag,
1826 default_opaque_literal_tag,
1827 default_opaque_binary_attr,
1828 default_opaque_literal_attr,
1829 wbxml_wmlc12_global,
1831 wbxml_wmlc12_attrStart,
1832 wbxml_wmlc12_attrValue
1841 * Wireless Markup Language
1842 ***************************************/
1844 /***** Global extension tokens *****/
1845 /* Same as in WML 1.0 */
1847 /***** Tag tokens *****/
1848 /* Same as in WML 1.2 */
1850 /***** Attribute Start tokens *****/
1851 static const value_string wbxml_wmlc13_attrStart_cp0[] = {
1852 /* 0x00 -- 0x04 GLOBAL */
1853 { 0x05, "accept-charset=" },
1854 { 0x06, "align='bottom'" },
1855 { 0x07, "align='center'" },
1856 { 0x08, "align='left'" },
1857 { 0x09, "align='middle'" },
1858 { 0x0A, "align='right'" },
1859 { 0x0B, "align='top'" },
1861 { 0x0D, "content=" },
1863 { 0x0F, "domain=" },
1864 { 0x10, "emptyok='false'" },
1865 { 0x11, "emptyok='true'" },
1866 { 0x12, "format=" },
1867 { 0x13, "height=" },
1868 { 0x14, "hspace=" },
1869 { 0x15, "ivalue=" },
1873 { 0x19, "localsrc=" },
1874 { 0x1A, "maxlength=" },
1875 { 0x1B, "method='get'" },
1876 { 0x1C, "method='post'" },
1877 { 0x1D, "mode='nowrap'" },
1878 { 0x1E, "mode='wrap'" },
1879 { 0x1F, "multiple='false'" },
1880 { 0x20, "multiple='true'" },
1882 { 0x22, "newcontext='false'" },
1883 { 0x23, "newcontext='true'" },
1884 { 0x24, "onpick=" },
1885 { 0x25, "onenterbackward=" },
1886 { 0x26, "onenterforward=" },
1887 { 0x27, "ontimer=" },
1888 { 0x28, "optional='false'" },
1889 { 0x29, "optional='true'" },
1892 { 0x2E, "scheme=" },
1893 { 0x2F, "sendreferer='false'" },
1894 { 0x30, "sendreferer='true'" },
1897 { 0x33, "ordered='false'" },
1898 { 0x34, "ordered='true'" },
1899 { 0x35, "tabindex=" },
1902 { 0x38, "type='accept'" },
1903 { 0x39, "type='delete'" },
1904 { 0x3A, "type='help'" },
1905 { 0x3B, "type='password'" },
1906 { 0x3C, "type='onpick'" },
1907 { 0x3D, "type='onenterbackward'" },
1908 { 0x3E, "type='onenterforward'" },
1909 { 0x3F, "type='ontimer'" },
1910 /* 0x40 -- 0x44 GLOBAL */
1911 { 0x45, "type='options'" },
1912 { 0x46, "type='prev'" },
1913 { 0x47, "type='reset'" },
1914 { 0x48, "type='text'" },
1915 { 0x49, "type='vnd.'" },
1917 { 0x4B, "href='http://'" },
1918 { 0x4C, "href='https://'" },
1920 { 0x4E, "vspace=" },
1922 { 0x50, "xml:lang=" },
1925 { 0x53, "columns=" },
1928 { 0x56, "forua='false'" },
1929 { 0x57, "forua='true'" },
1930 { 0x58, "src='http://'" },
1931 { 0x59, "src='https://'" },
1932 { 0x5A, "http-equiv=" },
1933 { 0x5B, "http-equiv='Content-Type'" },
1934 { 0x5C, "content='application/vnd.wap.wmlc;charset='" },
1935 { 0x5D, "http-equiv='Expires'" },
1936 { 0x5E, "accesskey=" },
1937 { 0x5F, "enctype=" },
1938 { 0x60, "enctype='application/x-www-form-urlencoded'" },
1939 { 0x61, "enctype='multipart/form-data'" },
1940 { 0x62, "xml:space='preserve'" },
1941 { 0x63, "xml:space='default'" },
1942 { 0x64, "cache-control='no-cache'" },
1947 /***** Attribute Value tokens *****/
1948 /* Same as in WML 1.1 */
1950 /***** Token code page aggregation *****/
1951 static const value_valuestring wbxml_wmlc13_global[] = {
1952 { 0, wbxml_wmlc10_global_cp0 }, /* Same as WML 1.0 */
1956 static const value_valuestring wbxml_wmlc13_tags[] = {
1957 { 0, wbxml_wmlc12_tags_cp0 },
1961 static const value_valuestring wbxml_wmlc13_attrStart[] = {
1962 { 0, wbxml_wmlc13_attrStart_cp0 },
1966 static const value_valuestring wbxml_wmlc13_attrValue[] = {
1967 { 0, wbxml_wmlc11_attrValue_cp0 }, /* Same as WML 1.1 */
1971 static const wbxml_decoding decode_wmlc_13 = {
1972 "Wireless Markup Language 1.3",
1974 { ext_t_0_wml_10, ext_t_1_wml_10, ext_t_2_wml_10 },
1975 default_opaque_binary_tag,
1976 default_opaque_literal_tag,
1977 default_opaque_binary_attr,
1978 default_opaque_literal_attr,
1979 wbxml_wmlc13_global,
1981 wbxml_wmlc13_attrStart,
1982 wbxml_wmlc13_attrValue
1991 * Service Indication
1992 ***************************************/
1994 /***** Global extension tokens *****/
1996 /***** Tag tokens *****/
1997 static const value_string wbxml_sic10_tags_cp0[] = {
1998 /* 0x00 -- 0x04 GLOBAL */
2000 { 0x06, "indication" },
2007 /***** Attribute Start tokens *****/
2008 static const value_string wbxml_sic10_attrStart_cp0[] = {
2009 /* 0x00 -- 0x04 GLOBAL */
2010 { 0x05, "action='signal-none'" },
2011 { 0x06, "action='signal-low'" },
2012 { 0x07, "action='signal-medium'" },
2013 { 0x08, "action='signal-high'" },
2014 { 0x09, "action='delete'" },
2015 { 0x0a, "created=" },
2017 { 0x0c, "href='http://'" },
2018 { 0x0d, "href='http://www.'" },
2019 { 0x0e, "href='https://'" },
2020 { 0x0f, "href='https://www.'" },
2021 { 0x10, "si-expires=" },
2028 /***** Attribute Value tokens *****/
2029 static const value_string wbxml_sic10_attrValue_cp0[] = {
2030 /* 0x80 -- 0x84 GLOBAL */
2031 { 0x85, "'.com/'" },
2032 { 0x86, "'.edu/'" },
2033 { 0x87, "'.net/'" },
2034 { 0x88, "'.org/'" },
2039 /***** Token code page aggregation *****/
2040 static const value_valuestring wbxml_sic10_tags[] = {
2041 { 0, wbxml_sic10_tags_cp0 },
2045 static const value_valuestring wbxml_sic10_attrStart[] = {
2046 { 0, wbxml_sic10_attrStart_cp0 },
2050 static const value_valuestring wbxml_sic10_attrValue[] = {
2051 { 0, wbxml_sic10_attrValue_cp0 },
2055 static const wbxml_decoding decode_sic_10 = {
2056 "Service Indication 1.0",
2058 { NULL, NULL, NULL },
2059 default_opaque_binary_tag,
2060 default_opaque_literal_tag,
2061 sic10_opaque_binary_attr,
2062 sic10_opaque_literal_attr,
2065 wbxml_sic10_attrStart,
2066 wbxml_sic10_attrValue
2076 ***************************************/
2078 /***** Global extension tokens *****/
2080 /***** Tag tokens *****/
2081 static const value_string wbxml_slc10_tags_cp0[] = {
2082 /* 0x00 -- 0x04 GLOBAL */
2088 /***** Attribute Start tokens *****/
2089 static const value_string wbxml_slc10_attrStart_cp0[] = {
2090 /* 0x00 -- 0x04 GLOBAL */
2091 { 0x05, "action='execute-low'" },
2092 { 0x06, "action='execute-high'" },
2093 { 0x07, "action='cache'" },
2095 { 0x09, "href='http://'" },
2096 { 0x0a, "href='http://www.'" },
2097 { 0x0b, "href='https://'" },
2098 { 0x0c, "href='https://www.'" },
2103 /***** Attribute Value tokens *****/
2104 /* Same as in SI 1.0 */
2106 /***** Token code page aggregation *****/
2107 static const value_valuestring wbxml_slc10_tags[] = {
2108 { 0, wbxml_slc10_tags_cp0 },
2112 static const value_valuestring wbxml_slc10_attrStart[] = {
2113 { 0, wbxml_slc10_attrStart_cp0 },
2117 static const value_valuestring wbxml_slc10_attrValue[] = {
2118 { 0, wbxml_sic10_attrValue_cp0 }, /* Same as SI 1.0 */
2122 static const wbxml_decoding decode_slc_10 = {
2123 "Service Loading 1.0",
2125 { NULL, NULL, NULL },
2126 default_opaque_binary_tag,
2127 default_opaque_literal_tag,
2128 default_opaque_binary_attr,
2129 default_opaque_literal_attr,
2132 wbxml_slc10_attrStart,
2133 wbxml_slc10_attrValue
2143 ***************************************/
2145 /***** Global extension tokens *****/
2147 /***** Tag tokens *****/
2148 static const value_string wbxml_coc10_tags_cp0[] = {
2149 /* 0x00 -- 0x04 GLOBAL */
2151 { 0x06, "invalidate-object" },
2152 { 0x07, "invalidate-service" },
2157 /***** Attribute Start tokens *****/
2158 static const value_string wbxml_coc10_attrStart_cp0[] = {
2159 /* 0x00 -- 0x04 GLOBAL */
2161 { 0x06, "uri='http://'" },
2162 { 0x07, "uri='http://www.'" },
2163 { 0x08, "uri='https://'" },
2164 { 0x09, "uri='https://www.'" },
2169 /***** Attribute Value tokens *****/
2170 /* Same as in SI 1.0 */
2172 /***** Token code page aggregation *****/
2173 static const value_valuestring wbxml_coc10_tags[] = {
2174 { 0, wbxml_coc10_tags_cp0 },
2178 static const value_valuestring wbxml_coc10_attrStart[] = {
2179 { 0, wbxml_coc10_attrStart_cp0 },
2183 static const value_valuestring wbxml_coc10_attrValue[] = {
2184 { 0, wbxml_sic10_attrValue_cp0 }, /* Same as SI 1.0 */
2188 static const wbxml_decoding decode_coc_10 = {
2189 "Cache Operation 1.0",
2191 { NULL, NULL, NULL },
2192 default_opaque_binary_tag,
2193 default_opaque_literal_tag,
2194 default_opaque_binary_attr,
2195 default_opaque_literal_attr,
2198 wbxml_coc10_attrStart,
2199 wbxml_coc10_attrValue
2208 * Client Provisioning
2209 ***************************************/
2211 /***** Global extension tokens *****/
2213 /***** Tag tokens *****/
2214 static const value_string wbxml_provc10_tags_cp0[] = {
2215 /* 0x00 -- 0x04 GLOBAL */
2216 { 0x05, "wap-provisioningdoc" },
2217 { 0x06, "characteristic" },
2222 static const value_string wbxml_provc10_tags_cp1[] = {
2223 /* 0x00 -- 0x04 GLOBAL */
2225 { 0x06, "characteristic" },
2231 /***** Attribute Start tokens *****/
2232 static const value_string wbxml_provc10_attrStart_cp0[] = {
2233 /* 0x00 -- 0x04 GLOBAL */
2236 { 0x07, "name='NAME'" },
2237 { 0x08, "name='NAP-ADDRESS'" },
2238 { 0x09, "name='NAP-ADDRTYPE'" },
2239 { 0x0A, "name='CALLTYPE'" },
2240 { 0x0B, "name='VALIDUNTIL'" },
2241 { 0x0C, "name='AUTHTYPE'" },
2242 { 0x0D, "name='AUTHNAME'" },
2243 { 0x0E, "name='AUTHSECRET'" },
2244 { 0x0F, "name='LINGER'" },
2245 { 0x10, "name='BEARER'" },
2246 { 0x11, "name='NAPID'" },
2247 { 0x12, "name='COUNTRY'" },
2248 { 0x13, "name='NETWORK'" },
2249 { 0x14, "name='INTERNET'" },
2250 { 0x15, "name='PROXY-ID'" },
2251 { 0x16, "name='PROXY-PROVIDER-ID'" },
2252 { 0x17, "name='DOMAIN'" },
2253 { 0x18, "name='PROVURL'" },
2254 { 0x19, "name='PXAUTH-TYPE'" },
2255 { 0x1A, "name='PXAUTH-ID'" },
2256 { 0x1B, "name='PXAUTH-PW'" },
2257 { 0x1C, "name='STARTPAGE'" },
2258 { 0x1D, "name='BASAUTH-ID'" },
2259 { 0x1E, "name='BASAUTH-PW'" },
2260 { 0x1F, "name='PUSHENABLED'" },
2261 { 0x20, "name='PXADDR'" },
2262 { 0x21, "name='PXADDRTYPE'" },
2263 { 0x22, "name='TO-NAPID'" },
2264 { 0x23, "name='PORTNBR'" },
2265 { 0x24, "name='SERVICE'" },
2266 { 0x25, "name='LINKSPEED'" },
2267 { 0x26, "name='DNLINKSPEED'" },
2268 { 0x27, "name='LOCAL-ADDR'" },
2269 { 0x28, "name='LOCAL-ADDRTYPE'" },
2270 { 0x29, "name='CONTEXT-ALLOW'" },
2271 { 0x2A, "name='TRUST'" },
2272 { 0x2B, "name='MASTER'" },
2273 { 0x2C, "name='SID'" },
2274 { 0x2D, "name='SOC'" },
2275 { 0x2E, "name='WSP-VERSION'" },
2276 { 0x2F, "name='PHYSICAL-PROXY-ID'" },
2277 { 0x30, "name='CLIENT-ID'" },
2278 { 0x31, "name='DELIVERY-ERR-SDU'" },
2279 { 0x32, "name='DELIVERY-ORDER'" },
2280 { 0x33, "name='TRAFFIC-CLASS'" },
2281 { 0x34, "name='MAX-SDU-SIZE'" },
2282 { 0x35, "name='MAX-BITRATE-UPLINK'" },
2283 { 0x36, "name='MAX-BITRATE-DNLINK'" },
2284 { 0x37, "name='RESIDUAL-BER'" },
2285 { 0x38, "name='SDU-ERROR-RATIO'" },
2286 { 0x39, "name='TRAFFIC-HANDL-PRIO'" },
2287 { 0x3A, "name='TRANSFER-DELAY'" },
2288 { 0x3B, "name='GUARANTEED-BITRATE-UPLINK'" },
2289 { 0x3C, "name='GUARANTEED-BITRATE-DNLINK'" },
2290 { 0x3D, "name='PXADDR-FQDN'" },
2291 { 0x3E, "name='PROXY-PW'" },
2292 { 0x3F, "name='PPGAUTH-TYPE'" },
2293 /* 0x40 -- 0x44 GLOBAL */
2294 { 0x45, "version=" },
2295 { 0x46, "version='1.0'" },
2296 { 0x47, "name='PULLENABLED'" },
2297 { 0x48, "name='DNS-ADDR'" },
2298 { 0x49, "name='MAX-NUM-RETRY'" },
2299 { 0x4A, "name='FIRST-RETRY-TIMEOUT'" },
2300 { 0x4B, "name='REREG-THRESHOLD'" },
2301 { 0x4C, "name='T-BIT'" },
2303 { 0x4E, "name='AUTH-ENTITY'" },
2304 { 0x4F, "name='SPI'" },
2306 { 0x51, "type='PXLOGICAL'" },
2307 { 0x52, "type='PXPHYSICAL'" },
2308 { 0x53, "type='PORT'" },
2309 { 0x54, "type='VALIDITY'" },
2310 { 0x55, "type='NAPDEF'" },
2311 { 0x56, "type='BOOTSTRAP'" },
2312 { 0x57, "type='VENDORCONFIG'" },
2313 { 0x58, "type='CLIENTIDENTITY'" },
2314 { 0x59, "type='PXAUTHINFO'" },
2315 { 0x5A, "type='NAPAUTHINFO'" },
2316 { 0x5B, "type='ACCESS'" },
2320 static const value_string wbxml_provc10_attrStart_cp1[] = {
2321 /* 0x00 -- 0x04 GLOBAL */
2323 { 0x07, "name='NAME'" },
2325 { 0x14, "name='INTERNET'" },
2327 { 0x1C, "name='STARTPAGE'" },
2329 { 0x22, "name='TO-NAPID'" },
2330 { 0x23, "name='PORTNBR'" },
2331 { 0x24, "name='SERVICE'" },
2333 { 0x2E, "name='AACCEPT'" },
2334 { 0x2F, "name='AAUTHDATA'" },
2335 { 0x30, "name='AAUTHLEVEL'" },
2336 { 0x31, "name='AAUTHNAME'" },
2337 { 0x32, "name='AAUTHSECRET'" },
2338 { 0x33, "name='AAUTHTYPE'" },
2339 { 0x34, "name='ADDR'" },
2340 { 0x35, "name='ADDRTYPE'" },
2341 { 0x36, "name='APPID'" },
2342 { 0x37, "name='APROTOCOL'" },
2343 { 0x38, "name='PROVIDER-ID'" },
2344 { 0x39, "name='TO-PROXY'" },
2345 { 0x3A, "name='URI'" },
2346 { 0x3B, "name='RULE'" },
2348 /* 0x40 -- 0x44 GLOBAL */
2352 { 0x53, "type='PORT'" },
2354 { 0x55, "type='APPLICATION'" },
2355 { 0x56, "type='APPADDR'" },
2356 { 0x57, "type='APPAUTH'" },
2357 { 0x58, "type='CLIENTIDENTITY'" },
2358 { 0x59, "type='RESOURCE'" },
2364 /***** Attribute Start tokens *****/
2365 static const value_string wbxml_provc10_attrValue_cp0[] = {
2366 /* 0x80 -- 0x84 GLOBAL */
2370 { 0x88, "'ALPHA'" },
2372 { 0x8A, "'SCODE'" },
2373 { 0x8B, "'TETRA-ITSI'" },
2376 { 0x90, "'ANALOG-MODEM'" },
2377 { 0x91, "'V.120'" },
2378 { 0x92, "'V.110'" },
2380 { 0x94, "'BIT-TRANSPARENT'" },
2381 { 0x95, "'DIRECT-ASYNCHRONOUS-DATA-SERVICE'" },
2385 { 0x9C, "'HTTP-BASIC'" },
2386 { 0x9D, "'HTTP-DIGEST'" },
2387 { 0x9E, "'WTLS-SS'" },
2390 { 0xA2, "'GSM-USSD'" },
2391 { 0xA3, "'GSM-SMS'" },
2392 { 0xA4, "'ANSI-136-GUTS'" },
2393 { 0xA5, "'IS-95-CDMA-SMS'" },
2394 { 0xA6, "'IS-95-CDMA-CSD'" },
2395 { 0xA7, "'IS-95-CDMA-PACKET'" },
2396 { 0xA8, "'ANSI-136-CSD'" },
2397 { 0xA9, "'ANSI-136-GPRS'" },
2398 { 0xAA, "'GSM-CSD'" },
2399 { 0xAB, "'GSM-GPRS'" },
2400 { 0xAC, "'AMPS-CDPD'" },
2401 { 0xAD, "'PDC-CSD'" },
2402 { 0xAE, "'PDC-PACKET'" },
2403 { 0xAF, "'IDEN-SMS'" },
2404 { 0xB0, "'IDEN-CSD'" },
2405 { 0xB1, "'IDEN-PACKET'" },
2406 { 0xB2, "'FLEX/REFLEX'" },
2407 { 0xB3, "'PHS-SMS'" },
2408 { 0xB4, "'PHS-CSD'" },
2409 { 0xB5, "'TETRA-SDS'" },
2410 { 0xB6, "'TETRA-PACKET'" },
2411 { 0xB7, "'ANSI-136-GHOST'" },
2412 { 0xB8, "'MOBITEX-MPAK'" },
2413 { 0xB9, "'CDMA2000-IX-SIMPLE-IP'" },
2414 { 0xBA, "'CDMA2000-IX-MOBILE-IP'" },
2416 /* 0xC0 -- 0xC4 GLOBAL */
2417 { 0xC5, "'AUTOBAUDING'" },
2419 { 0xCA, "'CL-WSP'" },
2420 { 0xCB, "'CO-WSP'" },
2421 { 0xCC, "'CL-SEC-WSP'" },
2422 { 0xCD, "'CO-SEC-WSP'" },
2423 { 0xCE, "'CL-SEC-WTA'" },
2424 { 0xCF, "'CO-SEC-WTA'" },
2425 { 0xD0, "'OTA-HTTP-TO'" },
2426 { 0xD1, "'OTA-HTTP-TLS-TO'" },
2427 { 0xD2, "'OTA-HTTP-PO'" },
2428 { 0xD3, "'OTA-HTTP-TLS-PO'" },
2433 static const value_string wbxml_provc10_attrValue_cp1[] = {
2434 /* 0x80 -- 0x84 GLOBAL */
2438 { 0x88, "'ALPHA'" },
2439 { 0x8D, "'APPSRV'" },
2443 /* XXX - Errors that require a fix in the OMA/WAP Client Provisioning specs:
2445 { 0xXXX, "'HTTP-'" },
2446 { 0xXXX, "'BASIC'" },
2447 { 0xXXX, "'DIGEST'" },
2456 /***** Token code page aggregation *****/
2457 static const value_valuestring wbxml_provc10_tags[] = {
2458 { 0, wbxml_provc10_tags_cp0 },
2459 { 1, wbxml_provc10_tags_cp1 },
2463 static const value_valuestring wbxml_provc10_attrStart[] = {
2464 { 0, wbxml_provc10_attrStart_cp0 },
2465 { 1, wbxml_provc10_attrStart_cp1 },
2469 static const value_valuestring wbxml_provc10_attrValue[] = {
2470 { 0, wbxml_provc10_attrValue_cp0 },
2471 { 1, wbxml_provc10_attrValue_cp1 },
2475 static const wbxml_decoding decode_provc_10 = {
2476 "WAP Client Provisioning Document 1.0",
2477 "WAP ProvisioningDoc 1.0",
2478 { NULL, NULL, NULL },
2479 default_opaque_binary_tag,
2480 default_opaque_literal_tag,
2481 default_opaque_binary_attr,
2482 default_opaque_literal_attr,
2485 wbxml_provc10_attrStart,
2486 wbxml_provc10_attrValue
2495 * Email Notification
2496 ***************************************/
2498 /***** Global extension tokens *****/
2500 /***** Tag tokens *****/
2501 static const value_string wbxml_emnc10_tags_cp0[] = {
2502 /* 0x00 -- 0x04 GLOBAL */
2508 /***** Attribute Start tokens *****/
2509 static const value_string wbxml_emnc10_attrStart_cp0[] = {
2510 /* 0x00 -- 0x04 GLOBAL */
2511 { 0x05, "timestamp=" },
2512 { 0x06, "mailbox=" },
2513 { 0x07, "mailbox='mailat:'" },
2514 { 0x08, "mailbox='pop://'" },
2515 { 0x09, "mailbox='imap://'" },
2516 { 0x0a, "mailbox='http://'" },
2517 { 0x0b, "mailbox='http://www.'" },
2518 { 0x0c, "mailbox='https://'" },
2519 { 0x0D, "mailbox='https://www.'" },
2524 /***** Attribute Value tokens *****/
2525 /* Same as in SI 1.0 */
2527 /***** Token code page aggregation *****/
2528 static const value_valuestring wbxml_emnc10_tags[] = {
2529 { 0, wbxml_emnc10_tags_cp0 },
2533 static const value_valuestring wbxml_emnc10_attrStart[] = {
2534 { 0, wbxml_emnc10_attrStart_cp0 },
2538 static const value_valuestring wbxml_emnc10_attrValue[] = {
2539 { 0, wbxml_sic10_attrValue_cp0 }, /* Same as SI 1.0 */
2543 static const wbxml_decoding decode_emnc_10 = {
2544 "E-Mail Notification 1.0",
2546 { NULL, NULL, NULL },
2547 default_opaque_binary_tag,
2548 default_opaque_literal_tag,
2549 emnc10_opaque_binary_attr,
2550 emnc10_opaque_literal_attr,
2553 wbxml_emnc10_attrStart,
2554 wbxml_emnc10_attrValue
2563 * SyncML Representation Protocol
2564 ***************************************/
2566 /***** Global extension tokens *****/
2568 /***** Tag tokens *****/
2569 static const value_string wbxml_syncmlc10_tags_cp0[] = { /* SyncML 1.0 */
2570 /* 0x00 -- 0x04 GLOBAL */
2573 { 0x07, "Archive" },
2588 { 0x16, "LocName" },
2591 { 0x19, "MapItem" },
2596 { 0x1E, "NoResults" },
2598 { 0x20, "Replace" },
2599 { 0x21, "RespURI" },
2600 { 0x22, "Results" },
2602 { 0x24, "Sequence" },
2603 { 0x25, "SessionID" },
2606 { 0x28, "SourceRef" },
2609 { 0x2B, "SyncBody" },
2610 { 0x2C, "SyncHdr" },
2613 { 0x2F, "TargetRef" },
2614 /* 0x30 - Reserved */
2616 { 0x32, "VerProto" },
2621 static const value_string wbxml_syncmlc10_tags_cp1[] = { /* MetInf 1.0 */
2622 /* 0x00 -- 0x04 GLOBAL */
2627 { 0x09, "FreeMem" },
2630 { 0x0C, "MaxMsgSize" },
2634 { 0x10, "NextNonce" },
2635 { 0x11, "SharedMem" },
2638 { 0x14, "Version" },
2643 /***** Attribute Start tokens *****/
2645 /***** Attribute Value tokens *****/
2647 /***** Token code page aggregation *****/
2648 static const value_valuestring wbxml_syncmlc10_tags[] = {
2649 { 0, wbxml_syncmlc10_tags_cp0 }, /* -//SYNCML//DTD SyncML 1.0//EN */
2650 { 1, wbxml_syncmlc10_tags_cp1 }, /* -//SYNCML//DTD MetInf 1.0//EN */
2654 static const wbxml_decoding decode_syncmlc_10 = {
2655 "SyncML Representation Protocol 1.0",
2657 { NULL, NULL, NULL },
2658 default_opaque_binary_tag,
2659 default_opaque_literal_tag,
2660 default_opaque_binary_attr,
2661 default_opaque_literal_attr,
2663 wbxml_syncmlc10_tags,
2674 * SyncML Representation Protocol
2675 ***************************************/
2677 /***** Global extension tokens *****/
2679 /***** Tag tokens *****/
2680 static const value_string wbxml_syncmlc11_tags_cp0[] = { /* SyncML 1.1 */
2681 /* 0x00 -- 0x04 GLOBAL */
2684 { 0x07, "Archive" },
2699 { 0x16, "LocName" },
2702 { 0x19, "MapItem" },
2707 { 0x1e, "NoResults" },
2709 { 0x20, "Replace" },
2710 { 0x21, "RespURI" },
2711 { 0x22, "Results" },
2713 { 0x24, "Sequence" },
2714 { 0x25, "SessionID" },
2717 { 0x28, "SourceRef" },
2720 { 0x2b, "SyncBody" },
2721 { 0x2c, "SyncHdr" },
2724 { 0x2f, "TargetRef" },
2725 /* 0x30 - Reserved */
2727 { 0x32, "VerProto" },
2728 { 0x33, "NumberOfChanges" },
2729 { 0x34, "MoreData" },
2734 static const value_string wbxml_syncmlc11_tags_cp1[] = { /* MetInf 1.1 */
2735 /* 0x00 -- 0x04 GLOBAL */
2740 { 0x09, "FreeMem" },
2743 { 0x0C, "MaxMsgSize" },
2747 { 0x10, "NextNonce" },
2748 { 0x11, "SharedMem" },
2751 { 0x14, "Version" },
2752 { 0x15, "MaxObjSize" },
2757 /***** Attribute Start tokens *****/
2759 /***** Attribute Value tokens *****/
2761 /***** Token code page aggregation *****/
2762 static const value_valuestring wbxml_syncmlc11_tags[] = {
2763 { 0, wbxml_syncmlc11_tags_cp0 }, /* -//SYNCML//DTD SyncML 1.1//EN */
2764 { 1, wbxml_syncmlc11_tags_cp1 }, /* -//SYNCML//DTD MetInf 1.1//EN */
2768 static const wbxml_decoding decode_syncmlc_11 = {
2769 "SyncML Representation Protocol 1.1",
2771 { NULL, NULL, NULL },
2772 default_opaque_binary_tag,
2773 default_opaque_literal_tag,
2774 default_opaque_binary_attr,
2775 default_opaque_literal_attr,
2777 wbxml_syncmlc11_tags,
2789 ***************************************/
2791 /***** Global extension tokens *****/
2793 /***** Tag tokens *****/
2794 static const value_string wbxml_channelc10_tags_cp0[] = {
2795 /* 0x00 -- 0x04 GLOBAL */
2796 { 0x05, "channel" },
2798 { 0x07, "abstract" },
2799 { 0x08, "resource" },
2804 /***** Attribute Start tokens *****/
2805 static const value_string wbxml_channelc10_attrStart_cp0[] = {
2806 /* 0x00 -- 0x04 GLOBAL */
2807 { 0x05, "maxspace=" },
2810 { 0x08, "href='http://'" },
2811 { 0x09, "href='https://'" },
2812 { 0x0A, "lastmod=" },
2815 { 0x0D, "success=" },
2816 { 0x0E, "success='http://'" },
2817 { 0x0F, "success='https://'" },
2818 { 0x10, "failure=" },
2819 { 0x11, "failure='http://'" },
2820 { 0x12, "failure='https://'" },
2821 { 0x13, "EventId=" },
2826 /***** Attribute Value tokens *****/
2828 /***** Token code page aggregation *****/
2829 static const value_valuestring wbxml_channelc10_tags[] = {
2830 { 0, wbxml_channelc10_tags_cp0 },
2834 static const value_valuestring wbxml_channelc10_attrStart[] = {
2835 { 0, wbxml_channelc10_attrStart_cp0 },
2839 static const wbxml_decoding decode_channelc_10 = {
2840 "Wireless Telephony Application (WTA) Channel 1.0",
2842 { NULL, NULL, NULL },
2843 default_opaque_binary_tag,
2844 default_opaque_literal_tag,
2845 default_opaque_binary_attr,
2846 default_opaque_literal_attr,
2848 wbxml_channelc10_tags,
2849 wbxml_channelc10_attrStart,
2857 /* application/x-wap-prov.browser-settings
2858 * application/x-wap-prov.browser-bookmarks
2860 * Nokia OTA Provisioning document format
2861 ***************************************/
2863 /***** Global extension tokens *****/
2865 /***** Tag tokens *****/
2866 static const value_string wbxml_nokiaprovc70_tags_cp0[] = {
2867 /* 0x00 -- 0x04 GLOBAL */
2868 { 0x05, "CHARACTERISTIC-LIST" },
2869 { 0x06, "CHARACTERISTIC" },
2875 /***** Attribute Start tokens *****/
2876 static const value_string wbxml_nokiaprovc70_attrStart_cp0[] = {
2877 /* 0x00 -- 0x04 GLOBAL */
2878 { 0x06, "TYPE='ADDRESS'" },
2879 { 0x07, "TYPE='URL'" },
2880 { 0x08, "TYPE='NAME'" },
2883 { 0x12, "NAME='BEARER'" },
2884 { 0x13, "NAME='PROXY'" },
2885 { 0x14, "NAME='PORT'" },
2886 { 0x15, "NAME='NAME'" },
2887 { 0x16, "NAME='PROXY_TYPE'" },
2888 { 0x17, "NAME='URL'" },
2889 { 0x18, "NAME='PROXY_AUTHNAME'" },
2890 { 0x19, "NAME='PROXY_AUTHSECRET'" },
2891 { 0x1A, "NAME='SMS_SMSC_ADDRESS'" },
2892 { 0x1B, "NAME='USSD_SERVICE_CODE'" },
2893 { 0x1C, "NAME='GPRS_ACCESSPOINTNAME'" },
2894 { 0x1D, "NAME='PPP_LOGINTYPE'" },
2895 { 0x1E, "NAME='PROXY_LOGINTYPE'" },
2896 { 0x21, "NAME='CSD_DIALSTRING'" },
2897 { 0x22, "NAME='PPP_AUTHTYPE'" },
2898 { 0x23, "NAME='PPP_AUTHNAME'" },
2899 { 0x24, "NAME='PPP_AUTHSECRET'" },
2900 { 0x28, "NAME='CSD_CALLTYPE'" },
2901 { 0x29, "NAME='CSD_CALLSPEED'" },
2902 { 0x45, "VALUE='GSM/CSD'" },
2903 { 0x46, "VALUE='GSM/SMS'" },
2904 { 0x47, "VALUE='GSM/USSD'" },
2905 { 0x48, "VALUE='IS-136/CSD'" },
2906 { 0x49, "VALUE='GPRS'" },
2907 { 0x60, "VALUE='9200'" },
2908 { 0x61, "VALUE='9201'" },
2909 { 0x62, "VALUE='9202'" },
2910 { 0x63, "VALUE='9203'" },
2911 { 0x64, "VALUE='AUTOMATIC'" },
2912 { 0x65, "VALUE='MANUAL'" },
2913 { 0x6A, "VALUE='AUTO'" },
2914 { 0x6B, "VALUE='9600'" },
2915 { 0x6C, "VALUE='14400'" },
2916 { 0x6D, "VALUE='19200'" },
2917 { 0x6E, "VALUE='28800'" },
2918 { 0x6F, "VALUE='38400'" },
2919 { 0x70, "VALUE='PAP'" },
2920 { 0x71, "VALUE='CHAP'" },
2921 { 0x72, "VALUE='ANALOGUE'" },
2922 { 0x73, "VALUE='ISDN'" },
2923 { 0x74, "VALUE='43200'" },
2924 { 0x75, "VALUE='57600'" },
2925 { 0x76, "VALUE='MSISDN_NO'" },
2926 { 0x77, "VALUE='IPV4'" },
2927 { 0x78, "VALUE='MS_CHAP'" },
2928 { 0x7C, "TYPE='MMSURL'" },
2929 { 0x7D, "TYPE='ID'" },
2930 { 0x7E, "NAME='ISP_NAME'" },
2931 { 0x7F, "TYPE='BOOKMARK'" },
2936 /***** Attribute Value tokens *****/
2938 /***** Token code page aggregation *****/
2939 static const value_valuestring wbxml_nokiaprovc70_tags[] = {
2940 { 0, wbxml_nokiaprovc70_tags_cp0 },
2944 static const value_valuestring wbxml_nokiaprovc70_attrStart[] = {
2945 { 0, wbxml_nokiaprovc70_attrStart_cp0 },
2949 static const wbxml_decoding decode_nokiaprovc_70 = {
2950 "Nokia Client Provisioning 7.0",
2951 "Nokia Client Provisioning 7.0",
2952 { NULL, NULL, NULL },
2953 default_opaque_binary_tag,
2954 default_opaque_literal_tag,
2955 default_opaque_binary_attr,
2956 default_opaque_literal_attr,
2958 wbxml_nokiaprovc70_tags,
2959 wbxml_nokiaprovc70_attrStart,
2969 * User-Agent Profile (used in profile-diff WSP header)
2970 ***************************************/
2972 /***** Global extension tokens *****/
2974 /***** Tag tokens *****/
2975 /* CodePage 0 RDF */
2976 static const value_string wbxml_uaprof_tags_cp0[] = {
2978 {0x06, "rdf:Description"},
2984 {0x0C, "rdf:value"},
2985 {0x0D, "rdf:subject"},
2986 {0x0E, "rdf:predicate"},
2987 {0x0F, "rdf:object"},
2992 /* CodePage 1 Core Vocabulary */
2993 static const value_string wbxml_uaprof_tags_cp1[] = {
2994 {0x06, "rdf:Description"},
3000 {0x0C, "prf:component"},
3001 {0x0D, "prf:defaults"},
3002 {0x0E, "prf:BitsPerPixel"},
3003 {0x0F, "prf:ColorCapable"},
3005 {0x11, "prf:ImageCapable"},
3006 {0x12, "prf:InputCharSet"},
3007 {0x13, "prf:Keyboard"},
3008 {0x15, "prf:Model"},
3009 {0x16, "prf:OutputCharSet"},
3010 {0x17, "prf:PointingResolution"},
3011 {0x18, "prf:ScreenSize"},
3012 {0x19, "prf:ScreenSizeChar"},
3013 {0x1A, "prf:NumberOfSoftKeys"},
3014 {0x1B, "prf:SoundOutputCapable"},
3015 {0x1C, "prf:TextInputCapable"},
3016 {0x1D, "prf:Vendor"},
3017 {0x1E, "prf:VoiceInputCapable"},
3018 {0x1F, "prf:AcceptDownloadableSoftware"},
3019 {0x20, "prf:AudioInputEncoder"},
3020 {0x21, "prf:DownloadableSoftwareSupport"},
3021 {0x22, "prf:JavaEnabled"},
3022 {0x23, "prf:JVMVersion"},
3023 {0x24, "prf:MexeClassmark"},
3024 {0x25, "prf:MexeSpec"},
3025 {0x26, "prf:OSName"},
3026 {0x27, "prf:OSVendor"},
3027 {0x28, "prf:OSVersion"},
3028 {0x29, "prf:RecipientAppAgent"},
3029 {0x2A, "prf:SoftwareNumber"},
3030 {0x2B, "prf:VideoInputEncoder"},
3031 {0x2C, "prf:CurrentBearerService"},
3032 {0x2D, "prf:SecuritySupport"},
3033 {0x2E, "prf:SupportedBearers"},
3034 {0x2F, "prf:WapDeviceClass"},
3035 {0x30, "prf:WapPushMsgPriority"}, /* Deprecated */
3036 {0x31, "prf:WapPushMsgSize"}, /* Deprecated */
3037 {0x32, "prf:WapVersion"},
3038 {0x33, "prf:WmlDeckSize"},
3039 {0x34, "prf:WmlScriptLibraries"},
3040 {0x35, "prf:WmlScriptVersion"},
3041 {0x36, "prf:WmlVersion"},
3042 {0x37, "prf:WtaiLibraries"},
3043 {0x38, "prf:WtaVersion"},
3044 {0x39, "prf:PixelAspectRatio"},
3045 {0x3A, "prf:StandardFontProportional"},
3046 {0x3B, "prf:WapSupportedApplications"}, /* Deprecated */
3047 {0x3C, "prf:BluetoothProfile"},
3048 {0x3D, "prf:MexeClassmarks"},
3049 {0x3E, "prf:MexeSecureDomains"},
3054 /* CodePage 4 Core Vocabulary (continued) */
3055 static const value_string wbxml_uaprof_tags_cp4[] = {
3056 {0x10, "prf:SupportedBluetoothVersion"},
3057 {0x11, "prf:SupportedPictogramSet"},
3058 {0x12, "prf:CcppAccept"},
3059 {0x13, "prf:CcppAccept-Charset"},
3060 {0x14, "prf:CcppAccept-Encoding"},
3061 {0x15, "prf:CcppAccept-Language"},
3066 /* CodePage 2 BrowserUA */
3067 static const value_string wbxml_uaprof_tags_cp2[] = {
3068 {0x05, "rdf:Description"},
3074 {0x0B, "prf:component"},
3075 {0x0C, "prf:defaults"},
3076 {0x0D, "prf:BrowserName"},
3077 {0x0E, "prf:BrowserVersion"},
3078 {0x0F, "prf:CcppAccept"}, /* Deprecated */
3079 {0x10, "prf:CcppAccept-Charset"}, /* Deprecated */
3080 {0x11, "prf:CcppAccept-Encoding"}, /* Deprecated */
3081 {0x12, "prf:CcppAccept-Language"}, /* Deprecated */
3082 {0x13, "prf:DownloadableBrowserApps"},
3083 {0x14, "prf:FramesCapable"},
3084 {0x15, "prf:HtmlVersion"},
3085 {0x16, "prf:JavaAppletEnabled"},
3086 {0x17, "prf:JavaScriptEnabled"},
3087 {0x18, "prf:JavaScriptVersion"},
3088 {0x19, "prf:PreferenceForFrames"},
3089 {0x1A, "prf:TablesCapable"},
3090 {0x1B, "Prf:XhtmlVersion"},
3091 {0x1C, "prf:XhtmlModules"},
3096 /* CodePage 3 PushCharacteristics */
3097 static const value_string wbxml_uaprof_tags_cp3[] = {
3098 {0x05, "rdf:Description"},
3104 {0x0B, "prf:component"},
3105 {0x0C, "prf:defaults"},
3106 {0x0D, "prf:Push-Accept"},
3107 {0x0E, "prf:Push-Accept-Charset"},
3108 {0x0F, "prf:Push-Accept-Encoding"},
3109 {0x10, "prf:Push-Accept-Language"},
3110 {0x11, "prf:Push-Accept-AppID"},
3111 {0x12, "prf:Push-MsgSize"},
3112 {0x13, "prf:Push-MaxPushReq"},
3117 /***** Attribute Start tokens *****/
3118 /* CodePage 0 RDF */
3119 static const value_string wbxml_uaprof_attrStart_cp0[] = {
3121 {0x06, "rdf:about"},
3122 {0x07, "rdf:aboutEach"},
3123 {0x08, "rdf:aboutEachPrefix"},
3124 {0x09, "rdf:bagID"},
3126 {0x0B, "rdf:resource"},
3127 {0x0C, "rdf:parseType='Literal'"},
3128 {0x0D, "rdf:parseType='Resource'"},
3130 {0x0F, "xmlns:prf"},
3131 {0x10, "xmlns:rdf"},
3136 /* CodePage 1 Core Vocabulary */
3137 static const value_string wbxml_uaprof_attrStart_cp1[] = {
3138 {0x05, "rdf:resource"},
3139 {0x06, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
3140 "ccppschema-20010430#HardwarePlatform'"},
3141 {0x07, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
3142 "ccppschema-20010430#SoftwarePlatform'"},
3143 {0x08, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
3144 "ccppschema-20010430#NetworkCharacteristics'"},
3145 {0x09, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
3146 "ccppschema-20010430#WapCharacteristics'"},
3147 {0x0A, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
3148 "ccppschema-20010430#BrowserUA'"},
3149 {0x0B, "rdf:resource='http://www.wapforum.org/profiles/UAPROF/"
3150 "ccppschema-20010430#PushCharacteristics'"},
3151 {0x10, "prf:BitsPerPixel"},
3152 {0x11, "prf:ColorCapable='Yes'"},
3153 {0x12, "prf:ColorCapable='No'"},
3155 {0x14, "prf:ImageCapable='Yes'"},
3156 {0x15, "prf:ImageCapable='No'"},
3157 {0x16, "prf:InputCharSet"},
3158 {0x17, "prf:Keyboard"},
3159 {0x19, "prf:Model"},
3160 {0x1A, "prf:OutputCharSet"},
3161 {0x1B, "prf:PointingResolution"},
3162 {0x1C, "prf:ScreenSize"},
3163 {0x1D, "prf:ScreenSizeChar"},
3164 {0x1E, "prf:NumberOfSoftKeys='Yes'"},
3165 {0x20, "prf:SoundOutputCapable='Yes'"},
3166 {0x21, "prf:SoundOutputCapable='No'"},
3167 {0x22, "prf:TextInputCapable='Yes'"},
3168 {0x23, "prf:TextInputCapable='No'"},
3169 {0x24, "prf:Vendor"},
3170 {0x25, "prf:VoiceInputCapable='Yes'"},
3171 {0x26, "prf:VoiceInputCapable='No'"},
3172 {0x27, "prf:PixelAspectRatio"},
3173 {0x28, "prf:StandardFontProportional='Yes'"},
3174 {0x29, "prf:StandardFontProportional='No'"},
3175 {0x30, "prf:AcceptDownloadableSoftware='Yes'"},
3176 {0x31, "prf:AcceptDownloadableSoftware='No'"},
3177 {0x32, "prf:AudioInputEncoder"},
3178 {0x33, "prf:DownloadableSoftwareSupport"},
3179 {0x35, "prf:JavaEnabled='Yes'"},
3180 {0x36, "prf:JavaEnabled='No'"},
3181 {0x37, "prf:JVMVersion"},
3182 {0x38, "prf:MexeClassmark"},
3183 {0x39, "prf:MexeSpec"},
3184 {0x3A, "prf:OSName"},
3185 {0x3B, "prf:OSVendor"},
3186 {0x3C, "prf:OSVersion"},
3187 {0x3D, "prf:RecipientAppAgent"},
3188 {0x3E, "prf:SoftwareNumber"},
3189 {0x21, "prf:SoundOutputCapable='No'"},
3190 {0x22, "prf:TextInputCapable='Yes'"},
3191 {0x23, "prf:TextInputCapable='No'"},
3192 {0x24, "prf:Vendor"},
3193 {0x25, "prf:VoiceInputCapable='Yes'"},
3194 {0x26, "prf:VoiceInputCapable='No'"},
3195 {0x27, "prf:PixelAspectRatio"},
3196 {0x28, "prf:StandardFontProportional='Yes'"},
3197 {0x29, "prf:StandardFontProportional='No'"},
3198 {0x30, "prf:AcceptDownloadableSoftware='Yes'"},
3199 {0x31, "prf:AcceptDownloadableSoftware='No'"},
3200 {0x32, "prf:AudioInputEncoder"},
3201 {0x33, "prf:DownloadableSoftwareSupport"},
3202 {0x35, "prf:JavaEnabled='Yes'"},
3203 {0x36, "prf:JavaEnabled='No'"},
3204 {0x37, "prf:JVMVersion"},
3205 {0x38, "prf:MexeClassmark"},
3206 {0x39, "prf:MexeSpec"},
3207 {0x3A, "prf:OSName"},
3208 {0x3B, "prf:OSVendor"},
3209 {0x3C, "prf:OSVersion"},
3210 {0x3D, "prf:RecipientAppAgent"},
3211 {0x3E, "prf:SoftwareNumber"},
3212 {0x3F, "prf:VideoInputEncoder"},
3213 {0x50, "prf:CurrentBearerService"},
3214 {0x51, "prf:SecuritySupport"},
3215 {0x52, "prf:SupportedBearers"},
3216 {0x60, "prf:WapDeviceClass"},
3217 {0x61, "prf:WapPushMsgPriority"}, /* Deprecated */
3218 {0x62, "prf:WapPushMsgSize"}, /* Deprecated */
3219 {0x63, "prf:WapVersion"},
3220 {0x64, "prf:WmlDeckSize"},
3221 {0x65, "prf:WmlScriptLibraries"},
3222 {0x66, "prf:WmlScriptVersion"},
3223 {0x67, "prf:WmlVersion"},
3224 {0x68, "prf:WtaiLibraries"},
3225 {0x69, "prf:WtaVersion"},
3226 {0x70, "prf:WapSupportedApplications"}, /* Deprecated */
3227 {0x71, "prf:BluetoothProfile"},
3228 {0x72, "prf:MexeClassmarks"},
3229 {0x73, "prf:MexeSecureDomains='YES'"},
3230 {0x74, "prf:MexeSecureDomains='NO'"},
3231 {0x75, "prf:SupportedBluetoothVersion"},
3232 {0x76, "prf:SupportedPictogramSet"},
3233 {0x77, "prf:CcppAccept"},
3234 {0x78, "prf:CcppAccept-Charset"},
3235 {0x79, "prf:CcppAccept-Encoding"},
3236 {0x7F, "prf:CcppAccept-Language"},
3241 /* CodePage 2 BrowserUA */
3242 static const value_string wbxml_uaprof_attrStart_cp2[] = {
3243 {0x05, "prf:CcppAccept"}, /* Deprecated */
3244 {0x06, "prf:CcppAccept-Charset"}, /* Deprecated */
3245 {0x07, "prf:CcppAccept-Encoding"}, /* Deprecated */
3246 {0x08, "prf:CcppAccept-Language"}, /* Deprecated */
3247 {0x09, "prf:DownloadableBrowserApps"},
3248 {0x0A, "prf:FramesCapable='Yes'"},
3249 {0x0B, "prf:FramesCapable='No'"},
3250 {0x0C, "prf:HtmlVersion='3.2'"},
3251 {0x0D, "prf:HtmlVersion='4.0'"},
3252 {0x0E, "prf:JavaAppletEnabled='Yes'"},
3253 {0x0F, "prf:JavaAppletEnabled='No'"},
3254 {0x10, "prf:JavaScriptEnabled='Yes'"},
3255 {0x11, "prf:JavaScriptEnabled='No'"},
3256 {0x12, "prf:JavaScriptVersion"},
3257 {0x13, "prf:PreferenceForFrames='Yes'"},
3258 {0x14, "prf:PreferenceForFrames='No'"},
3259 {0x15, "prf:TablesCapable='Yes'"},
3260 {0x16, "prf:TablesCapable='No'"},
3261 {0x17, "prf:XhtmlVersion"},
3262 {0x18, "prf:XhtmlModules"},
3263 {0x19, "prf:BrowserName"},
3264 {0x1A, "prf:BrowserVersion"},
3269 /* CodePage 3 PushCharacteristics */
3270 static const value_string wbxml_uaprof_attrStart_cp3[] = {
3271 {0x05, "prf:Push-Accept"},
3272 {0x06, "prf:Push-Accept-Charset"},
3273 {0x07, "prf:Push-Accept-Encoding"},
3274 {0x08, "prf:Push-Accept-Language"},
3275 {0x09, "prf:Push-Accept-AppID"},
3276 {0x0A, "prf:Push-MsgSize"},
3277 {0x0B, "prf:Push-MaxPushReq"},
3282 /***** Attribute Value tokens *****/
3283 /* CodePage 0 RDF */
3284 static const value_string wbxml_uaprof_attrValue_cp0[] = {
3285 {0x85, "rdf:Statement"},
3287 {0x87, "http://www."},
3289 {0x89, "https://www."},
3299 /* CodePage 1 CoreVocabularyAttrValue */
3300 static const value_string wbxml_uaprof_attrValue_cp1[] = {
3307 /* CodePage 2 BrowserUAAttrValue */
3308 static const value_string wbxml_uaprof_attrValue_cp2[] = {
3315 /***** Token code page aggregation *****/
3316 static const value_valuestring wbxml_uaprof_tags[] = {
3317 { 0, wbxml_uaprof_tags_cp0 },
3318 { 1, wbxml_uaprof_tags_cp1 },
3319 { 2, wbxml_uaprof_tags_cp2 },
3320 { 3, wbxml_uaprof_tags_cp3 },
3321 { 4, wbxml_uaprof_tags_cp4 },
3325 static const value_valuestring wbxml_uaprof_attrStart[] = {
3326 { 0, wbxml_uaprof_attrStart_cp0 },
3327 { 1, wbxml_uaprof_attrStart_cp1 },
3328 { 2, wbxml_uaprof_attrStart_cp2 },
3329 { 3, wbxml_uaprof_attrStart_cp3 },
3333 static const value_valuestring wbxml_uaprof_attrValue[] = {
3334 { 0, wbxml_uaprof_attrValue_cp0 },
3335 { 1, wbxml_uaprof_attrValue_cp1 },
3336 { 2, wbxml_uaprof_attrValue_cp2 },
3340 static const wbxml_decoding decode_uaprof_wap_248 = {
3341 "User-Agent Profile (WAP-174, WAP-248)",
3342 "UAProf (WAP-174, WAP-248)",
3343 { NULL, NULL, NULL },
3344 default_opaque_binary_tag,
3345 default_opaque_literal_tag,
3346 default_opaque_binary_attr,
3347 default_opaque_literal_attr,
3350 wbxml_uaprof_attrStart,
3351 wbxml_uaprof_attrValue
3360 * Wireless Village Client Server Protocol
3361 ***************************************/
3363 /***** Global extension tokens *****/
3365 /***** Tag tokens *****/
3366 /* Common code page (0x00) */
3367 static const value_string wbxml_wv_csp_10_tags_cp0[] = {
3368 /* 0x00 -- 0x04 GLOBAL */
3369 { 0x05, "Acceptance" },
3370 { 0x06, "AddList" },
3371 { 0x07, "AddNickList" },
3372 { 0x08, "Attribute" },
3373 { 0x09, "AttributeList" },
3374 { 0x0A, "ClientID" },
3376 { 0x0C, "ContactList" },
3377 { 0x0D, "ContentData" },
3378 { 0x0E, "ContentEncoding" },
3379 { 0x0F, "ContentSize" },
3380 { 0x10, "ContentType" },
3381 { 0x11, "DateTime" },
3382 { 0x12, "Description" },
3383 { 0x13, "DetailedResult" },
3384 { 0x14, "EntityList" },
3386 { 0x16, "GroupID" },
3387 { 0x17, "GroupList" },
3390 { 0x1A, "MessageCount" },
3391 { 0x1B, "MessageID" },
3392 { 0x1C, "MessageURI" },
3395 { 0x1F, "NickList" },
3396 { 0x20, "NickName" },
3398 { 0x22, "Presence" },
3399 { 0x23, "PresenceSubList" },
3400 { 0x24, "PresenceValue" },
3401 { 0x25, "Property" },
3402 { 0x26, "Qualifier" },
3403 { 0x27, "Recipient" },
3404 { 0x28, "RemoveList" },
3405 { 0x29, "RemoveNickList" },
3407 { 0x2B, "ScreenName" },
3409 { 0x2D, "Session" },
3410 { 0x2E, "SessionDescriptor" },
3411 { 0x2F, "SessionID" },
3412 { 0x30, "SessionType" },
3414 { 0x32, "Transaction" },
3415 { 0x33, "TransactionContent" },
3416 { 0x34, "TransactionDescriptor" },
3417 { 0x35, "TransactionID" },
3418 { 0x36, "TransactionMode" },
3420 { 0x38, "URLList" },
3423 { 0x3B, "UserList" },
3424 { 0x3C, "Validity" },
3426 { 0x3E, "WV-CSP-Message" },
3431 /* Access code page (0x01) */
3432 static const value_string wbxml_wv_csp_10_tags_cp1[] = {
3433 /* 0x00 -- 0x04 GLOBAL */
3434 { 0x05, "AllFunctions" },
3435 { 0x06, "AllFunctionsRequest" },
3436 { 0x07, "CancelInvite-Request" },
3437 { 0x08, "CancelInviteUser-Request" },
3438 { 0x09, "Capability" },
3439 { 0x0A, "CapabilityList" },
3440 { 0x0B, "CapabilityRequest" },
3441 { 0x0C, "ClientCapability-Request" },
3442 { 0x0D, "ClientCapability-Response" },
3443 { 0x0E, "DigestBytes" },
3444 { 0x0F, "DigestSchema" },
3445 { 0x10, "Disconnect" },
3446 { 0x11, "Functions" },
3447 { 0x12, "GetSPInfo-Request" },
3448 { 0x13, "GetSPInfo-Response" },
3449 { 0x14, "InviteID" },
3450 { 0x15, "InviteNote" },
3451 { 0x16, "Invite-Request" },
3452 { 0x17, "Invite-Response" },
3453 { 0x18, "InviteType" },
3454 { 0x19, "InviteUser-Request" },
3455 { 0x1A, "InviteUser-Response" },
3456 { 0x1B, "KeepAlive-Request" },
3457 { 0x1C, "KeepAliveTime" },
3458 { 0x1D, "Login-Request" },
3459 { 0x1E, "Login-Response" },
3460 { 0x1F, "Logout-Request" },
3462 { 0x21, "Password" },
3463 { 0x22, "Polling-Request" },
3464 { 0x23, "ResponseNote" },
3465 { 0x24, "SearchElement" },
3466 { 0x25, "SearchFindings" },
3467 { 0x26, "SearchID" },
3468 { 0x27, "SearchIndex" },
3469 { 0x28, "SearchLimit" },
3470 { 0x29, "SearchOnlineStatus" },
3471 { 0x2A, "SearchPairList" },
3472 { 0x2B, "Search-Request" },
3473 { 0x2C, "Search-Response" },
3474 { 0x2D, "SearchResult" },
3475 { 0x2E, "Service-Request" },
3476 { 0x2F, "Service-Response" },
3477 { 0x30, "SessionCookie" },
3478 { 0x31, "StopSearch-Request" },
3479 { 0x32, "TimeToLive" },
3484 /* Service code page (0x02) */
3485 static const value_string wbxml_wv_csp_10_tags_cp2[] = {
3486 /* 0x00 -- 0x04 GLOBAL */
3488 { 0x06, "AttListFunc" },
3494 { 0x0C, "ContListFunc" },
3499 { 0x11, "FundamentalFeat" },
3512 { 0x1E, "GroupAuthFunc" },
3513 { 0x1F, "GroupFeat" },
3514 { 0x20, "GroupMgmtFunc" },
3515 { 0x21, "GroupUseFunc" },
3516 { 0x22, "IMAuthFunc" },
3518 { 0x24, "IMReceiveFunc" },
3519 { 0x25, "IMSendFunc" },
3521 { 0x27, "InviteFunc" },
3527 { 0x2D, "PresenceAuthFunc" },
3528 { 0x2E, "PresenceDeliverFunc" },
3529 { 0x2F, "PresenceFeat" },
3534 { 0x34, "SearchFunc" },
3535 { 0x35, "ServiceFunc" },
3542 { 0x3C, "WVCSPFeat" },
3547 /* Client capability code page (0x03) */
3548 static const value_string wbxml_wv_csp_10_tags_cp3[] = {
3549 /* 0x00 -- 0x04 GLOBAL */
3550 { 0x05, "AcceptedCharset" },
3551 { 0x06, "AcceptedContentLength" },
3552 { 0x07, "AcceptedContentType" },
3553 { 0x08, "AcceptedTransferEncoding" },
3554 { 0x09, "AnyContent" },
3555 { 0x0A, "ClientType" },
3556 { 0x0B, "InitialDeliveryMethod" },
3557 { 0x0C, "MultiTrans" },
3558 { 0x0D, "ParserSize" },
3559 { 0x0E, "ServerPollMin" },
3560 { 0x0F, "SupportedBearer" },
3561 { 0x10, "SupportedCIRMethod" },
3562 { 0x11, "TCPAddress" },
3563 { 0x12, "TCPPort" },
3564 { 0x13, "UDPPort" },
3569 /* Presence primitive code page (0x04) */
3570 static const value_string wbxml_wv_csp_10_tags_cp4[] = {
3571 /* 0x00 -- 0x04 GLOBAL */
3572 { 0x05, "CancelAuth-Request" },
3573 { 0x06, "ContactListProperties" },
3574 { 0x07, "CreateAttributeList-Request" },
3575 { 0x08, "CreateList-Request" },
3576 { 0x09, "DefaultAttributeList" },
3577 { 0x0A, "DefaultContactList" },
3578 { 0x0B, "DefaultList" },
3579 { 0x0C, "DeleteAttributeList-Request" },
3580 { 0x0D, "DeleteList-Request" },
3581 { 0x0E, "GetAttributeList-Request" },
3582 { 0x0F, "GetAttributeList-Response" },
3583 { 0x10, "GetList-Request" },
3584 { 0x11, "GetList-Response" },
3585 { 0x12, "GetPresence-Request" },
3586 { 0x13, "GetPresence-Response" },
3587 { 0x14, "GetWatcherList-Request" },
3588 { 0x15, "GetWatcherList-Response" },
3589 { 0x16, "ListManage-Request" },
3590 { 0x17, "ListManage-Response" },
3591 { 0x18, "Presence" },
3592 { 0x19, "PresenceAuth-Request" },
3593 { 0x1A, "PresenceAuth-Response" },
3594 { 0x1B, "PresenceNotification-Request" },
3595 { 0x1C, "PresenceValueList" },
3596 { 0x1D, "SubscribePresence-Request" },
3597 { 0x1E, "UnsubscribePresence-Request" },
3598 { 0x1F, "UpdatePresence-Request" },
3603 /* Presence attribute code page (0x05) */
3604 static const value_string wbxml_wv_csp_10_tags_cp5[] = {
3605 /* 0x00 -- 0x04 GLOBAL */
3606 { 0x05, "Accuracy" },
3607 { 0x06, "Address" },
3608 { 0x07, "AddrPref" },
3610 { 0x09, "Altitude" },
3611 { 0x0A, "Building" },
3614 { 0x0D, "ClientInfo" },
3615 { 0x0E, "ClientProducer" },
3616 { 0x0F, "ClientType" },
3617 { 0x10, "ClientVersion" },
3619 { 0x12, "CommCap" },
3620 { 0x13, "ContactInfo" },
3621 { 0x14, "ContainedvCard" },
3622 { 0x15, "Country" },
3623 { 0x16, "Crossing1" },
3624 { 0x17, "Crossing2" },
3625 { 0x18, "DevManufacturer" },
3626 { 0x19, "DirectContent" },
3627 { 0x1A, "FreeTextLocation" },
3628 { 0x1B, "GeoLocation" },
3629 { 0x1C, "Language" },
3630 { 0x1D, "Latitude" },
3631 { 0x1E, "Longitude" },
3633 { 0x20, "NamedArea" },
3634 { 0x21, "OnlineStatus" },
3637 { 0x24, "PreferredContacts" },
3638 { 0x25, "PreferredLanguage" },
3639 { 0x26, "ReferredContent" },
3640 { 0x27, "ReferredvCard" },
3641 { 0x28, "Registration" },
3642 { 0x29, "StatusContent" },
3643 { 0x2A, "StatusMood" },
3644 { 0x2B, "StatusText" },
3646 { 0x2D, "TimeZone" },
3647 { 0x2E, "UserAvailability" },
3652 /* Messaging code page (0x06) */
3653 static const value_string wbxml_wv_csp_10_tags_cp6[] = {
3654 /* 0x00 -- 0x04 GLOBAL */
3655 { 0x05, "BlockList" },
3656 { 0x06, "BlockUser-Request" },
3657 { 0x07, "DeliveryMethod" },
3658 { 0x08, "DeliveryReport" },
3659 { 0x09, "DeliveryReport-Request" },
3660 { 0x0A, "ForwardMessage-Request" },
3661 { 0x0B, "GetBlockedList-Request" },
3662 { 0x0C, "GetBlockedList-Response" },
3663 { 0x0D, "GetMessageList-Request" },
3664 { 0x0E, "GetMessageList-Response" },
3665 { 0x0F, "GetMessage-Request" },
3666 { 0x10, "GetMessage-Response" },
3667 { 0x11, "GrantList" },
3668 { 0x12, "MessageDelivered" },
3669 { 0x13, "MessageInfo" },
3670 { 0x14, "MessageNotification" },
3671 { 0x15, "NewMessage" },
3672 { 0x16, "RejectMessage-Request" },
3673 { 0x17, "SendMessage-Request" },
3674 { 0x18, "SendMessage-Response" },
3675 { 0x19, "SetDeliveryMethod-Request" },
3680 /* Group code page (0x07) */
3681 static const value_string wbxml_wv_csp_10_tags_cp7[] = {
3682 /* 0x00 -- 0x04 GLOBAL */
3683 { 0x05, "AddGroupMembers-Request" },
3685 { 0x07, "CreateGroup-Request" },
3686 { 0x08, "DeleteGroup-Request" },
3687 { 0x09, "GetGroupMembers-Request" },
3688 { 0x0A, "GetGroupMembers-Response" },
3689 { 0x0B, "GetGroupProps-Request" },
3690 { 0x0C, "GetGroupProps-Response" },
3691 { 0x0D, "GroupChangeNotice" },
3692 { 0x0E, "GroupProperties" },
3694 { 0x10, "JoinedRequest" },
3695 { 0x11, "JoinGroup-Request" },
3696 { 0x12, "JoinGroup-Response" },
3697 { 0x13, "LeaveGroup-Request" },
3698 { 0x14, "LeaveGroup-Response" },
3700 { 0x16, "MemberAccess-Request" },
3702 { 0x18, "OwnProperties" },
3703 { 0x19, "RejectList-Request" },
3704 { 0x1A, "RejectList-Response" },
3705 { 0x1B, "RemoveGroupMembers-Request" },
3706 { 0x1C, "SetGroupProps-Request" },
3707 { 0x1D, "SubscribeGroupNotice-Request" },
3708 { 0x1E, "SubscribeGroupNotice-Response" },
3710 { 0x20, "WelcomeNote" },
3716 * Attribute start tokens
3718 /* common code page (0x00) */
3719 static const value_string wbxml_wv_csp_10_attrStart_cp0[] = {
3720 /* 0x00 -- 0x04 GLOBAL */
3721 { 0x05, "xmlns='http://www.wireless-village.org/CSP'" },
3722 { 0x06, "xmlns='http://www.wireless-village.org/PA'" },
3723 { 0x07, "xmlns='http://www.wireless-village.org/TRC'" },
3729 * Attribute value tokens
3731 /* Common value tokens (0x00) */
3732 static const value_string wbxml_wv_csp_10_attrValue_cp0[] = {
3733 /* 0x80 -- 0x84 GLOBAL */
3734 { 0x85, "AccessType" },
3735 { 0x86, "ActiveUsers" },
3737 { 0x88, "application/" },
3738 { 0x89, "application/vnd.wap.mms-message" },
3739 { 0x8A, "application/x-sms" },
3742 { 0x8D, "Default" },
3743 { 0x8E, "DisplayName" },
3744 { 0x8F, "False (No)" },
3746 { 0x91, "Group (GR)" },
3747 { 0x92, "http://" },
3748 { 0x93, "https://" },
3751 { 0x96, "Instant Messaging (IM)" },
3752 { 0x97, "MaxActiveUsers" },
3756 { 0x9B, "Notify/Get" },
3758 { 0x9D, "Outband" },
3759 { 0x9E, "Presence (PR)" },
3760 { 0x9F, "Private" },
3761 { 0xA0, "PrivateMessaging" },
3762 { 0xA1, "PrivilegeLevel" },
3765 { 0xA4, "Request" },
3766 { 0xA5, "Response" },
3767 { 0xA6, "ScreenName" },
3768 { 0xA7, "Searchable" },
3770 { 0xA9, "Shared Content (SC)" },
3772 { 0xAB, "text/plain" },
3773 { 0xAC, "text/x-vCalendar" },
3774 { 0xAD, "text/x-vCard" },
3776 { 0xAF, "True (Yes)" },
3779 { 0xB2, "User (US)" },
3780 { 0xB3, "www.wireless-village.org" },
3785 /* Access value tokens (0x01) */
3786 static const value_string wbxml_wv_csp_10_attrValue_cp1[] = {
3787 /* 0x80 -- 0x84 GLOBAL */
3788 { 0x85, "GROUP_ID" },
3789 { 0x86, "GROUP_NAME" },
3790 { 0x87, "GROUP_TOPIC" },
3791 { 0x88, "GROUP_USER_ID_JOINED" },
3796 { 0x8D, "USER_ALIAS" },
3797 { 0x8E, "USER_EMAIL_ADDRESS" },
3798 { 0x8F, "USER_FIRST_NAME" },
3799 { 0x90, "USER_ID" },
3800 { 0x91, "USER_LAST_NAME" },
3801 { 0x92, "USER_MOBILE_NUMBER" },
3809 /* Presence value tokens (0x05) */
3810 static const value_string wbxml_wv_csp_10_attrValue_cp5[] = {
3811 /* 0x80 -- 0x84 GLOBAL */
3813 { 0x86, "ANXIOUS" },
3814 { 0x87, "ASHAMED" },
3815 { 0x88, "AUDIO_CALL" },
3816 { 0x89, "AVAILABLE" },
3820 { 0x8D, "COMPUTER" },
3821 { 0x8E, "DISCREET" },
3823 { 0x90, "EXCITED" },
3826 { 0x93, "IM_OFFLINE" },
3827 { 0x94, "IM_ONLINE" },
3828 { 0x95, "IN_LOVE" },
3829 { 0x96, "INVINCIBLE" },
3830 { 0x97, "JEALOUS" },
3832 { 0x99, "MOBILE_PHONE" },
3833 { 0x9A, "NOT_AVAILABLE" },
3839 { 0xA0, "VIDEO_CALL" },
3840 { 0xA1, "VIDEO_STREAM" },
3846 /***** Token code page aggregation *****/
3847 static const value_valuestring wbxml_wv_csp_10_tags[] = {
3848 { 0, wbxml_wv_csp_10_tags_cp0 },
3849 { 1, wbxml_wv_csp_10_tags_cp1 },
3850 { 2, wbxml_wv_csp_10_tags_cp2 },
3851 { 3, wbxml_wv_csp_10_tags_cp3 },
3852 { 4, wbxml_wv_csp_10_tags_cp4 },
3853 { 5, wbxml_wv_csp_10_tags_cp5 },
3854 { 6, wbxml_wv_csp_10_tags_cp6 },
3855 { 7, wbxml_wv_csp_10_tags_cp7 },
3859 static const value_valuestring wbxml_wv_csp_10_attrStart[] = {
3860 { 0, wbxml_wv_csp_10_attrStart_cp0 },
3864 static const value_valuestring wbxml_wv_csp_10_attrValue[] = {
3865 { 0, wbxml_wv_csp_10_attrValue_cp0 },
3866 { 1, wbxml_wv_csp_10_attrValue_cp1 },
3867 { 5, wbxml_wv_csp_10_attrValue_cp5 },
3871 static const wbxml_decoding decode_wv_cspc_10 = {
3872 "Wireless-Village Client-Server Protocol 1.0",
3874 { NULL, NULL, NULL },
3875 wv_csp10_opaque_binary_tag,
3876 wv_csp10_opaque_literal_tag,
3877 default_opaque_binary_attr,
3878 default_opaque_literal_attr,
3880 wbxml_wv_csp_10_tags,
3881 wbxml_wv_csp_10_attrStart,
3882 wbxml_wv_csp_10_attrValue
3891 * Wireless Village Client Server Protocol
3892 ***************************************/
3894 /***** Global extension tokens *****/
3895 static const value_string wbxml_wv_csp_11_global_cp0[] = {
3896 { 0x80, "Common Value" }, /* EXT_T_0 */
3901 /***** Tag tokens *****/
3902 /* Common code page */
3903 static const value_string wbxml_wv_csp_11_tags_cp0[] = {
3904 /* 0x00 -- 0x04 GLOBAL */
3905 { 0x05, "Acceptance" },
3906 { 0x06, "AddList" },
3907 { 0x07, "AddNickList" },
3908 { 0x08, "SName" }, /* Was: Attribute */
3909 { 0x09, "WV-CSP-Message" }, /* Was: AttributeList */
3910 { 0x0A, "ClientID" },
3912 { 0x0C, "ContactList" },
3913 { 0x0D, "ContentData" },
3914 { 0x0E, "ContentEncoding" },
3915 { 0x0F, "ContentSize" },
3916 { 0x10, "ContentType" },
3917 { 0x11, "DateTime" },
3918 { 0x12, "Description" },
3919 { 0x13, "DetailedResult" },
3920 { 0x14, "EntityList" },
3922 { 0x16, "GroupID" },
3923 { 0x17, "GroupList" },
3926 { 0x1A, "MessageCount" },
3927 { 0x1B, "MessageID" },
3928 { 0x1C, "MessageURI" },
3931 { 0x1F, "NickList" },
3932 { 0x20, "NickName" },
3934 { 0x22, "Presence" },
3935 { 0x23, "PresenceSubList" },
3936 { 0x24, "PresenceValue" },
3937 { 0x25, "Property" },
3938 { 0x26, "Qualifier" },
3939 { 0x27, "Recipient" },
3940 { 0x28, "RemoveList" },
3941 { 0x29, "RemoveNickList" },
3943 { 0x2B, "ScreenName" },
3945 { 0x2D, "Session" },
3946 { 0x2E, "SessionDescriptor" },
3947 { 0x2F, "SessionID" },
3948 { 0x30, "SessionType" },
3950 { 0x32, "Transaction" },
3951 { 0x33, "TransactionContent" },
3952 { 0x34, "TransactionDescriptor" },
3953 { 0x35, "TransactionID" },
3954 { 0x36, "TransactionMode" },
3956 { 0x38, "URLList" },
3959 { 0x3B, "UserList" },
3960 { 0x3C, "Validity" },
3962 /* 0x3E - Removed: WV-CSP-Message */
3967 /* Access code page */
3968 static const value_string wbxml_wv_csp_11_tags_cp1[] = {
3969 /* 0x00 -- 0x04 GLOBAL */
3970 { 0x05, "AllFunctions" },
3971 { 0x06, "AllFunctionsRequest" },
3972 { 0x07, "CancelInvite-Request" },
3973 { 0x08, "CancelInviteUser-Request" },
3974 { 0x09, "Capability" },
3975 { 0x0A, "CapabilityList" },
3976 { 0x0B, "CapabilityRequest" },
3977 { 0x0C, "ClientCapability-Request" },
3978 { 0x0D, "ClientCapability-Response" },
3979 { 0x0E, "DigestBytes" },
3980 { 0x0F, "DigestSchema" },
3981 { 0x10, "Disconnect" },
3982 { 0x11, "Functions" },
3983 { 0x12, "GetSPInfo-Request" },
3984 { 0x13, "GetSPInfo-Response" },
3985 { 0x14, "InviteID" },
3986 { 0x15, "InviteNote" },
3987 { 0x16, "Invite-Request" },
3988 { 0x17, "Invite-Response" },
3989 { 0x18, "InviteType" },
3990 { 0x19, "InviteUser-Request" },
3991 { 0x1A, "InviteUser-Response" },
3992 { 0x1B, "KeepAlive-Request" },
3993 { 0x1C, "KeepAliveTime" },
3994 { 0x1D, "Login-Request" },
3995 { 0x1E, "Login-Response" },
3996 { 0x1F, "Logout-Request" },
3998 { 0x21, "Password" },
3999 { 0x22, "Polling-Request" },
4000 { 0x23, "ResponseNote" },
4001 { 0x24, "SearchElement" },
4002 { 0x25, "SearchFindings" },
4003 { 0x26, "SearchID" },
4004 { 0x27, "SearchIndex" },
4005 { 0x28, "SearchLimit" },
4006 { 0x29, "KeepAlive-Response" },
4007 { 0x2A, "SearchPairList" },
4008 { 0x2B, "Search-Request" },
4009 { 0x2C, "Search-Response" },
4010 { 0x2D, "SearchResult" },
4011 { 0x2E, "Service-Request" },
4012 { 0x2F, "Service-Response" },
4013 { 0x30, "SessionCookie" },
4014 { 0x31, "StopSearch-Request" },
4015 { 0x32, "TimeToLive" },
4016 /* New in WV-CSP 1.1 */
4017 { 0x33, "SearchString" },
4018 { 0x34, "CompletionFlag" },
4023 /* Service code page */
4024 /* Same as cp2 of WV-CSP 1.0 */
4025 #define wbxml_wv_csp_11_tags_cp2 wbxml_wv_csp_10_tags_cp2
4027 /* Client capability code page */
4028 static const value_string wbxml_wv_csp_11_tags_cp3[] = {
4029 /* 0x00 -- 0x04 GLOBAL */
4030 { 0x05, "AcceptedCharset" },
4031 { 0x06, "AcceptedContentLength" },
4032 { 0x07, "AcceptedContentType" },
4033 { 0x08, "AcceptedTransferEncoding" },
4034 { 0x09, "AnyContent" },
4035 { 0x0A, "DefaultLanguage" }, /* Was: ClientType */
4036 { 0x0B, "InitialDeliveryMethod" },
4037 { 0x0C, "MultiTrans" },
4038 { 0x0D, "ParserSize" },
4039 { 0x0E, "ServerPollMin" },
4040 { 0x0F, "SupportedBearer" },
4041 { 0x10, "SupportedCIRMethod" },
4042 { 0x11, "TCPAddress" },
4043 { 0x12, "TCPPort" },
4044 { 0x13, "UDPPort" },
4049 /* Presence primitive code page */
4050 static const value_string wbxml_wv_csp_11_tags_cp4[] = {
4051 /* 0x00 -- 0x04 GLOBAL */
4052 { 0x05, "CancelAuth-Request" },
4053 { 0x06, "ContactListProperties" },
4054 { 0x07, "CreateAttributeList-Request" },
4055 { 0x08, "CreateList-Request" },
4056 { 0x09, "DefaultAttributeList" },
4057 { 0x0A, "DefaultContactList" },
4058 { 0x0B, "DefaultList" },
4059 { 0x0C, "DeleteAttributeList-Request" },
4060 { 0x0D, "DeleteList-Request" },
4061 { 0x0E, "GetAttributeList-Request" },
4062 { 0x0F, "GetAttributeList-Response" },
4063 { 0x10, "GetList-Request" },
4064 { 0x11, "GetList-Response" },
4065 { 0x12, "GetPresence-Request" },
4066 { 0x13, "GetPresence-Response" },
4067 { 0x14, "GetWatcherList-Request" },
4068 { 0x15, "GetWatcherList-Response" },
4069 { 0x16, "ListManage-Request" },
4070 { 0x17, "ListManage-Response" },
4071 { 0x18, "UnsubscribePresence-Request" }, /* Was: Presence */
4072 { 0x19, "PresenceAuth-Request" },
4073 { 0x1A, "PresenceAuth-User" }, /* Was: PresenceAuth-Response */
4074 { 0x1B, "PresenceNotification-Request" },
4075 { 0x1C, "UpdatePresence-Request" }, /* Was: PresenceValueList */
4076 { 0x1D, "SubscribePresence-Request" },
4077 /* 0x1E - Removed: UnsubscribePresence-Request */
4078 /* 0x1F - Removed: UpdatePresence-Request */
4083 /* Presence attribute code page */
4084 static const value_string wbxml_wv_csp_11_tags_cp5[] = {
4085 /* 0x00 -- 0x04 GLOBAL */
4086 { 0x05, "Accuracy" },
4087 { 0x06, "Address" },
4088 { 0x07, "AddrPref" },
4090 { 0x09, "Altitude" },
4091 { 0x0A, "Building" },
4094 { 0x0D, "ClientInfo" },
4095 { 0x0E, "ClientProducer" },
4096 { 0x0F, "ClientType" },
4097 { 0x10, "ClientVersion" },
4099 { 0x12, "CommCap" },
4100 { 0x13, "ContactInfo" },
4101 { 0x14, "ContainedvCard" },
4102 { 0x15, "Country" },
4103 { 0x16, "Crossing1" },
4104 { 0x17, "Crossing2" },
4105 { 0x18, "DevManufacturer" },
4106 { 0x19, "DirectContent" },
4107 { 0x1A, "FreeTextLocation" },
4108 { 0x1B, "GeoLocation" },
4109 { 0x1C, "Language" },
4110 { 0x1D, "Latitude" },
4111 { 0x1E, "Longitude" },
4113 { 0x20, "NamedArea" },
4114 { 0x21, "OnlineStatus" },
4117 { 0x24, "PreferredContacts" },
4118 { 0x25, "PreferredLanguage" },
4119 { 0x26, "ReferredContent" },
4120 { 0x27, "ReferredvCard" },
4121 { 0x28, "Registration" },
4122 { 0x29, "StatusContent" },
4123 { 0x2A, "StatusMood" },
4124 { 0x2B, "StatusText" },
4126 { 0x2D, "TimeZone" },
4127 { 0x2E, "UserAvailability" },
4128 /* New in WV-CSP 1.1 */
4131 { 0x31, "Contact" },
4132 { 0x32, "Cpriority" },
4133 { 0x33, "Cstatus" },
4140 /* Messaging code page */
4141 static const value_string wbxml_wv_csp_11_tags_cp6[] = {
4142 /* 0x00 -- 0x04 GLOBAL */
4143 { 0x05, "BlockList" },
4144 { 0x06, "BlockUser-Request" },
4145 { 0x07, "DeliveryMethod" },
4146 { 0x08, "DeliveryReport" },
4147 { 0x09, "DeliveryReport-Request" },
4148 { 0x0A, "ForwardMessage-Request" },
4149 { 0x0B, "GetBlockedList-Request" },
4150 { 0x0C, "GetBlockedList-Response" },
4151 { 0x0D, "GetMessageList-Request" },
4152 { 0x0E, "GetMessageList-Response" },
4153 { 0x0F, "GetMessage-Request" },
4154 { 0x10, "GetMessage-Response" },
4155 { 0x11, "GrantList" },
4156 { 0x12, "MessageDelivered" },
4157 { 0x13, "MessageInfo" },
4158 { 0x14, "MessageNotification" },
4159 { 0x15, "NewMessage" },
4160 { 0x16, "RejectMessage-Request" },
4161 { 0x17, "SendMessage-Request" },
4162 { 0x18, "SendMessage-Response" },
4163 { 0x19, "SetDeliveryMethod-Request" },
4164 /* New in WV-CSP 1.1 */
4165 { 0x1A, "DeliveryTime" },
4170 /* Group code page */
4171 static const value_string wbxml_wv_csp_11_tags_cp7[] = {
4172 /* 0x00 -- 0x04 GLOBAL */
4173 { 0x05, "AddGroupMembers-Request" },
4175 { 0x07, "CreateGroup-Request" },
4176 { 0x08, "DeleteGroup-Request" },
4177 { 0x09, "GetGroupMembers-Request" },
4178 { 0x0A, "GetGroupMembers-Response" },
4179 { 0x0B, "GetGroupProps-Request" },
4180 { 0x0C, "GetGroupProps-Response" },
4181 { 0x0D, "GroupChangeNotice" },
4182 { 0x0E, "GroupProperties" },
4184 { 0x10, "JoinedRequest" },
4185 { 0x11, "JoinGroup-Request" },
4186 { 0x12, "JoinGroup-Response" },
4187 { 0x13, "LeaveGroup-Request" },
4188 { 0x14, "LeaveGroup-Response" },
4190 { 0x16, "MemberAccess-Request" },
4192 { 0x18, "OwnProperties" },
4193 { 0x19, "RejectList-Request" },
4194 { 0x1A, "RejectList-Response" },
4195 { 0x1B, "RemoveGroupMembers-Request" },
4196 { 0x1C, "SetGroupProps-Request" },
4197 { 0x1D, "SubscribeGroupNotice-Request" },
4198 { 0x1E, "SubscribeGroupNotice-Response" },
4200 { 0x20, "WelcomeNote" },
4201 /* New in WV-CSP 1.1 */
4202 { 0x21, "JoinGroup" },
4203 { 0x22, "SubscribeNotification" },
4204 { 0x23, "SubscribeType" },
4209 /***** Attribute Start tokens *****/
4210 /* Common code page */
4211 /* Same as cp0 of WV-CSP 1.0 */
4212 #define wbxml_wv_csp_11_attrStart_cp0 wbxml_wv_csp_10_attrStart_cp0
4214 /***** Attribute Value tokens *****/
4216 * Element value tokens
4218 * NOTE - WV-CSP uses the EXT_T_0 token in a peculiar way: the mb_u_int32
4219 * does *not* reference an offset in the string table, but it refers to
4220 * the index in the following value_string.
4223 * - Values 'T' and 'F' are Boolean values representing "True" and "False"
4224 * (or "Yes" and "No" in some circumstances) respectively.
4225 * - Values 'GR', 'IM', 'PR', 'SC', 'GM' and 'US' are enumerated values
4226 * representing "Group", "Instant Messaging", "Presence", "Shared Content",
4227 * "Group membership" and "User" respectively.
4228 * - Values 'G', 'S' and 'U' are enumerated values representing "Get", "Set"
4229 * and "Unset" respectively.
4230 * - Values 'N' and 'P' are enumerated values representing "Notify/Get" and
4231 * "Push" respectively.
4233 * I repeat: this is NOT a attrValue[] array hence it is not called
4234 * wbxml_wv_XXX but vals_wv_XXX.
4236 * Result: the attribute value token definitions from WV-CSP 1.0 are dropped.
4238 static const value_string vals_wv_csp_11_element_value_tokens[] = {
4240 * Common value tokens
4242 { 0x00, "AccessType" },
4243 { 0x01, "ActiveUsers" },
4245 { 0x03, "application/" },
4246 { 0x04, "application/vnd.wap.mms-message" },
4247 { 0x05, "application/x-sms" },
4248 { 0x06, "AutoJoin" },
4251 { 0x09, "Default" },
4252 { 0x0A, "DisplayName" },
4256 { 0x0E, "http://" },
4257 { 0x0F, "https://" },
4261 { 0x13, "MaxActiveUsers" },
4267 { 0x19, "Outband" },
4269 { 0x1B, "Private" },
4270 { 0x1C, "PrivateMessaging" },
4271 { 0x1D, "PrivilegeLevel" },
4274 { 0x20, "Request" },
4275 { 0x21, "Response" },
4276 { 0x22, "Restricted" },
4277 { 0x23, "ScreenName" },
4278 { 0x24, "Searchable" },
4282 { 0x28, "text/plain" },
4283 { 0x29, "text/x-vCalendar" },
4284 { 0x2A, "text/x-vCard" },
4290 { 0x30, "www.wireless-village.org" },
4292 * Access value tokens
4294 { 0x3D, "GROUP_ID" },
4295 { 0x3E, "GROUP_NAME" },
4296 { 0x3F, "GROUP_TOPIC" },
4297 { 0x40, "GROUP_USER_ID_JOINED" },
4298 { 0x41, "GROUP_USER_ID_OWNER" },
4303 { 0x46, "USER_ALIAS" },
4304 { 0x47, "USER_EMAIL_ADDRESS" },
4305 { 0x48, "USER_FIRST_NAME" },
4306 { 0x49, "USER_ID" },
4307 { 0x4A, "USER_LAST_NAME" },
4308 { 0x4B, "USER_MOBILE_NUMBER" },
4309 { 0x4C, "USER_ONLINE_STATUS" },
4314 * Presence value tokens
4317 { 0x5C, "ANXIOUS" },
4318 { 0x5D, "ASHAMED" },
4319 { 0x5E, "AUDIO_CALL" },
4320 { 0x5F, "AVAILABLE" },
4324 { 0x63, "COMPUTER" },
4325 { 0x64, "DISCREET" },
4327 { 0x66, "EXCITED" },
4330 { 0x69, "IM_OFFLINE" },
4331 { 0x6A, "IM_ONLINE" },
4332 { 0x6B, "IN_LOVE" },
4333 { 0x6C, "INVINCIBLE" },
4334 { 0x6D, "JEALOUS" },
4336 { 0x6F, "MOBILE_PHONE" },
4337 { 0x70, "NOT_AVAILABLE" },
4343 { 0x76, "VIDEO_CALL" },
4344 { 0x77, "VIDEO_STREAM" },
4350 /***** Token code page aggregation *****/
4353 ext_t_0_wv_cspc_11(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
4355 char *str = g_strdup_printf("Common Value: '%s'",
4356 val_to_str(value, vals_wv_csp_11_element_value_tokens,
4357 "<Unknown WV-CSP 1.1 Common Value token 0x%X>"));
4361 static const value_valuestring wbxml_wv_csp_11_global[] = {
4362 { 0, wbxml_wv_csp_11_global_cp0 },
4366 static const value_valuestring wbxml_wv_csp_11_tags[] = {
4367 { 0, wbxml_wv_csp_11_tags_cp0 },
4368 { 1, wbxml_wv_csp_11_tags_cp1 },
4369 { 2, wbxml_wv_csp_11_tags_cp2 },
4370 { 3, wbxml_wv_csp_11_tags_cp3 },
4371 { 4, wbxml_wv_csp_11_tags_cp4 },
4372 { 5, wbxml_wv_csp_11_tags_cp5 },
4373 { 6, wbxml_wv_csp_11_tags_cp6 },
4374 { 7, wbxml_wv_csp_11_tags_cp7 },
4378 static const value_valuestring wbxml_wv_csp_11_attrStart[] = {
4379 { 0, wbxml_wv_csp_11_attrStart_cp0 },
4383 static const wbxml_decoding decode_wv_cspc_11 = {
4384 "Wireless-Village Client-Server Protocol 1.1",
4386 { ext_t_0_wv_cspc_11, NULL, NULL },
4387 wv_csp11_opaque_binary_tag,
4388 wv_csp11_opaque_literal_tag,
4389 default_opaque_binary_attr,
4390 default_opaque_literal_attr,
4391 wbxml_wv_csp_11_global,
4392 wbxml_wv_csp_11_tags,
4393 wbxml_wv_csp_11_attrStart,
4403 * Wireless Village Client Server Protocol
4404 ***************************************/
4406 /***** Global extension tokens *****/
4407 /* Same as WV-CSP 1.1 */
4409 /***** Tag tokens *****/
4410 /* Common code page */
4411 /* Same as cp0 of WV-CSP 1.1 */
4412 #define wbxml_wv_csp_12_tags_cp0 wbxml_wv_csp_11_tags_cp0
4413 /* Note that the table continues in code page 0x09 */
4415 /* Access code page (0x01) */
4416 static const value_string wbxml_wv_csp_12_tags_cp1[] = {
4417 /* 0x00 -- 0x04 GLOBAL */
4418 { 0x05, "AllFunctions" },
4419 { 0x06, "AllFunctionsRequest" },
4420 { 0x07, "CancelInvite-Request" },
4421 { 0x08, "CancelInviteUser-Request" },
4422 { 0x09, "Capability" },
4423 { 0x0A, "CapabilityList" },
4424 { 0x0B, "CapabilityRequest" },
4425 { 0x0C, "ClientCapability-Request" },
4426 { 0x0D, "ClientCapability-Response" },
4427 { 0x0E, "DigestBytes" },
4428 { 0x0F, "DigestSchema" },
4429 { 0x10, "Disconnect" },
4430 { 0x11, "Functions" },
4431 { 0x12, "GetSPInfo-Request" },
4432 { 0x13, "GetSPInfo-Response" },
4433 { 0x14, "InviteID" },
4434 { 0x15, "InviteNote" },
4435 { 0x16, "Invite-Request" },
4436 { 0x17, "Invite-Response" },
4437 { 0x18, "InviteType" },
4438 { 0x19, "InviteUser-Request" },
4439 { 0x1A, "InviteUser-Response" },
4440 { 0x1B, "KeepAlive-Request" },
4441 { 0x1C, "KeepAliveTime" },
4442 { 0x1D, "Login-Request" },
4443 { 0x1E, "Login-Response" },
4444 { 0x1F, "Logout-Request" },
4446 { 0x21, "Password" },
4447 { 0x22, "Polling-Request" },
4448 { 0x23, "ResponseNote" },
4449 { 0x24, "SearchElement" },
4450 { 0x25, "SearchFindings" },
4451 { 0x26, "SearchID" },
4452 { 0x27, "SearchIndex" },
4453 { 0x28, "SearchLimit" },
4454 { 0x29, "KeepAlive-Response" },
4455 { 0x2A, "SearchPairList" },
4456 { 0x2B, "Search-Request" },
4457 { 0x2C, "Search-Response" },
4458 { 0x2D, "SearchResult" },
4459 { 0x2E, "Service-Request" },
4460 { 0x2F, "Service-Response" },
4461 { 0x30, "SessionCookie" },
4462 { 0x31, "StopSearch-Request" },
4463 { 0x32, "TimeToLive" },
4464 /* New in WV-CSP 1.1 */
4465 { 0x33, "SearchString" },
4466 { 0x34, "CompletionFlag" },
4467 /* New in WV-CSP 1.2 */
4468 { 0x36, "ReceiveList" },
4469 { 0x37, "VerifyID-Request" },
4470 { 0x38, "Extended-Request" },
4471 { 0x39, "Extended-Response" },
4472 { 0x3A, "AgreedCapabilityList" },
4473 { 0x3B, "ExtendedData" },
4474 { 0x3C, "OtherServer" },
4475 { 0x3D, "PresenceAttributeNSName" },
4476 { 0x3E, "SessionNSName" },
4477 { 0x3F, "TransactionNSName" },
4481 /* Note that the table continues in code page 0x0A */
4483 /* Service code page (0x02) */
4484 static const value_string wbxml_wv_csp_12_tags_cp2[] = {
4485 /* 0x00 -- 0x04 GLOBAL */
4487 { 0x06, "AttListFunc" },
4493 { 0x0C, "ContListFunc" },
4498 { 0x11, "FundamentalFeat" },
4511 { 0x1E, "GroupAuthFunc" },
4512 { 0x1F, "GroupFeat" },
4513 { 0x20, "GroupMgmtFunc" },
4514 { 0x21, "GroupUseFunc" },
4515 { 0x22, "IMAuthFunc" },
4517 { 0x24, "IMReceiveFunc" },
4518 { 0x25, "IMSendFunc" },
4520 { 0x27, "InviteFunc" },
4526 { 0x2D, "PresenceAuthFunc" },
4527 { 0x2E, "PresenceDeliverFunc" },
4528 { 0x2F, "PresenceFeat" },
4533 { 0x34, "SearchFunc" },
4534 { 0x35, "ServiceFunc" },
4541 { 0x3C, "WVCSPFeat" },
4542 /* New in WV-CSP 1.2 */
4549 /* Note that the table continues in code page 0x08 */
4551 /* Client capability code page (0x03) */
4552 static const value_string wbxml_wv_csp_12_tags_cp3[] = {
4553 /* 0x00 -- 0x04 GLOBAL */
4554 { 0x05, "AcceptedCharset" },
4555 { 0x06, "AcceptedContentLength" },
4556 { 0x07, "AcceptedContentType" },
4557 { 0x08, "AcceptedTransferEncoding" },
4558 { 0x09, "AnyContent" },
4559 { 0x0A, "DefaultLanguage" },
4560 { 0x0B, "InitialDeliveryMethod" },
4561 { 0x0C, "MultiTrans" },
4562 { 0x0D, "ParserSize" },
4563 { 0x0E, "ServerPollMin" },
4564 { 0x0F, "SupportedBearer" },
4565 { 0x10, "SupportedCIRMethod" },
4566 { 0x11, "TCPAddress" },
4567 { 0x12, "TCPPort" },
4568 { 0x13, "UDPPort" },
4576 /* Presence primitive code page (0x04) */
4577 static const value_string wbxml_wv_csp_12_tags_cp4[] = {
4578 /* 0x00 -- 0x04 GLOBAL */
4579 { 0x05, "CancelAuth-Request" },
4580 { 0x06, "ContactListProperties" },
4581 { 0x07, "CreateAttributeList-Request" },
4582 { 0x08, "CreateList-Request" },
4583 { 0x09, "DefaultAttributeList" },
4584 { 0x0A, "DefaultContactList" },
4585 { 0x0B, "DefaultList" },
4586 { 0x0C, "DeleteAttributeList-Request" },
4587 { 0x0D, "DeleteList-Request" },
4588 { 0x0E, "GetAttributeList-Request" },
4589 { 0x0F, "GetAttributeList-Response" },
4590 { 0x10, "GetList-Request" },
4591 { 0x11, "GetList-Response" },
4592 { 0x12, "GetPresence-Request" },
4593 { 0x13, "GetPresence-Response" },
4594 { 0x14, "GetWatcherList-Request" },
4595 { 0x15, "GetWatcherList-Response" },
4596 { 0x16, "ListManage-Request" },
4597 { 0x17, "ListManage-Response" },
4598 { 0x18, "UnsubscribePresence-Request" },
4599 { 0x19, "PresenceAuth-Request" },
4600 { 0x1A, "PresenceAuth-User" },
4601 { 0x1B, "PresenceNotification-Request" },
4602 { 0x1C, "UpdatePresence-Request" },
4603 { 0x1D, "SubscribePresence-Request" },
4604 /* New in WV-CSP 1.2 */
4605 { 0x1E, "Auto-Subscribe" },
4606 /* 0x1E was defined in WV-CSP 1.0: UnsubscribePresence-Request */
4607 { 0x1F, "GetReactiveAuthStatus-Request" },
4608 /* 0x1F was defined in WV-CSP 1.0: UpdatePresence-Request */
4609 { 0x20, "GetReactiveAuthStatus-Response" },
4614 /* Presence attribute code page (0x05) */
4615 static const value_string wbxml_wv_csp_12_tags_cp5[] = {
4616 /* 0x00 -- 0x04 GLOBAL */
4617 { 0x05, "Accuracy" },
4618 { 0x06, "Address" },
4619 { 0x07, "AddrPref" },
4621 { 0x09, "Altitude" },
4622 { 0x0A, "Building" },
4625 { 0x0D, "ClientInfo" },
4626 { 0x0E, "ClientProducer" },
4627 { 0x0F, "ClientType" },
4628 { 0x10, "ClientVersion" },
4630 { 0x12, "CommCap" },
4631 { 0x13, "ContactInfo" },
4632 { 0x14, "ContainedvCard" },
4633 { 0x15, "Country" },
4634 { 0x16, "Crossing1" },
4635 { 0x17, "Crossing2" },
4636 { 0x18, "DevManufacturer" },
4637 { 0x19, "DirectContent" },
4638 { 0x1A, "FreeTextLocation" },
4639 { 0x1B, "GeoLocation" },
4640 { 0x1C, "Language" },
4641 { 0x1D, "Latitude" },
4642 { 0x1E, "Longitude" },
4644 { 0x20, "NamedArea" },
4645 { 0x21, "OnlineStatus" },
4648 { 0x24, "PreferredContacts" },
4649 { 0x25, "PreferredLanguage" },
4650 { 0x26, "ReferredContent" },
4651 { 0x27, "ReferredvCard" },
4652 { 0x28, "Registration" },
4653 { 0x29, "StatusContent" },
4654 { 0x2A, "StatusMood" },
4655 { 0x2B, "StatusText" },
4657 { 0x2D, "TimeZone" },
4658 { 0x2E, "UserAvailability" },
4659 /* New in WV-CSP 1.1 */
4662 { 0x31, "Contact" },
4663 { 0x32, "Cpriority" },
4664 { 0x33, "Cstatus" },
4667 /* New in WV-CSP 1.2 */
4668 { 0x36, "ContentType" },
4669 { 0x37, "Inf_link" },
4670 { 0x38, "InfoLink" },
4677 /* Messaging code page (0x06) */
4678 static const value_string wbxml_wv_csp_12_tags_cp6[] = {
4679 /* 0x00 -- 0x04 GLOBAL */
4680 { 0x05, "BlockList" },
4681 { 0x06, "BlockEntity-Request" }, /* Was: BlockUser-Request */
4682 { 0x07, "DeliveryMethod" },
4683 { 0x08, "DeliveryReport" },
4684 { 0x09, "DeliveryReport-Request" },
4685 { 0x0A, "ForwardMessage-Request" },
4686 { 0x0B, "GetBlockedList-Request" },
4687 { 0x0C, "GetBlockedList-Response" },
4688 { 0x0D, "GetMessageList-Request" },
4689 { 0x0E, "GetMessageList-Response" },
4690 { 0x0F, "GetMessage-Request" },
4691 { 0x10, "GetMessage-Response" },
4692 { 0x11, "GrantList" },
4693 { 0x12, "MessageDelivered" },
4694 { 0x13, "MessageInfo" },
4695 { 0x14, "MessageNotification" },
4696 { 0x15, "NewMessage" },
4697 { 0x16, "RejectMessage-Request" },
4698 { 0x17, "SendMessage-Request" },
4699 { 0x18, "SendMessage-Response" },
4700 { 0x19, "SetDeliveryMethod-Request" },
4701 { 0x1A, "DeliveryTime" },
4706 /* Group code page (0x07) */
4707 static const value_string wbxml_wv_csp_12_tags_cp7[] = {
4708 /* 0x00 -- 0x04 GLOBAL */
4709 { 0x05, "AddGroupMembers-Request" },
4711 { 0x07, "CreateGroup-Request" },
4712 { 0x08, "DeleteGroup-Request" },
4713 { 0x09, "GetGroupMembers-Request" },
4714 { 0x0A, "GetGroupMembers-Response" },
4715 { 0x0B, "GetGroupProps-Request" },
4716 { 0x0C, "GetGroupProps-Response" },
4717 { 0x0D, "GroupChangeNotice" },
4718 { 0x0E, "GroupProperties" },
4720 { 0x10, "JoinedRequest" },
4721 { 0x11, "JoinGroup-Request" },
4722 { 0x12, "JoinGroup-Response" },
4723 { 0x13, "LeaveGroup-Request" },
4724 { 0x14, "LeaveGroup-Response" },
4726 { 0x16, "MemberAccess-Request" },
4728 { 0x18, "OwnProperties" },
4729 { 0x19, "RejectList-Request" },
4730 { 0x1A, "RejectList-Response" },
4731 { 0x1B, "RemoveGroupMembers-Request" },
4732 { 0x1C, "SetGroupProps-Request" },
4733 { 0x1D, "SubscribeGroupNotice-Request" },
4734 { 0x1E, "SubscribeGroupNotice-Response" },
4736 { 0x20, "WelcomeNote" },
4737 /* New in WV-CSP 1.1 */
4738 { 0x21, "JoinGroup" },
4739 { 0x22, "SubscribeNotification" },
4740 { 0x23, "SubscribeType" },
4741 /* New in WV-CSP 1.2 */
4742 { 0x24, "GetJoinedUsers-Request" },
4743 { 0x25, "GetJoinedUsers-Response" },
4744 { 0x26, "AdminMapList" },
4745 { 0x27, "AdminMapping" },
4746 { 0x28, "Mapping" },
4747 { 0x29, "ModMapping" },
4748 { 0x2A, "UserMapList" },
4749 { 0x2B, "UserMapping" },
4754 /* Service negotiation code page - continued (0x08) */
4755 static const value_string wbxml_wv_csp_12_tags_cp8[] = {
4756 /* 0x00 -- 0x04 GLOBAL */
4761 { 0x09, "VerifyIDFunc" },
4766 /* Common code page - continued (0x09) */
4767 static const value_string wbxml_wv_csp_12_tags_cp9[] = {
4768 /* 0x00 -- 0x04 GLOBAL */
4771 { 0x07, "ExtBlock" },
4772 { 0x08, "HistoryPeriod" },
4774 { 0x0A, "MaxWatcherList" },
4775 { 0x0B, "ReactiveAuthState" },
4776 { 0x0C, "ReactiveAuthStatus" },
4777 { 0x0D, "ReactiveAuthStatusList" },
4778 { 0x0E, "Watcher" },
4779 { 0x0F, "WatcherStatus" },
4784 /* Access code page - continued (0x0A) */
4785 static const value_string wbxml_wv_csp_12_tags_cp10[] = {
4786 /* 0x00 -- 0x04 GLOBAL */
4787 { 0x05, "WV-CSP-NSDiscovery-Request" },
4788 { 0x06, "WV-CSP-NSDiscovery-Response" },
4789 { 0x07, "VersionList" },
4794 /***** Attribute Start tokens *****/
4795 /* Common code page (0x00) */
4796 static const value_string wbxml_wv_csp_12_attrStart_cp0[] = {
4797 /* 0x00 -- 0x04 GLOBAL */
4798 { 0x05, "xmlns='http://www.wireless-village.org/CSP'" },
4799 { 0x06, "xmlns='http://www.wireless-village.org/PA'" },
4800 { 0x07, "xmlns='http://www.wireless-village.org/TRC'" },
4801 /* New in WV-CSP 1.2 */
4802 { 0x08, "xmlns='http://www.openmobilealliance.org/DTD/WV-CSP'" },
4803 { 0x09, "xmlns='http://www.openmobilealliance.org/DTD/WV-PA'" },
4804 { 0x0A, "xmlns http://www.openmobilealliance.org/DTD/WV-TRC'" },
4809 /***** Attribute Value tokens *****/
4811 * Element value tokens
4813 * NOTE - WV-CSP uses the EXT_T_0 token in a peculiar way: the mb_u_int32
4814 * does *not* reference an offset in the string table, but it refers to
4815 * the index in the following value_string.
4818 * - Values 'T' and 'F' are Boolean values representing "True" and "False"
4819 * (or "Yes" and "No" in some circumstances) respectively.
4820 * - Values 'GR', 'IM', 'PR', 'SC', 'GM' and 'US' are enumerated values
4821 * representing "Group", "Instant Messaging", "Presence", "Shared Content",
4822 * "Group membership" and "User" respectively.
4823 * - Values 'G', 'S' and 'U' are enumerated values representing "Get", "Set"
4824 * and "Unset" respectively.
4825 * - Values 'N' and 'P' are enumerated values representing "Notify/Get" and
4826 * "Push" respectively.
4828 * I repeat: this is NOT a attrValue[] array hence it is not called
4829 * wbxml_wv_XXX but vals_wv_XXX.
4831 static const value_string vals_wv_csp_12_element_value_tokens[] = {
4833 * Common value tokens
4835 { 0x00, "AccessType" },
4836 { 0x01, "ActiveUsers" },
4838 { 0x03, "application/" },
4839 { 0x04, "application/vnd.wap.mms-message" },
4840 { 0x05, "application/x-sms" },
4841 { 0x06, "AutoJoin" },
4844 { 0x09, "Default" },
4845 { 0x0A, "DisplayName" },
4849 { 0x0E, "http://" },
4850 { 0x0F, "https://" },
4854 { 0x13, "MaxActiveUsers" },
4860 { 0x19, "Outband" },
4862 { 0x1B, "Private" },
4863 { 0x1C, "PrivateMessaging" },
4864 { 0x1D, "PrivilegeLevel" },
4867 { 0x20, "Request" },
4868 { 0x21, "Response" },
4869 { 0x22, "Restricted" },
4870 { 0x23, "ScreenName" },
4871 { 0x24, "Searchable" },
4875 { 0x28, "text/plain" },
4876 { 0x29, "text/x-vCalendar" },
4877 { 0x2A, "text/x-vCard" },
4883 { 0x30, "www.wireless-village.org" },
4884 /* New in WV-CSP 1.2 */
4885 { 0x31, "AutoDelete" },
4887 { 0x33, "Validity" },
4889 { 0x35, "GRANTED" },
4890 { 0x36, "PENDING" },
4894 * Access value tokens
4896 { 0x3D, "GROUP_ID" },
4897 { 0x3E, "GROUP_NAME" },
4898 { 0x3F, "GROUP_TOPIC" },
4899 { 0x40, "GROUP_USER_ID_JOINED" },
4900 { 0x41, "GROUP_USER_ID_OWNER" },
4905 { 0x46, "USER_ALIAS" },
4906 { 0x47, "USER_EMAIL_ADDRESS" },
4907 { 0x48, "USER_FIRST_NAME" },
4908 { 0x49, "USER_ID" },
4909 { 0x4A, "USER_LAST_NAME" },
4910 { 0x4B, "USER_MOBILE_NUMBER" },
4911 { 0x4C, "USER_ONLINE_STATUS" },
4915 /* New in WV-CSP 1.2 */
4916 { 0x50, "GROUP_USER_ID_AUTOJOIN" },
4918 * Presence value tokens
4921 { 0x5C, "ANXIOUS" },
4922 { 0x5D, "ASHAMED" },
4923 { 0x5E, "AUDIO_CALL" },
4924 { 0x5F, "AVAILABLE" },
4928 { 0x63, "COMPUTER" },
4929 { 0x64, "DISCREET" },
4931 { 0x66, "EXCITED" },
4933 /* { 0x68, "IM" }, Obsolete */
4934 { 0x69, "IM_OFFLINE" },
4935 { 0x6A, "IM_ONLINE" },
4936 { 0x6B, "IN_LOVE" },
4937 { 0x6C, "INVINCIBLE" },
4938 { 0x6D, "JEALOUS" },
4940 { 0x6F, "MOBILE_PHONE" },
4941 { 0x70, "NOT_AVAILABLE" },
4947 { 0x76, "VIDEO_CALL" },
4948 { 0x77, "VIDEO_STREAM" },
4951 * Access value tokens - continued
4961 /***** Token code page aggregation *****/
4964 ext_t_0_wv_cspc_12(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
4966 char *str = g_strdup_printf("Common Value: '%s'",
4967 val_to_str(value, vals_wv_csp_12_element_value_tokens,
4968 "<Unknown WV-CSP 1.2 Common Value token 0x%X>"));
4972 #define wbxml_wv_csp_12_global wbxml_wv_csp_11_global
4974 static const value_valuestring wbxml_wv_csp_12_tags[] = {
4975 { 0, wbxml_wv_csp_12_tags_cp0 },
4976 { 1, wbxml_wv_csp_12_tags_cp1 },
4977 { 2, wbxml_wv_csp_12_tags_cp2 },
4978 { 3, wbxml_wv_csp_12_tags_cp3 },
4979 { 4, wbxml_wv_csp_12_tags_cp4 },
4980 { 5, wbxml_wv_csp_12_tags_cp5 },
4981 { 6, wbxml_wv_csp_12_tags_cp6 },
4982 { 7, wbxml_wv_csp_12_tags_cp7 },
4983 { 8, wbxml_wv_csp_12_tags_cp8 },
4984 { 9, wbxml_wv_csp_12_tags_cp9 },
4985 { 10, wbxml_wv_csp_12_tags_cp10 },
4989 static const value_valuestring wbxml_wv_csp_12_attrStart[] = {
4990 { 0, wbxml_wv_csp_12_attrStart_cp0 },
4994 static const wbxml_decoding decode_wv_cspc_12 = {
4995 "Wireless-Village Client-Server Protocol 1.2",
4997 { ext_t_0_wv_cspc_12, NULL, NULL },
4998 wv_csp12_opaque_binary_tag,
4999 wv_csp12_opaque_literal_tag,
5000 default_opaque_binary_attr,
5001 default_opaque_literal_attr,
5002 wbxml_wv_csp_12_global,
5003 wbxml_wv_csp_12_tags,
5004 wbxml_wv_csp_12_attrStart,
5011 * Wireless Village Client Server Protocol
5012 ***************************************/
5014 /***** Global extension tokens *****/
5015 /* Same as WV-CSP 1.1 */
5017 /***** Tag tokens *****/
5018 /* Common code page */
5019 static const value_string wbxml_wv_csp_13_tags_cp0[] = {
5020 /* 0x00 -- 0x04 GLOBAL */
5021 { 0x05, "Acceptance"},
5022 { 0x06, "AddList" },
5023 { 0x07, "AddNickList"},
5024 { 0x09, "WV-CSP-Message"},
5025 { 0x0A, "ClientID"},
5027 { 0x0C, "ContactList"},
5028 { 0x0D, "ContentData"},
5029 { 0x0E, "ContentEncoding"},
5030 { 0x0F, "ContentSize" },
5031 { 0x10, "ContentType"},
5032 { 0x11, "DateTime" },
5033 { 0x12, "Description" },
5034 { 0x13, "DetailedResult"},
5035 { 0x14, "EntityList"},
5038 { 0x17, "GroupList"},
5040 { 0x1A, "MessageCount" },
5041 { 0x1B, "MessageID" },
5042 { 0x1C, "MessageURI"},
5045 { 0x1F, "NickList"},
5046 { 0x20, "NickName"},
5048 { 0x22, "Presence"},
5049 { 0x23, "PresenceSubList" },
5050 { 0x24, "PresenceValue"},
5051 { 0x25, "Property" },
5052 { 0x26, "Qualifier" },
5053 { 0x27, "Recipient" },
5054 { 0x28, "RemoveList"},
5055 { 0x29, "RemoveNickList" },
5057 { 0x2B, "ScreenName"},
5060 { 0x2E, "SessionDescriptor" },
5061 { 0x2F, "SessionID"},
5062 { 0x30, "SessionType" },
5065 { 0x32, "Transaction" },
5066 { 0x33, "TransactionContent" },
5067 { 0x34, "TransactionDescriptor"},
5068 { 0x35, "TransactionID"},
5069 { 0x36, "TransactionMode" },
5074 { 0x3B, "UserList" },
5075 { 0x3C, "Validity" },
5080 /* Note that the table continues in code page 0x09 */
5082 /* Access code page (0x01) */
5083 static const value_string wbxml_wv_csp_13_tags_cp1[] = {
5084 /* 0x00 -- 0x04 GLOBAL */
5085 { 0x05, "AllFunctions" },
5086 { 0x06, "AllFunctionsRequest" },
5087 { 0x07, "CancelInvite-Request" },
5088 { 0x08, "CancelInviteUser-Request" },
5089 /* { 0x09, "Capability" }, - removed in WV 1.3*/
5090 { 0x0A, "CapabilityList" },
5091 { 0x0B, "CapabilityRequest" },
5092 { 0x0C, "ClientCapability-Request" },
5093 { 0x0D, "ClientCapability-Response" },
5094 { 0x0E, "DigestBytes" },
5095 { 0x0F, "DigestSchema" },
5096 { 0x10, "Disconnect" },
5097 { 0x11, "Functions" },
5098 { 0x12, "GetSPInfo-Request" },
5099 { 0x13, "GetSPInfo-Response" },
5100 { 0x14, "InviteID" },
5101 { 0x15, "InviteNote" },
5102 { 0x16, "Invite-Request" },
5103 { 0x17, "Invite-Response" },
5104 { 0x18, "InviteType" },
5105 { 0x19, "InviteUser-Request" },
5106 { 0x1A, "InviteUser-Response" },
5107 { 0x1B, "KeepAlive-Request" },
5108 { 0x1C, "KeepAliveTime" },
5109 { 0x1D, "Login-Request" },
5110 { 0x1E, "Login-Response" },
5111 { 0x1F, "Logout-Request" },
5113 { 0x21, "Password" },
5114 { 0x22, "Polling-Request" },
5115 { 0x23, "ResponseNote" },
5116 { 0x24, "SearchElement" },
5117 { 0x25, "SearchFindings" },
5118 { 0x26, "SearchID" },
5119 { 0x27, "SearchIndex" },
5120 { 0x28, "SearchLimit" },
5121 { 0x29, "KeepAlive-Response" },
5122 { 0x2A, "SearchPairList" },
5123 { 0x2B, "Search-Request" },
5124 { 0x2C, "Search-Response" },
5125 { 0x2D, "SearchResult" },
5126 { 0x2E, "Service-Request" },
5127 { 0x2F, "Service-Response" },
5128 { 0x30, "SessionCookie" },
5129 { 0x31, "StopSearch-Request" },
5130 { 0x32, "TimeToLive" },
5131 /* New in WV-CSP 1.1 */
5132 { 0x33, "SearchString" },
5133 { 0x34, "CompletionFlag" },
5134 /* New in WV-CSP 1.2 */
5135 { 0x36, "ReceiveList" },
5136 { 0x37, "VerifyID-Request" },
5137 { 0x38, "Extended-Request" },
5138 { 0x39, "Extended-Response" },
5139 { 0x3A, "AgreedCapabilityList" },
5140 { 0x3B, "ExtendedData" },
5141 { 0x3C, "OtherServer" },
5142 { 0x3D, "PresenceAttributeNSName" },
5143 { 0x3E, "SessionNSName" },
5144 { 0x3F, "TransactionNSName" },
5148 /* Note that the table continues in code page 0x0A */
5150 /* Service code page (0x02) */
5151 static const value_string wbxml_wv_csp_13_tags_cp2[] = {
5152 /* 0x00 -- 0x04 GLOBAL */
5154 /* { 0x06, "AttListFunc" }, removed in WV 1.3 */
5156 /* { 0x08, "CAAUT" }, removed in WV 1.3 */
5158 /* { 0x0A, "CALI" }, removed in WV 1.3 */
5160 { 0x0C, "ContListFunc" },
5165 { 0x11, "FundamentalFeat" },
5167 /* { 0x13, "GALS" }, removed in WV 1.3 */
5178 { 0x1E, "GroupAuthFunc" },
5179 { 0x1F, "GroupFeat" },
5180 { 0x20, "GroupMgmtFunc" },
5181 { 0x21, "GroupUseFunc" },
5182 { 0x22, "IMAuthFunc" },
5184 { 0x24, "IMReceiveFunc" },
5185 { 0x25, "IMSendFunc" },
5187 { 0x27, "InviteFunc" },
5193 { 0x2D, "PresenceAuthFunc" },
5194 { 0x2E, "PresenceDeliverFunc"},
5195 { 0x2F, "PresenceFeat" },
5196 /* { 0x30, "REACT" }, removed in WV 1.3 */
5200 { 0x34, "SearchFunc" },
5201 { 0x35, "ServiceFunc" },
5208 { 0x3C, "WVCSPFeat" },
5209 /* New in WV-CSP 1.2 */
5216 /* Note that the table continues in code page 0x08 */
5218 /* Client capability code page (0x03) */
5219 static const value_string wbxml_wv_csp_13_tags_cp3[] = {
5220 /* 0x00 -- 0x04 GLOBAL */
5221 /* {0x05, "AcceptedCharset"}, - removed in WV 1.3 */
5222 /* { 0x06, "AcceptedContentLength"}, - removed in WV 1.3 */
5223 { 0x07, "AcceptedContentType"},
5224 { 0x08, "AcceptedTransferEncoding"},
5225 { 0x09, "AnyContent"},
5226 { 0x0A, "DefaultLanguage"},
5227 { 0x0B, "InitialDeliveryMethod"},
5228 { 0x0C, "MultiTrans"},
5229 { 0x0D, "ParserSize"},
5230 { 0x0E, "ServerPollMin"},
5231 { 0x0F, "SupportedBearer"},
5232 { 0x10, "SupportedCIRMethod"},
5233 { 0x11, "TCPAddress"},
5236 /* New in WV-CSP 1.3*/
5237 { 0x14, "CIRHTTPAddress"},
5238 { 0x15, "UDPAddress"},
5239 { 0x16, "AcceptedPullLength"},
5240 { 0x17, "AcceptedPushLength"},
5241 { 0x18, "AcceptedRichContentLength"},
5242 { 0x19, "AcceptedTextContentLength"},
5243 { 0x1A, "OfflineETEMHandling"},
5244 { 0x1B, "PlainTextCharset"},
5245 { 0x1C, "SessionPriority"},
5246 { 0x1D, "SupportedOfflineBearer"},
5247 { 0x1F, "UserSessionLimit"},
5248 { 0x20, "CIRSMSAddress"},
5249 { 0x21, "MultiTransPerMessage"},
5250 { 0x22, "OnlineETEMHandling"},
5251 { 0x23,"ContentPolicy"},
5252 { 0x24, "ContentPolicyLimit"},
5257 /* Presence primitive code page (0x04) */
5258 static const value_string wbxml_wv_csp_13_tags_cp4[] = {
5259 /* 0x00 -- 0x04 GLOBAL */
5260 /* { 0x05, "CancelAuth-Request" }, - removed in WV 1.3 */
5261 { 0x06, "ContactListProperties" },
5262 { 0x07, "CreateAttributeList-Request" },
5263 { 0x08, "CreateList-Request" },
5264 { 0x09, "DefaultAttributeList" },
5265 { 0x0A, "DefaultContactList" },
5266 { 0x0B, "DefaultList" },
5267 { 0x0C, "DeleteAttributeList-Request" },
5268 { 0x0D, "DeleteList-Request" },
5269 { 0x0E, "GetAttributeList-Request" },
5270 { 0x0F, "GetAttributeList-Response" },
5271 { 0x10, "GetList-Request" },
5272 { 0x11, "GetList-Response" },
5273 { 0x12, "GetPresence-Request" },
5274 { 0x13, "GetPresence-Response" },
5275 { 0x14, "GetWatcherList-Request" },
5276 { 0x15, "GetWatcherList-Response" },
5277 { 0x16, "ListManage-Request" },
5278 { 0x17, "ListManage-Response" },
5279 { 0x18, "UnsubscribePresence-Request" },
5280 { 0x19, "PresenceAuth-Request" },
5281 { 0x1A, "PresenceAuth-User" },
5282 { 0x1B, "PresenceNotification-Request" },
5283 { 0x1C, "UpdatePresence-Request" },
5284 { 0x1D, "SubscribePresence-Request" },
5285 /* New in WV-CSP 1.2 */
5286 /* { 0x1E, "Auto-Subscribe" }, - removed in WV 1.3 */
5287 /* { 0x1F, "GetReactiveAuthStatus-Request" }, */
5288 /* { 0x20, "GetReactiveAuthStatus-Response" }, */
5289 /* New in WV-CSP 1.3 */
5290 { 0x21, "CreateList-Response"},
5295 /* Presence attribute code page (0x05) */
5296 static const value_string wbxml_wv_csp_13_tags_cp5[] = {
5297 /* 0x00 -- 0x04 GLOBAL */
5298 { 0x05, "Accuracy" },
5299 { 0x06, "Address" },
5300 { 0x07, "AddrPref" },
5302 { 0x09, "Altitude" },
5303 { 0x0A, "Building" },
5306 { 0x0D, "ClientInfo" },
5307 { 0x0E, "ClientProducer" },
5308 { 0x0F, "ClientType" },
5309 { 0x10, "ClientVersion" },
5311 { 0x12, "CommCap" },
5312 { 0x13, "ContactInfo" },
5313 { 0x14, "ContainedvCard" },
5314 { 0x15, "Country" },
5315 { 0x16, "Crossing1" },
5316 { 0x17, "Crossing2" },
5317 { 0x18, "DevManufacturer" },
5318 { 0x19, "DirectContent" },
5319 { 0x1A, "FreeTextLocation" },
5320 { 0x1B, "GeoLocation" },
5321 { 0x1C, "Language" },
5322 { 0x1D, "Latitude" },
5323 { 0x1E, "Longitude" },
5325 { 0x20, "NamedArea" },
5326 { 0x21, "OnlineStatus" },
5329 { 0x24, "PreferredContacts" },
5330 { 0x25, "PreferredLanguage" },
5331 { 0x26, "ReferredContent" },
5332 { 0x27, "ReferredvCard" },
5333 { 0x28, "Registration" },
5334 { 0x29, "StatusContent" },
5335 { 0x2A, "StatusMood" },
5336 { 0x2B, "StatusText" },
5338 { 0x2D, "TimeZone" },
5339 { 0x2E, "UserAvailability" },
5340 /* New in WV-CSP 1.1 */
5343 { 0x31, "Contact" },
5344 { 0x32, "Cpriority" },
5345 { 0x33, "Cstatus" },
5348 /* New in WV-CSP 1.2 */
5349 { 0x36, "ContentType" },
5350 { 0x37, "Inf_link" },
5351 { 0x38, "InfoLink" },
5354 /* New in WV-CSP 1.3 */
5355 { 0x3B, "ClientContentLimit"},
5356 { 0x3C, "ClientIMPriority"},
5357 { 0x3D, "MaxPullLength"},
5358 { 0x3E, "MaxPushLength"},
5363 /* Messaging code page (0x06) */
5364 static const value_string wbxml_wv_csp_13_tags_cp6[] = {
5365 /* 0x00 -- 0x04 GLOBAL */
5366 { 0x05, "BlockList" },
5367 { 0x06, "BlockEntity-Request" }, /* Was: BlockUser-Request */
5368 { 0x07, "DeliveryMethod" },
5369 { 0x08, "DeliveryReport" },
5370 { 0x09, "DeliveryReport-Request" },
5371 { 0x0A, "ForwardMessage-Request" },
5372 { 0x0B, "GetBlockedList-Request" },
5373 { 0x0C, "GetBlockedList-Response" },
5374 { 0x0D, "GetMessageList-Request" },
5375 { 0x0E, "GetMessageList-Response" },
5376 { 0x0F, "GetMessage-Request" },
5377 { 0x10, "GetMessage-Response" },
5378 { 0x11, "GrantList" },
5379 { 0x12, "MessageDelivered" },
5380 { 0x13, "MessageInfo" },
5381 { 0x14, "MessageNotification" },
5382 { 0x15, "NewMessage" },
5383 { 0x16, "RejectMessage-Request" },
5384 { 0x17, "SendMessage-Request" },
5385 { 0x18, "SendMessage-Response" },
5386 { 0x19, "SetDeliveryMethod-Request" },
5387 { 0x1A, "DeliveryTime" },
5388 /* New in WV-CSP 1.3 */
5389 { 0x20, "MessageInfoList"},
5390 { 0x21, "ForwardMessage-Response"},
5395 /* Group code page (0x07) */
5396 static const value_string wbxml_wv_csp_13_tags_cp7[] = {
5397 /* 0x00 -- 0x04 GLOBAL */
5398 { 0x05, "AddGroupMembers-Request" },
5400 { 0x07, "CreateGroup-Request" },
5401 { 0x08, "DeleteGroup-Request" },
5402 { 0x09, "GetGroupMembers-Request" },
5403 { 0x0A, "GetGroupMembers-Response" },
5404 { 0x0B, "GetGroupProps-Request" },
5405 { 0x0C, "GetGroupProps-Response" },
5406 { 0x0D, "GroupChangeNotice" },
5407 { 0x0E, "GroupProperties" },
5409 { 0x10, "JoinedRequest" },
5410 { 0x11, "JoinGroup-Request" },
5411 { 0x12, "JoinGroup-Response" },
5412 { 0x13, "LeaveGroup-Request" },
5413 { 0x14, "LeaveGroup-Response" },
5415 { 0x16, "MemberAccess-Request" },
5417 { 0x18, "OwnProperties" },
5418 { 0x19, "RejectList-Request" },
5419 { 0x1A, "RejectList-Response" },
5420 { 0x1B, "RemoveGroupMembers-Request" },
5421 { 0x1C, "SetGroupProps-Request" },
5422 { 0x1D, "SubscribeGroupNotice-Request" },
5423 { 0x1E, "SubscribeGroupNotice-Response" },
5424 /* { 0x1F, "Users" }, - removed in WV 1.3 */
5425 { 0x20, "WelcomeNote" },
5426 /* New in WV-CSP 1.1 */
5427 { 0x21, "JoinGroup" },
5428 { 0x22, "SubscribeNotification" },
5429 { 0x23, "SubscribeType" },
5430 /* New in WV-CSP 1.2 */
5431 { 0x24, "GetJoinedUsers-Request" },
5432 { 0x25, "GetJoinedUsers-Response" },
5433 { 0x26, "AdminMapList" },
5434 { 0x27, "AdminMapping" },
5435 { 0x28, "Mapping" },
5436 { 0x29, "ModMapping" },
5437 { 0x2A, "UserMapList" },
5438 { 0x2B, "UserMapping" },
5439 /* New in WV-CSP 1.3 */
5440 { 0x2C, "JoinedBlocked" },
5441 { 0x2D, "LeftBlocked" },
5446 /* Service negotiation code page - continued (0x08) */
5447 static const value_string wbxml_wv_csp_13_tags_cp8[] = {
5448 /* 0x00 -- 0x04 GLOBAL */
5449 /* New in WV-CSP 1.2 */
5454 { 0x09, "VerifyIDFunc" },
5455 /* New in WV-CSP 1.3 */
5459 { 0x0D, "OFFNOTIF" },
5465 /* Common code page - continued (0x09) */
5466 static const value_string wbxml_wv_csp_13_tags_cp9[] = {
5467 /* 0x00 -- 0x04 GLOBAL */
5468 /* New in WV-CSP 1.2 */
5471 { 0x07, "ExtBlock" },
5472 { 0x08, "HistoryPeriod" },
5474 { 0x0A, "MaxWatcherList" },
5475 /* { 0x0B, "ReactiveAuthState" }, - removed in WV 1.3 */
5476 /* { 0x0C, "ReactiveAuthStatus" }, - removed in WV 1.3 */
5477 /* { 0x0D, "ReactiveAuthStatusList" }, - removed in WV 1.3 */
5478 { 0x0E, "Watcher" },
5479 { 0x0F, "WatcherStatus" },
5480 /* New in WV-CSP 1.3 */
5481 { 0x1B, "AnswerOption"},
5482 { 0x1C, "AnswerOptionID" },
5483 { 0x1D, "AnswerOptions"},
5484 { 0x0B, "AnswerOptionText"},
5485 { 0x1E, "ApplicationID"},
5486 { 0x1F, "AuthorizeAndGrant"},
5487 { 0x20, "ChosenOptionID"},
5488 { 0x19, "ClearPublicProfile"},
5490 { 0x21, "ContactListNotify"},
5491 { 0x14, "ContentName"},
5492 { 0x22, "DefaultNotify"},
5493 { 0x39, "ExtBlockETEM"},
5494 { 0x36, "ExtendConversationID"},
5495 { 0x23, "ExtendConversationUser"},
5497 { 0x18, "FriendlyName"},
5498 { 0x34 , "GetMap-Request"},
5499 { 0x35, "GetMap-Response"},
5500 { 0x3A, "GroupContentLimit" },
5503 { 0x3B, "MessageTotalCount"},
5504 { 0x16, "NotificationType"},
5505 { 0x17, "NotificationTypeList"},
5506 { 0x1A, "PublicProfile"},
5507 { 0x38, "RequiresResponse"},
5508 { 0x25, "SegmentCount"},
5509 { 0x26, "SegmentID" },
5510 { 0x27, "SegmentInfo"},
5511 { 0x28, "SegmentReference"},
5514 { 0x29, "SystemMessage"},
5515 { 0x2A, "SystemMessageID"},
5516 { 0x2B, "SystemMessageList"},
5517 { 0x2C, "SystemMessageResponse"},
5518 { 0x2D, "SystemMessageResponseList" },
5519 { 0x2F, "SystemMessageText"},
5520 { 0x30, "TryAgainTimeout"},
5521 { 0x3C, "UnrecognizedUserID"},
5522 { 0x3F , "UserIDList"},
5523 { 0x3D, "UserIDPair"},
5524 { 0x31, "UserNotify"},
5525 { 0x3E, "ValidUserID"},
5526 { 0x32, "VerificationKey"},
5527 { 0x33, "VerificationMechanism"},
5528 { 0x37, "WatcherCount"},
5533 /* Access code page - continued (0x0A) */
5534 static const value_string wbxml_wv_csp_13_tags_cp10[] = {
5535 /* 0x00 -- 0x04 GLOBAL */
5536 /* New in WV-CSP 1.2 */
5537 { 0x05, "WV-CSP-NSDiscovery-Request" },
5538 { 0x06, "WV-CSP-NSDiscovery-Response" },
5539 { 0x07, "VersionList"},
5540 /* New in WV-CSP 1.3 */
5541 { 0x08, "SubscribeNotification-Request" },
5542 { 0x09, "UnsubscribeNotification-Request" },
5543 { 0x0A, "Notification-Request" },
5544 { 0x0B, "AdvancedCriteria" },
5546 { 0x0D, "GetPublicProfile-Request" },
5547 { 0x0E, "GetPublicProfile-Response" },
5548 { 0x0F, "UpdatePublicProfile-Request" },
5549 { 0x10, "DropSegment-Request" },
5550 { 0x11, "ExtendConversation-Response" },
5551 { 0x12, "ExtendConversation-Request" },
5552 { 0x13, "GetSegment-Request" },
5553 { 0x14, "GetSegment-Response" },
5554 { 0x15, "SystemMessage-Request" },
5555 { 0x16, "SystemMessage-User" },
5556 { 0x17, "SearchPair" },
5557 { 0x18, "SegmentContent" },
5562 /* Common code page
\96 continued (0x0B) */
5563 static const value_string wbxml_wv_csp_13_tags_cp11[] = {
5564 /* 0x00 -- 0x04 GLOBAL */
5565 /* New in WV-CSP 1.3 */
5566 { 0x05, "GrantListInUse" },
5567 { 0x06, "BlockListInUse" },
5568 { 0x07, "ContactListIDList" },
5569 { 0x08, "AnswerOptionsText" },
5575 /***** Attribute Start tokens *****/
5576 /* Common code page (0x00) */
5577 static const value_string wbxml_wv_csp_13_attrStart_cp0[] = {
5578 /* 0x00 -- 0x04 GLOBAL */
5579 { 0x05, "xmlns='http://www.wireless-village.org/CSP'" },
5580 { 0x06, "xmlns='http://www.wireless-village.org/PA'" },
5581 { 0x07, "xmlns='http://www.wireless-village.org/TRC'" },
5582 /* New in WV-CSP 1.2 */
5583 { 0x08, "xmlns='http://www.openmobilealliance.org/DTD/WV-CSP'" },
5584 { 0x09, "xmlns='http://www.openmobilealliance.org/DTD/WV-PA'" },
5585 { 0x0A, "xmlns='http://www.openmobilealliance.org/DTD/WV-TRC'" },
5586 /* New in WV-CSP 1.3 */
5587 { 0x0B, "xmlns='http://www.openmobilealliance.org/DTD/IMPS-CSP'" },
5588 { 0x0C, "xmlns='http://www.openmobilealliance.org/DTD/IMPS-PA'" },
5589 { 0x0D, "xmlns='http://www.openmobilealliance.org/DTD/IMPS-TRC'" },
5594 /***** Attribute Value tokens *****/
5596 * Element value tokens
5598 static const value_string vals_wv_csp_13_element_value_tokens[] = {
5600 * Common value tokens
5603 { 0x00, "AccessType" },
5604 { 0x01, "ActiveUsers" },
5610 { 0x03, "application/" },
5611 { 0x04, "application/vnd.wap.mms-message" },
5612 { 0x05, "application/x-sms" },
5615 { 0x31, "AutoDelete" },
5616 { 0x06, "AutoJoin" },
5629 { 0xBD, "CURRENT_SUBSCRIBER" },
5630 { 0x09, "Default" },
5633 { 0x0A, "DisplayName" },
5634 { 0xA6, "DoNotNotify" },
5638 { 0xAC, "FORKALL" },
5639 { 0xBE, "FORMER_SUBSCRIBER" },
5640 { 0x87, "Fuchsia" },
5652 { 0x35, "GRANTED" },
5655 { 0x3D, "History" },
5656 { 0x0E, "http://" },
5657 { 0x0F, "https://" },
5668 { 0x13, "MaxActiveUsers" },
5670 { 0xBB, "MinimumAge" },
5679 { 0x19, "Outband" },
5680 { 0x36, "PENDING" },
5683 { 0xBF, "PRESENCE_ACCESS" },
5684 { 0x1B, "Private" },
5685 { 0x1C, "PrivateMessaging" },
5686 { 0x1D, "PrivilegeLevel" },
5692 { 0x20, "Request" },
5693 { 0x21, "Response" },
5694 { 0x22, "Restricted" },
5695 { 0x38, "RequireInvitation" },
5696 { 0x23, "ScreenName" },
5697 { 0x24, "Searchable" },
5700 { 0xAE, "SERVERLOGIC" },
5707 { 0x28, "text/plain" },
5708 { 0x29, "text/x-vCalendar" },
5709 { 0x2A, "text/x-vCard" },
5715 { 0x7F, "Underline" },
5717 { 0x33, "Validity" },
5719 { 0x78, "www.openmobilealliance.org" },
5720 { 0x30, "www.wireless-village.org" },
5723 * Access value tokens
5725 { 0x3D, "GROUP_ID" },
5726 { 0x3E, "GROUP_NAME" },
5727 { 0x3F, "GROUP_TOPIC" },
5728 { 0x40, "GROUP_USER_ID_JOINED" },
5729 { 0x41, "GROUP_USER_ID_OWNER" },
5734 { 0x46, "USER_ALIAS" },
5735 { 0x47, "USER_EMAIL_ADDRESS" },
5736 { 0x48, "USER_FIRST_NAME" },
5737 { 0x49, "USER_ID" },
5738 { 0x4A, "USER_LAST_NAME" },
5739 { 0x4B, "USER_MOBILE_NUMBER" },
5740 { 0x4C, "USER_ONLINE_STATUS" },
5744 { 0x50, "GROUP_USER_ID_AUTOJOIN" },
5746 * Presence value tokens
5749 { 0x5C, "ANXIOUS" },
5750 { 0x5D, "ASHAMED" },
5751 { 0x5F, "AVAILABLE" },
5755 { 0x63, "COMPUTER" },
5756 { 0x64, "DISCREET" },
5758 { 0x66, "EXCITED" },
5760 { 0x6B, "IN_LOVE" },
5761 { 0x6C, "INVINCIBLE" },
5762 { 0x6D, "JEALOUS" },
5764 { 0x6F, "MOBILE_PHONE" },
5765 { 0x70, "NOT_AVAILABLE" },
5772 * Access value tokens - continued
5774 { 0x93, "USER_CITY" },
5775 { 0x94, "USER_COUNTRY" },
5776 { 0x95, "USER_FRIENDLY_NAME" },
5777 { 0x96, "USER_GENDER" },
5778 { 0x97, "USER_INTENTION" },
5779 { 0x98, "USER_INTERESTS_HOBBIES" },
5780 { 0x99, "USER_MARITAL_STATUS" },
5781 { 0x9A, "PRIORITYREJECT" },
5782 { 0x9B, "PRIORITYSTORE" },
5784 { 0x9D, "SENDREJECT" },
5785 { 0x9E, "SENDSTORE" },
5789 { 0xB0, "PP_CITY" },
5790 { 0xB1, "PP_COUNTRY" },
5791 { 0xB2, "PP_FRIENDLY_NAME" },
5792 { 0xB3, "PP_FREE_TEXT" },
5793 { 0xB4, "PP_GENDER" },
5794 { 0xB5, "PP_INTENTION" },
5795 { 0xB6, "PP_INTERESTS" },
5796 { 0xB7, "PP_MARITAL_STATUS" },
5797 { 0xB8, "USER_AGE_MAX" },
5798 { 0xB9, "USER_AGE_MIN" },
5803 /***** Token code page aggregation *****/
5805 ext_t_0_wv_cspc_13(tvbuff_t *tvb _U_, guint32 value, guint32 str_tbl _U_)
5807 char *str = g_strdup_printf("Common Value: '%s'",
5808 val_to_str(value, vals_wv_csp_13_element_value_tokens,
5809 "<Unknown WV-CSP 1.3 Common Value token 0x%X>"));
5813 #define wbxml_wv_csp_13_global wbxml_wv_csp_12_global /*TODO*/
5815 static const value_valuestring wbxml_wv_csp_13_tags[] = {
5816 { 0, wbxml_wv_csp_13_tags_cp0 },
5817 { 1, wbxml_wv_csp_13_tags_cp1 },
5818 { 2, wbxml_wv_csp_13_tags_cp2 },
5819 { 3, wbxml_wv_csp_13_tags_cp3 },
5820 { 4, wbxml_wv_csp_13_tags_cp4 },
5821 { 5, wbxml_wv_csp_13_tags_cp5 },
5822 { 6, wbxml_wv_csp_13_tags_cp6 },
5823 { 7, wbxml_wv_csp_13_tags_cp7 },
5824 { 8, wbxml_wv_csp_13_tags_cp8 },
5825 { 9, wbxml_wv_csp_13_tags_cp9 },
5826 { 10, wbxml_wv_csp_13_tags_cp10 },
5827 { 11, wbxml_wv_csp_13_tags_cp11 },
5831 static const value_valuestring wbxml_wv_csp_13_attrStart[] = {
5832 { 0, wbxml_wv_csp_13_attrStart_cp0 },
5836 static const wbxml_decoding decode_wv_cspc_13 = {
5837 "Wireless-Village Client-Server Protocol 1.3",
5839 { ext_t_0_wv_cspc_13, NULL, NULL },
5840 wv_csp13_opaque_binary_tag,
5841 wv_csp13_opaque_literal_tag,
5842 default_opaque_binary_attr,
5843 default_opaque_literal_attr,
5844 wbxml_wv_csp_13_global,
5845 wbxml_wv_csp_13_tags,
5846 wbxml_wv_csp_13_attrStart,
5854 /****************************** Discriminators ******************************/
5855 /* Discriminator for WV-CSP; allows version detection based on parsing parts
5856 * of the start of the WBXML body.
5858 static const wbxml_decoding *
5859 wv_csp_discriminator(tvbuff_t *tvb, guint32 offset)
5861 guint32 magic_1 = tvb_get_ntohl(tvb, offset + 0);
5862 guint16 magic_2 = tvb_get_ntohs(tvb, offset + 4);
5864 if (magic_1 == 0xFE050331 && magic_2 == 0x2e30)
5866 /* FE 05 03 31 2E 30 --> WV-CSP 1.0 */
5867 return &decode_wv_cspc_10;
5869 else if (magic_1 == 0xC9050331 && magic_2 == 0x2e31)
5871 /* C9 05 03 31 2E 31 --> WV-CSP 1.1 */
5872 return &decode_wv_cspc_11;
5874 else if (magic_1 == 0xC9080331 && magic_2 == 0x2e32)
5876 /* C9 08 03 31 2E 32 --> WV-CSP 1.2 */
5877 return &decode_wv_cspc_12;
5879 else if ( magic_1 == 0xC90B0331 && magic_2 == 0x2E33)
5881 /* C9 0B 03 31 2E 33 --> WV-CSP 1.3 */
5882 return &decode_wv_cspc_13;
5886 /* Default: WV-CSP 1.2 */
5887 return &decode_wv_cspc_12;
5890 /********************** WBXML token mapping aggregation **********************/
5892 static const wbxml_decoding *get_wbxml_decoding_from_public_id (guint32 publicid);
5893 static const wbxml_decoding *get_wbxml_decoding_from_content_type (
5894 const char *content_type, tvbuff_t *tvb, guint32 offset);
5898 ** Aggregation of content type and aggregated code pages
5899 ** Content type map lookup will stop at the 1st entry with 3rd member = FALSE
5903 * The following map contains entries registered with a registered WBXML
5904 * public ID. See WAP WINA or OMA OMNA for registered values:
5905 * http://www.openmobilealliance.org/tech/omna/ */
5906 static const wbxml_integer_list well_known_public_id_list[] = {
5907 /* 0x00 - Unknown or missing Public ID */
5908 /* 0x01 - LITERAL PublicID - see String Table */
5909 { 0x02, &decode_wmlc_10 }, /* WML 1.0 */
5910 /* 0x03 - WTA 1.0 */
5911 { 0x04, &decode_wmlc_11 }, /* WML 1.1 */
5912 { 0x05, &decode_sic_10 }, /* SI 1.0 */
5913 { 0x06, &decode_slc_10 }, /* SL 1.0 */
5914 { 0x07, &decode_coc_10 }, /* CO 1.0 */
5915 { 0x08, &decode_channelc_10 }, /* CHANNEL 1.0 */
5916 { 0x09, &decode_wmlc_12 }, /* WML 1.2 */
5917 { 0x0A, &decode_wmlc_13 }, /* WML 1.3 */
5918 { 0x0B, &decode_provc_10 }, /* PROV 1.0 */
5919 /* 0x0C - WTA-WML 1.2 */
5920 { 0x0D, &decode_emnc_10 }, /* EMN 1.0 */
5921 /* 0x0E - DRMREL 1.0 */
5922 { 0x0F, &decode_wv_cspc_10 }, /* WV-CSP 1.0 */
5923 { 0x10, &decode_wv_cspc_11 }, /* WV-CSP 1.1 */
5924 /*See http://www.openmobilealliance.org/tech/omna/omna-wbxml-public-docid.htm */
5925 { 0x11, &decode_wv_cspc_12 }, /* OMA IMPS - CSP protocol DTD v1.2 */
5926 { 0x12, &decode_wv_cspc_13 }, /* OMA IMPS - CSP protocol DTD v1.3 */
5927 { 0x020B, &decode_nokiaprovc_70 },/* Nokia OTA Provisioning 7.0 */
5928 { 0x0FD1, &decode_syncmlc_10 }, /* SyncML 1.0 */
5929 { 0x0FD3, &decode_syncmlc_11 }, /* SyncML 1.1 */
5930 /* Note: I assumed WML+ 1.x would be not that different from WML 1.x,
5931 * the real mapping should come from Phone.com (OpenWave)! */
5932 { 0x1108, &decode_wmlc_11 }, /* Phone.com WMLC+ 1.1 - not 100% correct */
5933 { 0x110D, &decode_wmlc_13 }, /* Phone.com WMLC+ 1.3 - not 100% correct */
5938 /* The following map contains entries only registered with a literal media
5940 static const wbxml_literal_list content_type_list[] = {
5941 { "application/x-wap-prov.browser-settings",
5943 &decode_nokiaprovc_70
5945 { "application/x-wap-prov.browser-bookmarks",
5947 &decode_nokiaprovc_70
5949 { "application/vnd.wv.csp.wbxml",
5950 wv_csp_discriminator,
5953 { NULL, NULL, NULL }
5957 /* Returns a pointer to the WBXML token map for the given WBXML public
5958 * identifier value (see WINA for a table with defined identifiers). */
5959 static const wbxml_decoding *get_wbxml_decoding_from_public_id (guint32 public_id)
5961 const wbxml_decoding *map = NULL;
5963 DebugLog(("get_wbxml_decoding_from_public_id: public_id = %u\n",
5965 if (public_id >= 2) {
5966 const wbxml_integer_list *item = well_known_public_id_list;
5968 while (item && item->public_id && item->map) {
5969 if (item->public_id == public_id) {
5979 static const wbxml_decoding *get_wbxml_decoding_from_content_type (
5980 const char *content_type, tvbuff_t *tvb, guint32 offset)
5982 const wbxml_decoding *map = NULL;
5984 DebugLog(("get_wbxml_decoding_from_content_type: content_type = [%s]\n",
5986 if (content_type && content_type[0]) {
5987 const wbxml_literal_list *item = content_type_list;
5989 while (item && item->content_type) {
5990 if (g_ascii_strcasecmp(content_type, item->content_type) == 0) {
5991 /* Try the discriminator */
5992 if (item->discriminator != NULL) {
5993 map = item->discriminator(tvb, offset);
6007 /* WBXML content token mapping depends on the following parameters:
6008 * - Content type (guint32)
6009 * - Token type (global, tags, attrStart, attrValue)
6010 * - Code page for tag and attribute
6012 * This results in the following steps:
6013 * 1. Retrieve content type mapping
6014 * 2. If exists, retrieve token type mapping
6015 * 3. If exists, retrieve required code page
6016 * 4. If exists, retrieve token mapping
6019 #define wbxml_UNDEFINED_TOKEN \
6020 "(Requested token not defined for this content type)"
6021 #define wbxml_UNDEFINED_TOKEN_CODE_PAGE \
6022 "(Requested token code page not defined for this content type)"
6023 #define wbxml_UNDEFINED_TOKEN_MAP \
6024 "(Requested token map not defined for this content type)"
6025 /* Return token mapping for a given content mapping entry. */
6027 map_token (const value_valuestring *token_map, guint8 codepage, guint8 token) {
6028 const value_string *vs;
6031 if (token_map) { /* Found map */
6032 if ((vs = val_to_valstr (codepage, token_map))) {
6033 /* Found codepage map */
6034 s = match_strval (token, vs);
6035 if (s) { /* Found valid token */
6036 DebugLog(("map_token(codepage = %u, token = %u: [%s]\n", codepage, token, s));
6039 /* No valid token mapping in specified code page of token map */
6040 DebugLog(("map_token(codepage = %u, token = %u: "
6041 wbxml_UNDEFINED_TOKEN "\n", codepage, token));
6042 return wbxml_UNDEFINED_TOKEN;
6044 /* There is no token map entry for the requested code page */
6045 DebugLog(("map_token(codepage = %u, token = %u: "
6046 wbxml_UNDEFINED_TOKEN_CODE_PAGE "\n", codepage, token));
6047 return wbxml_UNDEFINED_TOKEN_CODE_PAGE;
6049 /* The token map does not exist */
6050 DebugLog(("map_token(codepage = %u, token = %u: "
6051 wbxml_UNDEFINED_TOKEN_MAP "\n", codepage, token));
6052 return wbxml_UNDEFINED_TOKEN_MAP;
6059 /************************** Function prototypes **************************/
6063 dissect_wbxml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
6066 dissect_uaprof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
6069 dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
6070 const wbxml_decoding *override_content_map);
6073 proto_register_wbxml(void);
6075 /* Parse and display the WBXML string table */
6077 show_wbxml_string_table (proto_tree *tree, tvbuff_t *tvb, guint32 str_tbl,
6078 guint32 str_tbl_len);
6080 /* Parse data while in STAG state */
6082 parse_wbxml_tag (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
6083 guint32 str_tbl, guint8 *level, guint8 *codepage_stag, guint8 *codepage_attr);
6085 /* Parse data while in STAG state;
6086 * interpret tokens as defined by content type */
6088 parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
6089 guint32 str_tbl, guint8 *level, guint8 *codepage_stag, guint8 *codepage_attr,
6090 const wbxml_decoding *map);
6092 /* Parse data while in ATTR state */
6094 parse_wbxml_attribute_list (proto_tree *tree, tvbuff_t *tvb,
6095 guint32 offset, guint32 str_tbl, guint8 level, guint8 *codepage_attr);
6097 /* Parse data while in ATTR state;
6098 * interpret tokens as defined by content type */
6100 parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb,
6101 guint32 offset, guint32 str_tbl, guint8 level, guint8 *codepage_attr,
6102 const wbxml_decoding *map);
6105 /****************** WBXML protocol dissection functions ******************/
6109 dissect_wbxml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
6111 dissect_wbxml_common(tvb, pinfo, tree, NULL);
6115 dissect_uaprof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
6117 dissect_wbxml_common(tvb, pinfo, tree, &decode_uaprof_wap_248);
6120 /* Code to actually dissect the packets */
6122 dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
6123 const wbxml_decoding *override_content_map)
6125 /* Set up structures needed to add the protocol subtree and manage it */
6127 proto_tree *wbxml_tree; /* Main WBXML tree */
6128 proto_tree *wbxml_str_tbl_tree; /* String table subtree */
6129 proto_tree *wbxml_content_tree; /* Content subtree */
6133 guint32 charset = 0;
6134 guint32 charset_len = 0;
6136 guint32 publicid_index = 0;
6137 guint32 publicid_len;
6139 guint32 str_tbl_len;
6140 guint32 str_tbl_len_len = 0;
6141 guint8 level = 0; /* WBXML recursion level */
6142 const wbxml_decoding *content_map = NULL;
6143 gchar *summary = NULL;
6144 guint8 codepage_stag = 0;
6145 guint8 codepage_attr = 0;
6147 DebugLog(("dissect_wbxml: Dissecting packet %u\n", pinfo->fd->num));
6150 * Version 1.0: version publicid strtbl BODY
6151 * Version 1.x: version publicid charset strtbl BODY
6153 * Last valid format: WBXML 1.3
6155 switch ( version = tvb_get_guint8 (tvb, 0) ) {
6156 case 0x00: /* WBXML/1.0 */
6159 case 0x01: /* WBXML/1.1 */
6160 case 0x02: /* WBXML/1.2 */
6161 case 0x03: /* WBXML/1.3 */
6168 /* In order to properly construct the packet summary,
6169 * I need to read the entire WBXML header
6170 * up to the string table length.
6174 publicid = tvb_get_guintvar(tvb, 1, &publicid_len);
6176 /* Public identifier in string table */
6177 publicid_index = tvb_get_guintvar (tvb, 1+publicid_len, &len);
6178 publicid_len += len;
6180 offset = 1 + publicid_len;
6182 /* Version-specific handling of Charset */
6183 switch ( version ) {
6184 case 0x00: /* WBXML/1.0 */
6188 case 0x01: /* WBXML/1.1 */
6189 case 0x02: /* WBXML/1.2 */
6190 case 0x03: /* WBXML/1.3 */
6192 charset = tvb_get_guintvar (tvb, offset, &charset_len);
6193 offset += charset_len;
6196 default: /* Impossible since we returned already earlier */
6197 g_error("%s:%u: WBXML version octet 0x%02X only partly supported!\n"
6198 "Please report this as a bug.\n", __FILE__, __LINE__, version);
6199 DISSECTOR_ASSERT_NOT_REACHED();
6203 /* String table: read string table length in bytes */
6204 str_tbl_len = tvb_get_guintvar (tvb, offset, &str_tbl_len_len);
6205 str_tbl = offset + str_tbl_len_len; /* Start of 1st string in string table */
6207 /* Compose the summary line */
6209 summary = g_strdup_printf("%s, Public ID: \"%s\"",
6210 val_to_str (version, vals_wbxml_versions, "(unknown 0x%x)"),
6211 val_to_str (publicid, vals_wbxml_public_ids, "(unknown 0x%x)"));
6213 /* Read length of Public ID from string table */
6214 len = tvb_strsize (tvb, str_tbl + publicid_index);
6215 summary = g_strdup_printf("%s, Public ID: \"%s\"",
6216 val_to_str (version, vals_wbxml_versions, "(unknown 0x%x)"),
6217 tvb_format_text (tvb, str_tbl + publicid_index, len - 1));
6220 /* Add summary to INFO column if it is enabled */
6221 if (check_col(pinfo->cinfo, COL_INFO))
6222 col_append_fstr(pinfo->cinfo, COL_INFO, " (WBXML %s)", summary);
6224 /* create display subtree for the protocol */
6225 ti = proto_tree_add_item (tree, proto_wbxml, tvb, 0, -1, FALSE);
6226 proto_item_append_text(ti, ", Version: %s", summary);
6229 * Now show the protocol subtree, if tree is set.
6232 wbxml_tree = proto_item_add_subtree(ti, ett_wbxml);
6235 proto_tree_add_uint (wbxml_tree, hf_wbxml_version,
6236 tvb, 0, 1, version);
6239 if (publicid) { /* Known Public ID */
6240 proto_tree_add_uint(wbxml_tree, hf_wbxml_public_id_known,
6241 tvb, 1, publicid_len, publicid);
6242 } else { /* Public identifier in string table */
6243 proto_tree_add_item (wbxml_tree, hf_wbxml_public_id_literal,
6244 tvb, 1, publicid_len, FALSE);
6246 offset = 1 + publicid_len;
6248 if ( version ) { /* Charset */
6249 proto_tree_add_uint (wbxml_tree, hf_wbxml_charset,
6250 tvb, 1 + publicid_len, charset_len, charset);
6251 offset += charset_len;
6254 str_tbl_len = tvb_get_guintvar (tvb, offset, &len);
6255 str_tbl = offset + len; /* Start of 1st string in string table */
6258 ti = proto_tree_add_text(wbxml_tree,
6259 tvb, offset, len + str_tbl_len, "String table: %u bytes",
6262 if (wbxml_tree && str_tbl_len) { /* Display string table as subtree */
6263 wbxml_str_tbl_tree = proto_item_add_subtree (ti,
6265 show_wbxml_string_table (wbxml_str_tbl_tree, tvb,
6266 str_tbl, str_tbl_len);
6269 /* Data starts HERE */
6270 offset += len + str_tbl_len;
6272 /* The WBXML BODY starts here */
6273 if (disable_wbxml_token_parsing) {
6274 ti = proto_tree_add_text (wbxml_tree, tvb, offset, -1,
6275 "Data representation not shown "
6276 "(edit WBXML preferences to show)");
6278 } /* Else: render the WBXML tokens */
6279 ti = proto_tree_add_text (wbxml_tree, tvb, offset, -1,
6280 "Data representation");
6281 wbxml_content_tree = proto_item_add_subtree (ti, ett_wbxml_content);
6283 /* The parse_wbxml_X() functions will process the content correctly,
6284 * irrespective of the WBXML version used. For the WBXML body, this
6285 * means that there is a different processing for the global token
6286 * RESERVED_2 (WBXML 1.0) or OPAQUE (WBXML 1.x with x > 0). */
6287 if (wbxml_tree) { /* Show only if visible */
6288 if (override_content_map != NULL) {
6289 content_map = override_content_map;
6290 proto_item_append_text(ti,
6294 /* Retrieve the content token mapping if available */
6295 content_map = get_wbxml_decoding_from_public_id (publicid);
6296 if (! content_map) {
6297 content_map = get_wbxml_decoding_from_content_type(
6298 pinfo->match_string, tvb, offset);
6299 if (! content_map) {
6300 proto_tree_add_text (wbxml_content_tree,
6302 "[Rendering of this content type"
6303 " not (yet) supported]");
6305 proto_item_append_text(ti,
6306 " is based on Content-Type: %s "
6307 "(chosen decoding: %s)",
6308 pinfo->match_string, content_map->name);
6312 if (content_map && skip_wbxml_token_mapping) {
6313 proto_tree_add_text (wbxml_content_tree,
6315 "[Rendering of this content type"
6316 " has been disabled "
6317 "(edit WBXML preferences to enable)]");
6320 proto_tree_add_text (wbxml_content_tree, tvb,
6322 "Level | State | Codepage "
6323 "| WBXML Token Description "
6326 len = parse_wbxml_tag_defined (wbxml_content_tree,
6327 tvb, offset, str_tbl, &level, &codepage_stag,
6328 &codepage_attr, content_map);
6330 /* Default: WBXML only, no interpretation of the content */
6331 len = parse_wbxml_tag (wbxml_content_tree, tvb, offset,
6332 str_tbl, &level, &codepage_stag, &codepage_attr);
6340 /* Parse and display the WBXML string table (in a 3-column table format).
6341 * This function displays:
6342 * - the offset in the string table,
6343 * - the length of the string
6347 show_wbxml_string_table (proto_tree *tree, tvbuff_t *tvb, guint32 str_tbl,
6348 guint32 str_tbl_len)
6350 guint32 off = str_tbl;
6352 guint32 end = str_tbl + str_tbl_len;
6354 proto_tree_add_text (tree, tvb, off, end,
6355 "Start | Length | String");
6357 len = tvb_strsize (tvb, off);
6358 proto_tree_add_text (tree, tvb, off, len,
6361 tvb_format_text (tvb, off, len-1));
6367 /* Indentation code is based on a static const array of space characters.
6368 * At least one single space is returned */
6369 static const char indent_buffer[514] = " "
6378 ; /* Generate XML indentation (length = 1 + 2 * 256 + 1 for '\0') */
6380 static const char * Indent (guint8 level) {
6381 return indent_buffer + (512 - 2 * (level));
6385 /********************
6386 * WBXML tag tokens *
6387 ********************
6389 * Bit Mask : Example
6390 * -------------------
6391 * 00.. .... : <tag />
6398 * atrtribute1="value1"
6399 * atrtribute2="value2"
6403 * atrtribute1="value1"
6404 * atrtribute2="value2"
6410 * - An XML PI is parsed as an attribute list (same syntax).
6411 * - A code page switch only applies to the single token that follows.
6415 /* This function parses the WBXML and maps known token interpretations
6416 * to the WBXML tokens. As a result, the original XML document can be
6417 * recreated. Indentation is generated in order to ease reading.
6419 * Attribute parsing is done in parse_wbxml_attribute_list_defined().
6421 * The wbxml_decoding entry *map contains the actual token mapping.
6423 * NOTE: In order to parse the content, some recursion is required.
6424 * However, for performance reasons, recursion has been avoided
6425 * where possible (tags without content within tags with content).
6426 * This is achieved by means of the parsing_tag_content and tag_save*
6429 * NOTE: See above for known token mappings.
6431 * NOTE: As tags can be opened and closed, a tag representation lookup
6432 * may happen once or twice for a given tag. For efficiency reasons,
6433 * the literal tag value is stored and used throughout the code.
6434 * With the introduction of code page support, this solution is robust
6435 * as the lookup only occurs once, removing the need for storage of
6436 * the used code page.
6439 parse_wbxml_tag_defined (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
6440 guint32 str_tbl, guint8 *level, guint8 *codepage_stag, guint8 *codepage_attr,
6441 const wbxml_decoding *map)
6443 guint32 tvb_len = tvb_reported_length (tvb);
6444 guint32 off = offset;
6450 guint32 tag_len; /* Length of the index (uintvar) from a LITERAL tag */
6451 guint8 tag_save_known = 0; /* Will contain peek & 0x3F (tag identity) */
6452 guint8 tag_new_known = 0; /* Will contain peek & 0x3F (tag identity) */
6453 const char *tag_save_literal; /* Will contain the LITERAL tag identity */
6454 const char *tag_new_literal; /* Will contain the LITERAL tag identity */
6455 guint8 parsing_tag_content = FALSE; /* Are we parsing content from a
6456 tag with content: <x>Content</x>
6458 The initial state is FALSE.
6459 This state will trigger recursion. */
6460 tag_save_literal = NULL; /* Prevents compiler warning */
6462 DebugLog(("parse_wbxml_tag_defined (level = %u, offset = %u)\n", *level, offset));
6463 while (off < tvb_len) {
6464 peek = tvb_get_guint8 (tvb, off);
6465 DebugLog(("STAG: (top of while) level = %3u, peek = 0x%02X, off = %u, tvb_len = %u\n", *level, peek, off, tvb_len));
6466 if ((peek & 0x3F) < 4) switch (peek) { /* Global tokens in state = STAG
6467 but not the LITERAL tokens */
6468 case 0x00: /* SWITCH_PAGE */
6469 *codepage_stag = tvb_get_guint8 (tvb, off+1);
6470 proto_tree_add_text (tree, tvb, off, 2,
6471 " | Tag | T -->%3d "
6472 "| SWITCH_PAGE (Tag code page) "
6477 case 0x01: /* END: only possible for Tag with Content */
6478 if (tag_save_known) { /* Known TAG */
6479 proto_tree_add_text (tree, tvb, off, 1,
6480 " %3d | Tag | T %3d "
6481 "| END (Known Tag 0x%02X) "
6483 *level, *codepage_stag,
6484 tag_save_known, Indent (*level),
6485 tag_save_literal); /* We already looked it up! */
6486 } else { /* Literal TAG */
6487 proto_tree_add_text (tree, tvb, off, 1,
6488 " %3d | Tag | T %3d "
6489 "| END (Literal Tag) "
6491 *level, *codepage_stag, Indent (*level),
6492 tag_save_literal ? tag_save_literal : "");
6496 /* Reset code page: not needed as return from recursion */
6497 DebugLog(("STAG: level = %u, Return: len = %u\n", *level, off - offset));
6498 return (off - offset);
6500 case 0x02: /* ENTITY */
6501 ent = tvb_get_guintvar (tvb, off+1, &len);
6502 proto_tree_add_text (tree, tvb, off, 1+len,
6503 " %3d | Tag | T %3d "
6506 *level, *codepage_stag, Indent (*level), ent);
6509 case 0x03: /* STR_I */
6510 len = tvb_strsize (tvb, off+1);
6511 proto_tree_add_text (tree, tvb, off, 1+len,
6512 " %3d | Tag | T %3d "
6513 "| STR_I (Inline string) "
6515 *level, *codepage_stag, Indent(*level),
6516 tvb_format_text (tvb, off+1, len-1));
6519 case 0x40: /* EXT_I_0 */
6520 case 0x41: /* EXT_I_1 */
6521 case 0x42: /* EXT_I_2 */
6522 /* Extension tokens */
6523 len = tvb_strsize (tvb, off+1);
6524 proto_tree_add_text (tree, tvb, off, 1+len,
6525 " %3d | Tag | T %3d "
6526 "| EXT_I_%1x (Extension Token) "
6528 *level, *codepage_stag,
6529 peek & 0x0f, Indent (*level),
6530 map_token (map->global, 0, peek),
6531 tvb_format_text (tvb, off+1, len-1));
6535 proto_tree_add_text (tree, tvb, off, 1,
6536 " %3d | Tag | T %3d "
6537 "| PI (XML Processing Instruction) "
6539 *level, *codepage_stag, Indent (*level));
6540 len = parse_wbxml_attribute_list_defined (tree, tvb, off,
6541 str_tbl, *level, codepage_attr, map);
6542 /* Check that there is still room in packet */
6544 if (off >= tvb_len) {
6545 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n", *level, off - offset));
6547 * TODO - Do we need to free g_malloc()ed memory?
6549 THROW(ReportedBoundsError);
6551 proto_tree_add_text (tree, tvb, off-1, 1,
6552 " %3d | Tag | T %3d "
6555 *level, *codepage_stag, Indent (*level));
6557 case 0x80: /* EXT_T_0 */
6558 case 0x81: /* EXT_T_1 */
6559 case 0x82: /* EXT_T_2 */
6560 /* Extension tokens */
6561 index = tvb_get_guintvar (tvb, off+1, &len);
6563 if (map->ext_t[peek & 0x03])
6564 s = (map->ext_t[peek & 0x03])(tvb, index, str_tbl);
6566 s = g_strdup_printf("EXT_T_%1x (%s)", peek & 0x03,
6567 map_token (map->global, 0, peek));
6568 proto_tree_add_text (tree, tvb, off, 1+len,
6569 " %3d | Tag | T %3d "
6570 "| EXT_T_%1x (Extension Token) "
6572 *level, *codepage_stag, peek & 0x0f, Indent (*level),
6578 case 0x83: /* STR_T */
6579 index = tvb_get_guintvar (tvb, off+1, &len);
6580 str_len = tvb_strsize (tvb, str_tbl+index);
6581 proto_tree_add_text (tree, tvb, off, 1+len,
6582 " %3d | Tag | T %3d "
6583 "| STR_T (Tableref string) "
6585 *level, *codepage_stag, Indent (*level),
6586 tvb_format_text (tvb, str_tbl+index, str_len-1));
6589 case 0xC0: /* EXT_0 */
6590 case 0xC1: /* EXT_1 */
6591 case 0xC2: /* EXT_2 */
6592 /* Extension tokens */
6593 proto_tree_add_text (tree, tvb, off, 1,
6594 " %3d | Tag | T %3d "
6595 "| EXT_%1x (Extension Token) "
6597 *level, *codepage_stag, peek & 0x0f, Indent (*level),
6598 map_token (map->global, 0, peek));
6601 case 0xC3: /* OPAQUE - WBXML 1.1 and newer */
6602 if (tvb_get_guint8 (tvb, 0)) { /* WBXML 1.x (x > 0) */
6604 if (tag_save_known) { /* Knwon tag */
6605 if (map->opaque_binary_tag) {
6606 str = map->opaque_binary_tag(tvb, off + 1,
6607 tag_save_known, *codepage_stag, &len);
6609 str = default_opaque_binary_tag(tvb, off + 1,
6610 tag_save_known, *codepage_stag, &len);
6612 } else { /* lITERAL tag */
6613 if (map->opaque_literal_tag) {
6614 str = map->opaque_literal_tag(tvb, off + 1,
6615 tag_save_literal, *codepage_stag, &len);
6617 str = default_opaque_literal_tag(tvb, off + 1,
6618 tag_save_literal, *codepage_stag, &len);
6621 proto_tree_add_text (tree, tvb, off, 1 + len,
6622 " %3d | Tag | T %3d "
6623 "| OPAQUE (Opaque data) "
6625 *level, *codepage_stag, Indent (*level), str);
6628 } else { /* WBXML 1.0 - RESERVED_2 token (invalid) */
6629 proto_tree_add_text (tree, tvb, off, 1,
6630 " %3d | Tag | T %3d "
6631 "| RESERVED_2 (Invalid Token!) "
6632 "| WBXML 1.0 parsing stops here.",
6633 *level, *codepage_stag);
6634 /* Stop processing as it is impossible to parse now */
6636 DebugLog(("STAG: level = %u, Return: len = %u\n", *level, off - offset));
6637 return (off - offset);
6641 /* No default clause, as all cases have been treated */
6642 } else { /* LITERAL or Known TAG */
6643 /* We must store the initial tag, and also retrieve the new tag.
6644 * For efficiency reasons, we store the literal tag representation
6645 * for known tags too, so we can easily close the tag without the
6646 * need of a new lookup and avoiding storage of token codepage.
6648 * There are 4 possibilities:
6650 * 1. Known tag followed by a known tag
6651 * 2. Known tag followed by a LITERAL tag
6652 * 3. LITERAL tag followed by Known tag
6653 * 4. LITERAL tag followed by LITERAL tag
6656 /* Store the new tag */
6658 if ((peek & 0x3F) == 4) { /* LITERAL */
6659 DebugLog(("STAG: LITERAL tag (peek = 0x%02X, off = %u) - TableRef follows!\n", peek, off));
6660 index = tvb_get_guintvar (tvb, off+1, &tag_len);
6661 str_len = tvb_strsize (tvb, str_tbl+index);
6662 tag_new_literal = (gchar*)tvb_get_ptr (tvb, str_tbl+index, str_len);
6663 tag_new_known = 0; /* invalidate known tag_new */
6664 } else { /* Known tag */
6665 tag_new_known = peek & 0x3F;
6666 tag_new_literal = map_token (map->tags, *codepage_stag,
6668 /* Stored looked up tag name string */
6671 /* Parsing of TAG starts HERE */
6672 if (peek & 0x40) { /* Content present */
6674 * [!] An explicit END token is expected in these cases!
6675 * ==> Recursion possible if we encounter a tag with content;
6676 * recursion will return at the explicit END token.
6678 if (parsing_tag_content) { /* Recurse */
6679 DebugLog(("STAG: Tag in Tag - RECURSE! (off = %u)\n", off));
6680 /* Do not process the attribute list:
6681 * recursion will take care of it */
6683 len = parse_wbxml_tag_defined (tree, tvb, off, str_tbl,
6684 level, codepage_stag, codepage_attr, map);
6686 } else { /* Now we will have content to parse */
6687 /* Save the start tag so we can properly close it later. */
6688 if ((peek & 0x3F) == 4) { /* Literal tag */
6689 tag_save_literal = tag_new_literal;
6691 } else { /* Known tag */
6692 tag_save_known = tag_new_known;
6693 tag_save_literal = tag_new_literal;
6694 /* The last statement avoids needless lookups */
6696 /* Process the attribute list if present */
6697 if (peek & 0x80) { /* Content and Attribute list present */
6698 if (tag_new_known) { /* Known tag */
6699 proto_tree_add_text (tree, tvb, off, 1,
6700 " %3d | Tag | T %3d "
6701 "| Known Tag 0x%02X (AC) "
6703 *level, *codepage_stag, tag_new_known,
6704 Indent (*level), tag_new_literal);
6705 /* Tag string already looked up earlier! */
6707 } else { /* LITERAL tag */
6708 proto_tree_add_text (tree, tvb, off, 1,
6709 " %3d | Tag | T %3d "
6710 "| LITERAL_AC (Literal tag) (AC) "
6712 *level, *codepage_stag, Indent (*level), tag_new_literal);
6715 len = parse_wbxml_attribute_list_defined (tree, tvb,
6716 off, str_tbl, *level, codepage_attr, map);
6717 /* Check that there is still room in packet */
6719 if (off >= tvb_len) {
6720 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n",
6721 *level, off - offset));
6723 * TODO - Do we need to free g_malloc()ed memory?
6725 THROW(ReportedBoundsError);
6727 proto_tree_add_text (tree, tvb, off-1, 1,
6728 " %3d | Tag | T %3d "
6729 "| END (attribute list) "
6731 *level, *codepage_stag, Indent (*level));
6732 } else { /* Content, no Attribute list */
6733 if (tag_new_known) { /* Known tag */
6734 proto_tree_add_text (tree, tvb, off, 1,
6735 " %3d | Tag | T %3d "
6736 "| Known Tag 0x%02X (.C) "
6738 *level, *codepage_stag, tag_new_known,
6739 Indent (*level), tag_new_literal);
6740 /* Tag string already looked up earlier! */
6742 } else { /* LITERAL tag */
6743 proto_tree_add_text (tree, tvb, off, 1,
6744 " %3d | Tag | T %3d "
6745 "| LITERAL_C (Literal Tag) (.C) "
6747 *level, *codepage_stag, Indent (*level),
6752 /* The data that follows in the parsing process
6753 * represents content for the opening tag
6754 * we've just processed in the lines above.
6755 * Next time we encounter a tag with content: recurse
6757 parsing_tag_content = TRUE;
6758 DebugLog(("Tag in Tag - No recursion this time! (off = %u)\n", off));
6760 } else { /* No Content */
6761 DebugLog(("<Tag/> in Tag - No recursion! (off = %u)\n", off));
6763 if (peek & 0x80) { /* No Content, Attribute list present */
6764 if (tag_new_known) { /* Known tag */
6765 proto_tree_add_text (tree, tvb, off, 1,
6766 " %3d | Tag | T %3d "
6767 "| Known Tag 0x%02X (A.) "
6769 *level, *codepage_stag, tag_new_known,
6770 Indent (*level), tag_new_literal);
6771 /* Tag string already looked up earlier! */
6773 len = parse_wbxml_attribute_list_defined (tree, tvb,
6774 off, str_tbl, *level, codepage_attr, map);
6775 /* Check that there is still room in packet */
6777 if (off > tvb_len) {
6778 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n", *level, off - offset));
6780 * TODO - Do we need to free g_malloc()ed memory?
6782 THROW(ReportedBoundsError);
6784 proto_tree_add_text (tree, tvb, off-1, 1,
6785 " %3d | Tag | T %3d "
6786 "| END (Known Tag) "
6788 *level, *codepage_stag, Indent (*level));
6789 } else { /* LITERAL tag */
6790 proto_tree_add_text (tree, tvb, off, 1,
6791 " %3d | Tag | T %3d "
6792 "| LITERAL_A (Literal Tag) (A.) "
6794 *level, *codepage_stag, Indent (*level), tag_new_literal);
6796 len = parse_wbxml_attribute_list_defined (tree, tvb,
6797 off, str_tbl, *level, codepage_attr, map);
6798 /* Check that there is still room in packet */
6800 if (off >= tvb_len) {
6801 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n", *level, off - offset));
6803 * TODO - Do we need to free g_malloc()ed memory?
6805 THROW(ReportedBoundsError);
6807 proto_tree_add_text (tree, tvb, off-1, 1,
6808 " %3d | Tag | T %3d "
6809 "| END (Literal Tag) "
6811 *level, *codepage_stag, Indent (*level));
6813 } else { /* No Content, No Attribute list */
6814 if (tag_new_known) { /* Known tag */
6815 proto_tree_add_text (tree, tvb, off, 1,
6816 " %3d | Tag | T %3d "
6817 "| Known Tag 0x%02x (..) "
6819 *level, *codepage_stag, tag_new_known,
6820 Indent (*level), tag_new_literal);
6821 /* Tag string already looked up earlier! */
6823 } else { /* LITERAL tag */
6824 proto_tree_add_text (tree, tvb, off, 1,
6825 " %3d | Tag | T %3d "
6826 "| LITERAL (Literal Tag) (..) "
6828 *level, *codepage_stag, Indent (*level),
6834 /* TODO: Do I have to reset code page here? */
6836 } /* if (tag & 0x3F) >= 5 */
6838 DebugLog(("STAG: level = %u, Return: len = %u (end of function body)\n", *level, off - offset));
6839 return (off - offset);
6843 /* This function performs the WBXML decoding as in parse_wbxml_tag_defined()
6844 * but this time no WBXML mapping is performed.
6846 * Attribute parsing is done in parse_wbxml_attribute_list().
6849 parse_wbxml_tag (proto_tree *tree, tvbuff_t *tvb, guint32 offset,
6850 guint32 str_tbl, guint8 *level,
6851 guint8 *codepage_stag, guint8 *codepage_attr)
6853 guint32 tvb_len = tvb_reported_length (tvb);
6854 guint32 off = offset;
6860 guint32 tag_len; /* Length of the index (uintvar) from a LITERAL tag */
6861 guint8 tag_save_known = 0; /* Will contain peek & 0x3F (tag identity) */
6862 guint8 tag_new_known = 0; /* Will contain peek & 0x3F (tag identity) */
6863 const char *tag_save_literal; /* Will contain the LITERAL tag identity */
6864 const char *tag_new_literal; /* Will contain the LITERAL tag identity */
6865 char *tag_save_buf=NULL; /* Will contain "tag_0x%02X" */
6866 char *tag_new_buf=NULL; /* Will contain "tag_0x%02X" */
6867 guint8 parsing_tag_content = FALSE; /* Are we parsing content from a
6868 tag with content: <x>Content</x>
6870 The initial state is FALSE.
6871 This state will trigger recursion. */
6872 tag_save_literal = NULL; /* Prevents compiler warning */
6874 DebugLog(("parse_wbxml_tag (level = %u, offset = %u)\n", *level, offset));
6875 while (off < tvb_len) {
6876 peek = tvb_get_guint8 (tvb, off);
6877 DebugLog(("STAG: (top of while) level = %3u, peek = 0x%02X, off = %u, tvb_len = %u\n", *level, peek, off, tvb_len));
6878 if ((peek & 0x3F) < 4) switch (peek) { /* Global tokens in state = STAG
6879 but not the LITERAL tokens */
6880 case 0x00: /* SWITCH_PAGE */
6881 *codepage_stag = tvb_get_guint8 (tvb, off+1);
6882 proto_tree_add_text (tree, tvb, off, 2,
6883 " | Tag | T -->%3d "
6884 "| SWITCH_PAGE (Tag code page) "
6889 case 0x01: /* END: only possible for Tag with Content */
6890 if (tag_save_known) { /* Known TAG */
6891 proto_tree_add_text (tree, tvb, off, 1,
6892 " %3d | Tag | T %3d "
6893 "| END (Known Tag 0x%02X) "
6895 *level, *codepage_stag, tag_save_known,
6897 tag_save_literal); /* We already looked it up! */
6898 } else { /* Literal TAG */
6899 proto_tree_add_text (tree, tvb, off, 1,
6900 " %3d | Tag | T %3d "
6901 "| END (Literal Tag) "
6903 *level, *codepage_stag, Indent (*level),
6904 tag_save_literal ? tag_save_literal : "");
6908 /* Reset code page: not needed as return from recursion */
6909 DebugLog(("STAG: level = %u, Return: len = %u\n",
6910 *level, off - offset));
6911 return (off - offset);
6913 case 0x02: /* ENTITY */
6914 ent = tvb_get_guintvar (tvb, off+1, &len);
6915 proto_tree_add_text (tree, tvb, off, 1+len,
6916 " %3d | Tag | T %3d "
6919 *level, *codepage_stag, Indent (*level), ent);
6922 case 0x03: /* STR_I */
6923 len = tvb_strsize (tvb, off+1);
6924 proto_tree_add_text (tree, tvb, off, 1+len,
6925 " %3d | Tag | T %3d "
6926 "| STR_I (Inline string) "
6928 *level, *codepage_stag, Indent(*level),
6929 tvb_format_text (tvb, off+1, len-1));
6932 case 0x40: /* EXT_I_0 */
6933 case 0x41: /* EXT_I_1 */
6934 case 0x42: /* EXT_I_2 */
6935 /* Extension tokens */
6936 len = tvb_strsize (tvb, off+1);
6937 proto_tree_add_text (tree, tvb, off, 1+len,
6938 " %3d | Tag | T %3d "
6939 "| EXT_I_%1x (Extension Token) "
6940 "| %s(Inline string extension: \'%s\')",
6941 *level, *codepage_stag, peek & 0x0f, Indent (*level),
6942 tvb_format_text (tvb, off+1, len-1));
6946 proto_tree_add_text (tree, tvb, off, 1,
6947 " %3d | Tag | T %3d "
6948 "| PI (XML Processing Instruction) "
6950 *level, *codepage_stag, Indent (*level));
6951 len = parse_wbxml_attribute_list (tree, tvb, off, str_tbl,
6952 *level, codepage_attr);
6953 /* Check that there is still room in packet */
6955 if (off >= tvb_len) {
6956 DebugLog(("STAG: level = %u, ThrowException: len = %u (short frame)\n",
6957 *level, off - offset));
6959 * TODO - Do we need to free g_malloc()ed memory?
6961 THROW(ReportedBoundsError);
6963 proto_tree_add_text (tree, tvb, off-1, 1,
6964 " %3d | Tag | T %3d "
6967 *level, *codepage_stag, Indent (*level));
6969 case 0x80: /* EXT_T_0 */
6970 case 0x81: /* EXT_T_1 */
6971 case 0x82: /* EXT_T_2 */
6972 /* Extension tokens */
6973 index = tvb_get_guintvar (tvb, off+1, &len);
6974 proto_tree_add_text (tree, tvb, off, 1+len,
6975 " %3d | Tag | T %3d "
6976 "| EXT_T_%1x (Extension Token) "
6977 "| %s(Extension Token, integer value: %u)",
6978 *level, *codepage_stag, peek & 0x0f, Indent (*level),
6982 case 0x83: /* STR_T */
6983 index = tvb_get_guintvar (tvb, off+1, &len);
6984 str_len = tvb_strsize (tvb, str_tbl+index);
6985 proto_tree_add_text (tree, tvb, off, 1+len,
6986 " %3d | Tag | T %3d "
6987 "| STR_T (Tableref string) "
6989 *level, *codepage_stag, Indent (*level),
6990 tvb_format_text (tvb, str_tbl+index, str_len-1));
6993 case 0xC0: /* EXT_0 */
6994 case 0xC1: /* EXT_1 */
6995 case 0xC2: /* EXT_2 */
6996 /* Extension tokens */
6997 proto_tree_add_text (tree, tvb, off, 1,
6998 " %3d | Tag | T %3d "
6999 "| EXT_%1x (Extension Token) "
7000 "| %s(Single-byte extension)",
7001 *level, *codepage_stag, peek & 0x0f, Indent (*level));
7004 case 0xC3: /* OPAQUE - WBXML 1.1 and newer */
7005 if (tvb_get_guint8 (tvb, 0)) { /* WBXML 1.x (x > 0) */
7006 index = tvb_get_guintvar (tvb, off+1, &len);
7007 proto_tree_add_text (tree, tvb, off, 1 + len + index,
7008 " %3d | Tag | T %3d "
7009 "| OPAQUE (Opaque data) "
7010 "| %s(%d bytes of opaque data)",
7011 *level, *codepage_stag, Indent (*level), index);
7013 } else { /* WBXML 1.0 - RESERVED_2 token (invalid) */
7014 proto_tree_add_text (tree, tvb, off, 1,
7015 " %3d | Tag | T %3d "
7016 "| RESERVED_2 (Invalid Token!) "
7017 "| WBXML 1.0 parsing stops here.",
7018 *level, *codepage_stag);
7019 /* Stop processing as it is impossible to parse now */
7021 DebugLog(("STAG: level = %u, Return: len = %u\n",
7022 *level, off - offset));
7023 return (off - offset);
7027 /* No default clause, as all cases have been treated */
7028 } else { /* LITERAL or Known TAG */
7029 /* We must store the initial tag, and also retrieve the new tag.
7030 * For efficiency reasons, we store the literal tag representation
7031 * for known tags too, so we can easily close the tag without the
7032 * need of a new lookup and avoiding storage of token codepage.
7034 * There are 4 possibilities:
7036 * 1. Known tag followed by a known tag
7037 * 2. Known tag followed by a LITERAL tag
7038 * 3. LITERAL tag followed by Known tag
7039 * 4. LITERAL tag followed by LITERAL tag
7042 /* Store the new tag */
7044 if ((peek & 0x3F) == 4) { /* LITERAL */
7045 DebugLog(("STAG: LITERAL tag (peek = 0x%02X, off = %u)"
7046 " - TableRef follows!\n", peek, off));
7047 index = tvb_get_guintvar (tvb, off+1, &tag_len);
7048 str_len = tvb_strsize (tvb, str_tbl+index);
7049 tag_new_literal = (gchar*)tvb_get_ptr (tvb, str_tbl+index, str_len);
7050 tag_new_known = 0; /* invalidate known tag_new */
7051 } else { /* Known tag */
7052 tag_new_known = peek & 0x3F;
7053 tag_new_buf=ep_alloc(10);
7054 g_snprintf (tag_new_buf, 10, "Tag_0x%02X",
7056 tag_new_literal = tag_new_buf;
7057 /* Stored looked up tag name string */
7060 /* Parsing of TAG starts HERE */
7061 if (peek & 0x40) { /* Content present */
7063 * [!] An explicit END token is expected in these cases!
7064 * ==> Recursion possible if we encounter a tag with content;
7065 * recursion will return at the explicit END token.
7067 if (parsing_tag_content) { /* Recurse */
7068 DebugLog(("STAG: Tag in Tag - RECURSE! (off = %u)\n", off));
7069 /* Do not process the attribute list:
7070 * recursion will take care of it */
7072 len = parse_wbxml_tag (tree, tvb, off, str_tbl, level,
7073 codepage_stag, codepage_attr);
7075 } else { /* Now we will have content to parse */
7076 /* Save the start tag so we can properly close it later. */
7077 if ((peek & 0x3F) == 4) { /* Literal tag */
7078 tag_save_literal = tag_new_literal;
7080 } else { /* Known tag */
7081 tag_save_known = tag_new_known;
7082 tag_save_buf=ep_alloc(10);
7083 g_snprintf (tag_save_buf, 10, "Tag_0x%02X",
7085 tag_save_literal = tag_save_buf;
7086 /* The last statement avoids needless lookups */
7088 /* Process the attribute list if present */
7089 if (peek & 0x80) { /* Content and Attribute list present */
7090 if (tag_new_known) { /* Known tag */
7091 proto_tree_add_text (tree, tvb, off, 1,
7092 " %3d | Tag | T %3d "
7093 "| Known Tag 0x%02X (AC) "
7095 *level, *codepage_stag, tag_new_known,
7096 Indent (*level), tag_new_literal);
7097 /* Tag string already looked up earlier! */
7099 } else { /* LITERAL tag */
7100 proto_tree_add_text (tree, tvb, off, 1,
7101 " %3d | Tag | T %3d "
7102 "| LITERAL_AC (Literal tag) (AC) "
7104 *level, *codepage_stag, Indent (*level),
7108 len = parse_wbxml_attribute_list (tree, tvb,
7109 off, str_tbl, *level, codepage_attr);
7110 /* Check that there is still room in packet */
7112 if (off >= tvb_len) {
7113 DebugLog(("STAG: level = %u, ThrowException: "
7114 "len = %u (short frame)\n",
7115 *level, off - offset));
7117 * TODO - Do we need to free g_malloc()ed memory?
7119 THROW(ReportedBoundsError);
7121 proto_tree_add_text (tree, tvb, off-1, 1,
7122 " %3d | Tag | T %3d "
7123 "| END (attribute list) "
7125 *level, *codepage_stag, Indent (*level));
7126 } else { /* Content, no Attribute list */
7127 if (tag_new_known) { /* Known tag */
7128 proto_tree_add_text (tree, tvb, off, 1,
7129 " %3d | Tag | T %3d "
7130 "| Known Tag 0x%02X (.C) "
7132 *level, *codepage_stag, tag_new_known,
7133 Indent (*level), tag_new_literal);
7134 /* Tag string already looked up earlier! */
7136 } else { /* LITERAL tag */
7137 proto_tree_add_text (tree, tvb, off, 1,
7138 " %3d | Tag | T %3d "
7139 "| LITERAL_C (Literal Tag) (.C) "
7141 *level, *codepage_stag, Indent (*level),
7146 /* The data that follows in the parsing process
7147 * represents content for the opening tag
7148 * we've just processed in the lines above.
7149 * Next time we encounter a tag with content: recurse
7151 parsing_tag_content = TRUE;
7152 DebugLog(("Tag in Tag - No recursion this time! "
7153 "(off = %u)\n", off));
7155 } else { /* No Content */
7156 DebugLog(("<Tag/> in Tag - No recursion! (off = %u)\n", off));
7158 if (peek & 0x80) { /* No Content, Attribute list present */
7159 if (tag_new_known) { /* Known tag */
7160 proto_tree_add_text (tree, tvb, off, 1,
7161 " %3d | Tag | T %3d "
7162 "| Known Tag 0x%02X (A.) "
7164 *level, *codepage_stag, tag_new_known,
7165 Indent (*level), tag_new_literal);
7166 /* Tag string already looked up earlier! */
7168 len = parse_wbxml_attribute_list (tree, tvb,
7169 off, str_tbl, *level, codepage_attr);
7170 /* Check that there is still room in packet */
7172 if (off >= tvb_len) {
7173 DebugLog(("STAG: level = %u, ThrowException: "
7174 "len = %u (short frame)\n",
7175 *level, off - offset));
7177 * TODO - Do we need to free g_malloc()ed memory?
7179 THROW(ReportedBoundsError);
7181 proto_tree_add_text (tree, tvb, off-1, 1,
7182 " %3d | Tag | T %3d "
7183 "| END (Known Tag) "
7185 *level, *codepage_stag, Indent (*level));
7186 } else { /* LITERAL tag */
7187 proto_tree_add_text (tree, tvb, off, 1,
7188 " %3d | Tag | T %3d "
7189 "| LITERAL_A (Literal Tag) (A.) "
7191 *level, *codepage_stag, Indent (*level),
7194 len = parse_wbxml_attribute_list (tree, tvb,
7195 off, str_tbl, *level, codepage_attr);
7196 /* Check that there is still room in packet */
7198 if (off >= tvb_len) {
7199 DebugLog(("STAG: level = %u, ThrowException: "
7200 "len = %u (short frame)\n",
7201 *level, off - offset));
7203 * TODO - Do we need to free g_malloc()ed memory?
7205 THROW(ReportedBoundsError);
7207 proto_tree_add_text (tree, tvb, off-1, 1,
7208 " %3d | Tag | T %3d "
7209 "| END (Literal Tag) "
7211 *level, *codepage_stag, Indent (*level));
7213 } else { /* No Content, No Attribute list */
7214 if (tag_new_known) { /* Known tag */
7215 proto_tree_add_text (tree, tvb, off, 1,
7216 " %3d | Tag | T %3d "
7217 "| Known Tag 0x%02x (..) "
7219 *level, *codepage_stag, tag_new_known,
7220 Indent (*level), tag_new_literal);
7221 /* Tag string already looked up earlier! */
7223 } else { /* LITERAL tag */
7224 proto_tree_add_text (tree, tvb, off, 1,
7225 " %3d | Tag | T %3d "
7226 "| LITERAL (Literal Tag) (..) "
7228 *level, *codepage_stag, Indent (*level),
7234 /* TODO: Do I have to reset code page here? */
7236 } /* if (tag & 0x3F) >= 5 */
7238 DebugLog(("STAG: level = %u, Return: len = %u (end of function body)\n",
7239 *level, off - offset));
7240 return (off - offset);
7244 /**************************
7245 * WBXML Attribute tokens *
7246 **************************
7247 * Bit Mask : Example
7248 * -------------------
7249 * 0... .... : attr= (attribute name)
7250 * href='http://' (attribute name with start of attribute value)
7251 * 1... .... : 'www.' (attribute value, or part of it)
7256 /* This function parses the WBXML and maps known token interpretations
7257 * to the WBXML tokens. As a result, the original XML document can be
7258 * recreated. Indentation is generated in order to ease reading.
7260 * This function performs attribute list parsing.
7262 * The wbxml_decoding entry *map contains the actual token mapping.
7264 * NOTE: See above for known token mappings.
7267 parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb,
7268 guint32 offset, guint32 str_tbl, guint8 level, guint8 *codepage_attr,
7269 const wbxml_decoding *map)
7271 guint32 tvb_len = tvb_reported_length (tvb);
7272 guint32 off = offset;
7278 guint8 attr_save_known = 0; /* Will contain peek & 0x3F (attr identity) */
7279 const char *attr_save_literal = NULL; /* Will contain the LITERAL attr identity */
7281 DebugLog(("parse_wbxml_attr_defined (level = %u, offset = %u)\n",
7283 /* Parse attributes */
7284 while (off < tvb_len) {
7285 peek = tvb_get_guint8 (tvb, off);
7286 DebugLog(("ATTR: (top of while) level = %3u, peek = 0x%02X, "
7287 "off = %u, tvb_len = %u\n", level, peek, off, tvb_len));
7288 if ((peek & 0x3F) < 5) switch (peek) { /* Global tokens
7290 case 0x00: /* SWITCH_PAGE */
7291 *codepage_attr = tvb_get_guint8 (tvb, off+1);
7292 proto_tree_add_text (tree, tvb, off, 2,
7293 " | Attr | A -->%3d "
7294 "| SWITCH_PAGE (Attr code page) |",
7298 case 0x01: /* END */
7300 * The Attribute END token means either ">" or "/>"
7301 * and as a consequence both must be treated separately.
7302 * This is done in the TAG state parser.
7305 DebugLog(("ATTR: level = %u, Return: len = %u\n",
7306 level, off - offset));
7307 return (off - offset);
7308 case 0x02: /* ENTITY */
7309 ent = tvb_get_guintvar (tvb, off+1, &len);
7310 proto_tree_add_text (tree, tvb, off, 1+len,
7311 " %3d | Attr | A %3d "
7314 level, *codepage_attr, Indent (level), ent);
7317 case 0x03: /* STR_I */
7318 len = tvb_strsize (tvb, off+1);
7319 proto_tree_add_text (tree, tvb, off, 1+len,
7320 " %3d | Attr | A %3d "
7321 "| STR_I (Inline string) "
7323 level, *codepage_attr, Indent (level),
7324 tvb_format_text (tvb, off+1, len-1));
7327 case 0x04: /* LITERAL */
7328 /* ALWAYS means the start of a new attribute,
7329 * and may only contain the NAME of the attribute.
7331 index = tvb_get_guintvar (tvb, off+1, &len);
7332 str_len = tvb_strsize (tvb, str_tbl+index);
7333 attr_save_known = 0;
7334 attr_save_literal = tvb_format_text (tvb,
7335 str_tbl+index, str_len-1);
7336 proto_tree_add_text (tree, tvb, off, 1+len,
7337 " %3d | Attr | A %3d "
7338 "| LITERAL (Literal Attribute) "
7340 level, *codepage_attr, Indent (level),
7344 case 0x40: /* EXT_I_0 */
7345 case 0x41: /* EXT_I_1 */
7346 case 0x42: /* EXT_I_2 */
7347 /* Extension tokens */
7348 len = tvb_strsize (tvb, off+1);
7349 proto_tree_add_text (tree, tvb, off, 1+len,
7350 " %3d | Attr | A %3d "
7351 "| EXT_I_%1x (Extension Token) "
7353 level, *codepage_attr, peek & 0x0f, Indent (level),
7354 map_token (map->global, 0, peek),
7355 tvb_format_text (tvb, off+1, len-1));
7358 /* 0x43 impossible in ATTR state */
7359 /* 0x44 impossible in ATTR state */
7360 case 0x80: /* EXT_T_0 */
7361 case 0x81: /* EXT_T_1 */
7362 case 0x82: /* EXT_T_2 */
7363 /* Extension tokens */
7364 index = tvb_get_guintvar (tvb, off+1, &len);
7367 if (map->ext_t[peek & 0x03])
7368 s = (map->ext_t[peek & 0x03])(tvb, index, str_tbl);
7370 s = g_strdup_printf("EXT_T_%1x (%s)", peek & 0x03,
7371 map_token (map->global, 0, peek));
7373 proto_tree_add_text (tree, tvb, off, 1+len,
7374 " %3d | Tag | T %3d "
7375 "| EXT_T_%1x (Extension Token) "
7377 level, *codepage_attr, peek & 0x0f, Indent (level),
7383 case 0x83: /* STR_T */
7384 index = tvb_get_guintvar (tvb, off+1, &len);
7385 str_len = tvb_strsize (tvb, str_tbl+index);
7386 proto_tree_add_text (tree, tvb, off, 1+len,
7387 " %3d | Attr | A %3d "
7388 "| STR_T (Tableref string) "
7390 level, *codepage_attr, Indent (level),
7391 tvb_format_text (tvb, str_tbl+index, str_len-1));
7394 /* 0x84 impossible in ATTR state */
7395 case 0xC0: /* EXT_0 */
7396 case 0xC1: /* EXT_1 */
7397 case 0xC2: /* EXT_2 */
7398 /* Extension tokens */
7399 proto_tree_add_text (tree, tvb, off, 1,
7400 " %3d | Attr | A %3d "
7401 "| EXT_%1x (Extension Token) "
7403 level, *codepage_attr, peek & 0x0f, Indent (level),
7404 map_token (map->global, 0, peek));
7407 case 0xC3: /* OPAQUE - WBXML 1.1 and newer */
7408 if (tvb_get_guint8 (tvb, 0)) { /* WBXML 1.x (x > 0) */
7410 if (attr_save_known) { /* Knwon attribute */
7411 if (map->opaque_binary_attr) {
7412 str = map->opaque_binary_attr(tvb, off + 1,
7413 attr_save_known, *codepage_attr, &len);
7415 str = default_opaque_binary_attr(tvb, off + 1,
7416 attr_save_known, *codepage_attr, &len);
7418 } else { /* lITERAL attribute */
7419 if (map->opaque_literal_tag) {
7420 str = map->opaque_literal_attr(tvb, off + 1,
7421 attr_save_literal, *codepage_attr, &len);
7423 str = default_opaque_literal_attr(tvb, off + 1,
7424 attr_save_literal, *codepage_attr, &len);
7427 proto_tree_add_text (tree, tvb, off, 1 + len,
7428 " %3d | Attr | A %3d "
7429 "| OPAQUE (Opaque data) "
7431 level, *codepage_attr, Indent (level), str);
7434 } else { /* WBXML 1.0 - RESERVED_2 token (invalid) */
7435 proto_tree_add_text (tree, tvb, off, 1,
7436 " %3d | Attr | A %3d "
7437 "| RESERVED_2 (Invalid Token!) "
7438 "| WBXML 1.0 parsing stops here.",
7439 level, *codepage_attr);
7440 /* Stop processing as it is impossible to parse now */
7442 DebugLog(("ATTR: level = %u, Return: len = %u\n",
7443 level, off - offset));
7444 return (off - offset);
7447 /* 0xC4 impossible in ATTR state */
7449 proto_tree_add_text (tree, tvb, off, 1,
7450 " %3d | Attr | A %3d "
7451 "| %-10s (Invalid Token!) "
7452 "| WBXML parsing stops here.",
7453 level, *codepage_attr,
7454 val_to_str (peek, vals_wbxml1x_global_tokens, "(unknown 0x%x)"));
7455 /* Move to end of buffer */
7458 } else { /* Known atribute token */
7459 if (peek & 0x80) { /* attrValue */
7460 proto_tree_add_text (tree, tvb, off, 1,
7461 " %3d | Attr | A %3d "
7462 "| Known attrValue 0x%02X "
7464 level, *codepage_attr, peek & 0x7f, Indent (level),
7465 map_token (map->attrValue, *codepage_attr, peek));
7467 } else { /* attrStart */
7468 attr_save_known = peek & 0x7f;
7469 proto_tree_add_text (tree, tvb, off, 1,
7470 " %3d | Attr | A %3d "
7471 "| Known attrStart 0x%02X "
7473 level, *codepage_attr, attr_save_known, Indent (level),
7474 map_token (map->attrStart, *codepage_attr, peek));
7479 DebugLog(("ATTR: level = %u, Return: len = %u (end of function body)\n",
7480 level, off - offset));
7481 return (off - offset);
7485 /* This function performs the WBXML attribute decoding as in
7486 * parse_wbxml_attribute_list_defined() but this time no WBXML mapping
7489 * This function performs attribute list parsing.
7491 * NOTE: Code page switches not yet processed in the code!
7494 parse_wbxml_attribute_list (proto_tree *tree, tvbuff_t *tvb,
7495 guint32 offset, guint32 str_tbl, guint8 level, guint8 *codepage_attr)
7497 guint32 tvb_len = tvb_reported_length (tvb);
7498 guint32 off = offset;
7505 DebugLog(("parse_wbxml_attr (level = %u, offset = %u)\n", level, offset));
7506 /* Parse attributes */
7507 while (off < tvb_len) {
7508 peek = tvb_get_guint8 (tvb, off);
7509 DebugLog(("ATTR: (top of while) level = %3u, peek = 0x%02X, "
7510 "off = %u, tvb_len = %u\n", level, peek, off, tvb_len));
7511 if ((peek & 0x3F) < 5) switch (peek) { /* Global tokens
7513 case 0x00: /* SWITCH_PAGE */
7514 *codepage_attr = tvb_get_guint8 (tvb, off+1);
7515 proto_tree_add_text (tree, tvb, off, 2,
7516 " | Attr | A -->%3d "
7517 "| SWITCH_PAGE (Attr code page) |",
7521 case 0x01: /* END */
7523 * The Attribute END token means either ">" or "/>"
7524 * and as a consequence both must be treated separately.
7525 * This is done in the TAG state parser.
7528 DebugLog(("ATTR: level = %u, Return: len = %u\n",
7529 level, off - offset));
7530 return (off - offset);
7531 case 0x02: /* ENTITY */
7532 ent = tvb_get_guintvar (tvb, off+1, &len);
7533 proto_tree_add_text (tree, tvb, off, 1+len,
7534 " %3d | Attr | A %3d "
7537 level, *codepage_attr, Indent (level), ent);
7540 case 0x03: /* STR_I */
7541 len = tvb_strsize (tvb, off+1);
7542 proto_tree_add_text (tree, tvb, off, 1+len,
7543 " %3d | Attr | A %3d "
7544 "| STR_I (Inline string) "
7546 level, *codepage_attr, Indent (level),
7547 tvb_format_text (tvb, off+1, len-1));
7550 case 0x04: /* LITERAL */
7551 index = tvb_get_guintvar (tvb, off+1, &len);
7552 str_len = tvb_strsize (tvb, str_tbl+index);
7553 proto_tree_add_text (tree, tvb, off, 1+len,
7554 " %3d | Attr | A %3d "
7555 "| LITERAL (Literal Attribute) "
7557 level, *codepage_attr, Indent (level),
7558 tvb_format_text (tvb, str_tbl+index, str_len-1));
7561 case 0x40: /* EXT_I_0 */
7562 case 0x41: /* EXT_I_1 */
7563 case 0x42: /* EXT_I_2 */
7564 /* Extension tokens */
7565 len = tvb_strsize (tvb, off+1);
7566 proto_tree_add_text (tree, tvb, off, 1+len,
7567 " %3d | Attr | A %3d "
7568 "| EXT_I_%1x (Extension Token) "
7569 "| %s(Inline string extension: \'%s\')",
7570 level, *codepage_attr, peek & 0x0f, Indent (level),
7571 tvb_format_text (tvb, off+1, len-1));
7574 /* 0x43 impossible in ATTR state */
7575 /* 0x44 impossible in ATTR state */
7576 case 0x80: /* EXT_T_0 */
7577 case 0x81: /* EXT_T_1 */
7578 case 0x82: /* EXT_T_2 */
7579 /* Extension tokens */
7580 index = tvb_get_guintvar (tvb, off+1, &len);
7581 proto_tree_add_text (tree, tvb, off, 1+len,
7582 " %3d | Attr | A %3d "
7583 "| EXT_T_%1x (Extension Token) "
7584 "| %s(Extension Token, integer value: %u)",
7585 level, *codepage_attr, peek & 0x0f, Indent (level),
7589 case 0x83: /* STR_T */
7590 index = tvb_get_guintvar (tvb, off+1, &len);
7591 str_len = tvb_strsize (tvb, str_tbl+index);
7592 proto_tree_add_text (tree, tvb, off, 1+len,
7593 " %3d | Attr | A %3d "
7594 "| STR_T (Tableref string) "
7596 level, *codepage_attr, Indent (level),
7597 tvb_format_text (tvb, str_tbl+index, str_len-1));
7600 /* 0x84 impossible in ATTR state */
7601 case 0xC0: /* EXT_0 */
7602 case 0xC1: /* EXT_1 */
7603 case 0xC2: /* EXT_2 */
7604 /* Extension tokens */
7605 proto_tree_add_text (tree, tvb, off, 1,
7606 " %3d | Attr | A %3d "
7607 "| EXT_%1x (Extension Token) "
7608 "| %s(Single-byte extension)",
7609 level, *codepage_attr, peek & 0x0f, Indent (level));
7612 case 0xC3: /* OPAQUE - WBXML 1.1 and newer */
7613 if (tvb_get_guint8 (tvb, 0)) { /* WBXML 1.x (x > 0) */
7614 index = tvb_get_guintvar (tvb, off+1, &len);
7615 proto_tree_add_text (tree, tvb, off, 1 + len + index,
7616 " %3d | Attr | A %3d "
7617 "| OPAQUE (Opaque data) "
7618 "| %s(%d bytes of opaque data)",
7619 level, *codepage_attr, Indent (level), index);
7621 } else { /* WBXML 1.0 - RESERVED_2 token (invalid) */
7622 proto_tree_add_text (tree, tvb, off, 1,
7623 " %3d | Attr | A %3d "
7624 "| RESERVED_2 (Invalid Token!) "
7625 "| WBXML 1.0 parsing stops here.",
7626 level, *codepage_attr);
7627 /* Stop processing as it is impossible to parse now */
7629 DebugLog(("ATTR: level = %u, Return: len = %u\n",
7630 level, off - offset));
7631 return (off - offset);
7634 /* 0xC4 impossible in ATTR state */
7636 proto_tree_add_text (tree, tvb, off, 1,
7637 " %3d | Attr | A %3d "
7638 "| %-10s (Invalid Token!) "
7639 "| WBXML parsing stops here.",
7640 level, *codepage_attr,
7641 val_to_str (peek, vals_wbxml1x_global_tokens, "(unknown 0x%x)"));
7642 /* Move to end of buffer */
7645 } else { /* Known atribute token */
7646 if (peek & 0x80) { /* attrValue */
7647 proto_tree_add_text (tree, tvb, off, 1,
7648 " %3d | Attr | A %3d "
7649 "| Known attrValue 0x%02X "
7650 "| %sattrValue_0x%02X",
7651 level, *codepage_attr, peek & 0x7f, Indent (level),
7654 } else { /* attrStart */
7655 proto_tree_add_text (tree, tvb, off, 1,
7656 " %3d | Attr | A %3d "
7657 "| Known attrStart 0x%02X "
7658 "| %sattrStart_0x%02X",
7659 level, *codepage_attr, peek & 0x7f, Indent (level),
7665 DebugLog(("ATTR: level = %u, Return: len = %u (end of function body)\n",
7666 level, off - offset));
7667 return (off - offset);
7671 /****************** Register the protocol with Wireshark ******************/
7674 /* This format is required because a script is used to build the C function
7675 * that calls the protocol registration. */
7678 proto_register_wbxml(void)
7680 module_t *wbxml_module; /* WBXML Preferences */
7682 /* Setup list of header fields. */
7683 static hf_register_info hf[] = {
7684 { &hf_wbxml_version,
7688 VALS ( vals_wbxml_versions ), 0x00,
7689 "WBXML Version", HFILL }
7691 { &hf_wbxml_public_id_known,
7692 { "Public Identifier (known)",
7693 "wbxml.public_id.known",
7694 FT_UINT32, BASE_HEX,
7695 VALS ( vals_wbxml_public_ids ), 0x00,
7696 "WBXML Known Public Identifier (integer)", HFILL }
7698 { &hf_wbxml_public_id_literal,
7699 { "Public Identifier (literal)",
7700 "wbxml.public_id.literal",
7701 FT_STRING, BASE_NONE,
7703 "WBXML Literal Public Identifier (text string)", HFILL }
7705 { &hf_wbxml_charset,
7708 FT_UINT32, BASE_HEX,
7709 VALS ( vals_character_sets ), 0x00,
7710 "WBXML Character Set", HFILL }
7714 /* Setup protocol subtree array */
7715 static gint *ett[] = {
7721 /* Register the protocol name and description */
7722 proto_wbxml = proto_register_protocol(
7728 /* Required function calls to register the header fields
7729 * and subtrees used */
7730 proto_register_field_array(proto_wbxml, hf, array_length(hf));
7731 proto_register_subtree_array(ett, array_length(ett));
7734 wbxml_module = prefs_register_protocol(proto_wbxml, NULL);
7735 prefs_register_bool_preference(wbxml_module,
7736 "skip_wbxml_token_mapping",
7737 "Skip the mapping of WBXML tokens to media type tokens.",
7738 "Enable this preference if you want to view the WBXML "
7739 "tokens without the representation in a media type "
7740 "(e.g., WML). Tokens will show up as Tag_0x12, "
7741 "attrStart_0x08 or attrValue_0x0B for example.",
7742 &skip_wbxml_token_mapping);
7743 prefs_register_bool_preference(wbxml_module,
7744 "disable_wbxml_token_parsing",
7745 "Disable the parsing of the WBXML tokens.",
7746 "Enable this preference if you want to skip the "
7747 "parsing of the WBXML tokens that constitute the body "
7748 "of the WBXML document. Only the WBXML header will be "
7749 "dissected (and visualized) then.",
7750 &disable_wbxml_token_parsing);
7752 register_dissector("wbxml", dissect_wbxml, proto_wbxml);
7753 register_dissector("wbxml-uaprof", dissect_uaprof, proto_wbxml);
7758 proto_reg_handoff_wbxml(void)
7760 dissector_handle_t wbxml_handle;
7762 /* Heuristic dissectors would be declared by means of:
7763 * heur_dissector_add("wsp", dissect_wbxml_heur, proto_wbxml);
7766 wbxml_handle = create_dissector_handle(dissect_wbxml, proto_wbxml);
7768 /* Register the WSP content types (defined as protocol port)
7769 * for WBXML dissection.
7771 * See http://www.wapforum.org/wina/wsp-content-type.htm
7773 * As the media types for WSP and HTTP are the same, the WSP dissector
7774 * uses the same string dissector table as the HTTP protocol.
7777 /**** Well-known WBXML WSP Content-Type values ****/
7779 dissector_add_string("media_type",
7780 "application/vnd.wap.wmlc", wbxml_handle);
7781 dissector_add_string("media_type",
7782 "application/vnd.wap.wta-eventc", wbxml_handle);
7783 dissector_add_string("media_type",
7784 "application/vnd.wap.wbxml", wbxml_handle);
7785 dissector_add_string("media_type",
7786 "application/vnd.wap.sic", wbxml_handle);
7787 dissector_add_string("media_type",
7788 "application/vnd.wap.slc", wbxml_handle);
7789 dissector_add_string("media_type",
7790 "application/vnd.wap.coc", wbxml_handle);
7791 dissector_add_string("media_type",
7792 "application/vnd.wap.connectivity-wbxml", wbxml_handle);
7793 dissector_add_string("media_type",
7794 "application/vnd.wap.locc+wbxml", wbxml_handle);
7795 dissector_add_string("media_type",
7796 "application/vnd.syncml+wbxml", wbxml_handle);
7797 dissector_add_string("media_type",
7798 "application/vnd.syncml.dm+wbxml", wbxml_handle);
7799 dissector_add_string("media_type",
7800 "application/vnd.oma.drm.rights+wbxml", wbxml_handle);
7801 dissector_add_string("media_type",
7802 "application/vnd.wv.csp.wbxml", wbxml_handle);
7804 /**** Registered WBXML WSP Content-Type values ****/
7806 dissector_add_string("media_type",
7807 "application/vnd.uplanet.cacheop-wbxml", wbxml_handle);
7808 dissector_add_string("media_type",
7809 "application/vnd.uplanet.alert-wbxml", wbxml_handle);
7810 dissector_add_string("media_type",
7811 "application/vnd.uplanet.list-wbxml", wbxml_handle);
7812 dissector_add_string("media_type",
7813 "application/vnd.uplanet.listcmd-wbxml", wbxml_handle);
7814 dissector_add_string("media_type",
7815 "application/vnd.uplanet.channel-wbxml", wbxml_handle);
7816 dissector_add_string("media_type",
7817 "application/vnd.uplanet.bearer-choice-wbxml", wbxml_handle);
7818 dissector_add_string("media_type",
7819 "application/vnd.phonecom.mmc-wbxml", wbxml_handle);
7820 dissector_add_string("media_type",
7821 "application/vnd.nokia.syncset+wbxml", wbxml_handle);
7823 /***** Content types that only have a textual representation *****/
7824 dissector_add_string("media_type",
7825 "application/x-wap-prov.browser-bookmarks", wbxml_handle);
7826 dissector_add_string("media_type",
7827 "application/x-wap-prov.browser-settings", wbxml_handle);
7828 /* Same as application/vnd.nokia.syncset+wbxml */
7829 dissector_add_string("media_type",
7830 "application/x-prov.syncset+wbxml", wbxml_handle);
7839 * indent-tabs-mode: tabs
7842 * ex: set shiftwidth=8 tabstop=8 noexpandtab
7843 * :indentSize=8:tabSize=8:noTabs=false: