Bug Summary

File:builds/wireshark/wireshark/epan/dissectors/packet-obex.c
Warning:line 1098, column 26
Null pointer passed to 1st parameter expecting 'nonnull'

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name packet-obex.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -fno-delete-null-pointer-checks -mframe-pointer=all -relaxed-aliasing -fmath-errno -ffp-contract=on -fno-rounding-math -ffloat16-excess-precision=fast -fbfloat16-excess-precision=fast -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/builds/wireshark/wireshark/build -fcoverage-compilation-dir=/builds/wireshark/wireshark/build -resource-dir /usr/lib/llvm-22/lib/clang/22 -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /builds/wireshark/wireshark/epan/dissectors -isystem /builds/wireshark/wireshark/build/epan/dissectors -isystem /usr/include/mit-krb5 -isystem /usr/include/libxml2 -isystem /builds/wireshark/wireshark/epan -D CARES_NO_DEPRECATED -D G_DISABLE_DEPRECATED -D G_DISABLE_SINGLE_INCLUDES -D WS_BUILD_DLL -D WS_DEBUG -D WS_DEBUG_UTF_8 -I /builds/wireshark/wireshark/build -I /builds/wireshark/wireshark -I /builds/wireshark/wireshark/include -D _GLIBCXX_ASSERTIONS -internal-isystem /usr/lib/llvm-22/lib/clang/22/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/16/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fmacro-prefix-map=/builds/wireshark/wireshark/= -fmacro-prefix-map=/builds/wireshark/wireshark/build/= -fmacro-prefix-map=../= -Wno-format-nonliteral -std=gnu17 -ferror-limit 19 -fvisibility=hidden -fwrapv -fwrapv-pointer -fstrict-flex-arrays=3 -stack-protector 2 -fstack-clash-protection -fcf-protection=full -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fexceptions -fcolor-diagnostics -analyzer-output=html -faddrsig -fdwarf2-cfi-asm -o /builds/wireshark/wireshark/sbout/2026-09-12-100348-3660-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-obex.c
1/* packet-obex.c
2 * Routines for OBEX dissection
3 *
4 * Copyright 2010, Allan M. Madsen
5 * Copyright 2013, Michal Labedzki for Tieto Corporation
6 *
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14#include "config.h"
15
16#include <epan/packet.h>
17#include <epan/prefs.h>
18#include <epan/reassemble.h>
19#include <epan/expert.h>
20#include <epan/decode_as.h>
21#include <epan/proto_data.h>
22#include "packet-bluetooth.h"
23#include "packet-btrfcomm.h"
24#include "packet-btl2cap.h"
25#include "packet-btsdp.h"
26#include <wsutil/array.h>
27
28/* Initialize the protocol and registered fields */
29static int proto_obex;
30static int proto_btavrcp;
31static int hf_opcode;
32static int hf_response_code;
33static int hf_final_flag;
34static int hf_length;
35static int hf_version;
36static int hf_flags;
37static int hf_constants;
38static int hf_max_pkt_len;
39static int hf_set_path_flags_0;
40static int hf_set_path_flags_1;
41static int hf_headers;
42static int hf_header;
43static int hf_hdr_id;
44static int hf_hdr_id_encoding;
45static int hf_hdr_id_meaning;
46static int hf_hdr_length;
47static int hf_hdr_val_unicode;
48static int hf_hdr_val_byte_seq;
49static int hf_hdr_val_byte;
50static int hf_hdr_val_long;
51static int hf_authentication_parameter;
52static int hf_authentication_parameter_data;
53static int hf_authentication_challenge_tag;
54static int hf_authentication_response_tag;
55static int hf_authentication_key;
56static int hf_authentication_result_key;
57static int hf_authentication_user_id;
58static int hf_authentication_length;
59static int hf_authentication_info_charset;
60static int hf_authentication_info;
61static int hf_authentication_option_reserved;
62static int hf_authentication_option_user_id;
63static int hf_authentication_option_read_only;
64static int hf_application_parameter;
65static int hf_application_parameter_id;
66static int hf_application_parameter_length;
67static int hf_application_parameter_data;
68static int hf_bpp_application_parameter_id;
69static int hf_bpp_application_parameter_data_offset;
70static int hf_bpp_application_parameter_data_count;
71static int hf_bpp_application_parameter_data_job_id;
72static int hf_bpp_application_parameter_data_file_size;
73static int hf_bip_application_parameter_id;
74static int hf_bip_application_parameter_data_number_of_returned_handles;
75static int hf_bip_application_parameter_data_list_start_offset;
76static int hf_bip_application_parameter_data_latest_captured_images;
77static int hf_bip_application_parameter_data_partial_file_length;
78static int hf_bip_application_parameter_data_partial_file_start_offset;
79static int hf_bip_application_parameter_data_total_file_size;
80static int hf_bip_application_parameter_data_end_flag;
81static int hf_bip_application_parameter_data_remote_display;
82static int hf_bip_application_parameter_data_service_id;
83static int hf_bip_application_parameter_data_store_flag;
84static int hf_pbap_application_parameter_id;
85static int hf_pbap_application_parameter_data_order;
86static int hf_pbap_application_parameter_data_search_value;
87static int hf_pbap_application_parameter_data_search_attribute;
88static int hf_pbap_application_parameter_data_max_list_count;
89static int hf_pbap_application_parameter_data_list_start_offset;
90static int hf_pbap_application_parameter_data_filter;
91static int hf_pbap_application_parameter_vcard_selector;
92static int hf_pbap_application_parameter_data_filter_version;
93static int hf_pbap_application_parameter_data_filter_fn;
94static int hf_pbap_application_parameter_data_filter_n;
95static int hf_pbap_application_parameter_data_filter_photo;
96static int hf_pbap_application_parameter_data_filter_birthday;
97static int hf_pbap_application_parameter_data_filter_adr;
98static int hf_pbap_application_parameter_data_filter_label;
99static int hf_pbap_application_parameter_data_filter_tel;
100static int hf_pbap_application_parameter_data_filter_email;
101static int hf_pbap_application_parameter_data_filter_mailer;
102static int hf_pbap_application_parameter_data_filter_time_zone;
103static int hf_pbap_application_parameter_data_filter_geographic_position;
104static int hf_pbap_application_parameter_data_filter_title;
105static int hf_pbap_application_parameter_data_filter_role;
106static int hf_pbap_application_parameter_data_filter_logo;
107static int hf_pbap_application_parameter_data_filter_agent;
108static int hf_pbap_application_parameter_data_filter_name_of_organization;
109static int hf_pbap_application_parameter_data_filter_comments;
110static int hf_pbap_application_parameter_data_filter_revision;
111static int hf_pbap_application_parameter_data_filter_pronunciation_of_name;
112static int hf_pbap_application_parameter_data_filter_url;
113static int hf_pbap_application_parameter_data_filter_uid;
114static int hf_pbap_application_parameter_data_filter_key;
115static int hf_pbap_application_parameter_data_filter_nickname;
116static int hf_pbap_application_parameter_data_filter_categories;
117static int hf_pbap_application_parameter_data_filter_product_id;
118static int hf_pbap_application_parameter_data_filter_class;
119static int hf_pbap_application_parameter_data_filter_sort_string;
120static int hf_pbap_application_parameter_data_filter_timestamp;
121static int hf_pbap_application_parameter_data_filter_reserved_29_31;
122static int hf_pbap_application_parameter_data_filter_reserved_32_38;
123static int hf_pbap_application_parameter_data_filter_proprietary_filter;
124static int hf_pbap_application_parameter_data_filter_reserved_for_proprietary_filter_usage;
125static int hf_pbap_application_parameter_data_format;
126static int hf_pbap_application_parameter_data_phonebook_size;
127static int hf_pbap_application_parameter_data_new_missed_calls;
128static int hf_pbap_application_parameter_data_primary_version_counter;
129static int hf_pbap_application_parameter_data_secondary_version_counter;
130static int hf_pbap_application_parameter_data_database_identifier;
131static int hf_pbap_application_parameter_data_vcard_selector_operator;
132static int hf_pbap_application_parameter_data_reset_new_missed_calls;
133static int hf_pbap_application_parameter_data_supported_features;
134static int hf_pbap_application_parameter_data_supported_features_reserved;
135static int hf_pbap_application_parameter_data_supported_features_download;
136static int hf_pbap_application_parameter_data_supported_features_browsing;
137static int hf_pbap_application_parameter_data_supported_features_database_identifier;
138static int hf_pbap_application_parameter_data_supported_features_folder_version_counters;
139static int hf_pbap_application_parameter_data_supported_features_vcard_selecting;
140static int hf_pbap_application_parameter_data_supported_features_enhanced_missed_calls;
141static int hf_pbap_application_parameter_data_supported_features_x_bt_uci_vcard_property;
142static int hf_pbap_application_parameter_data_supported_features_x_bt_uid_vcard_property;
143static int hf_pbap_application_parameter_data_supported_features_contact_referencing;
144static int hf_pbap_application_parameter_data_supported_features_default_contact_image_format;
145static int hf_map_application_parameter_id;
146static int hf_map_application_parameter_data_max_list_count;
147static int hf_map_application_parameter_data_start_offset;
148static int hf_map_application_parameter_data_filter_message_type_reserved;
149static int hf_map_application_parameter_data_filter_message_type_mms;
150static int hf_map_application_parameter_data_filter_message_type_email;
151static int hf_map_application_parameter_data_filter_message_type_sms_cdma;
152static int hf_map_application_parameter_data_filter_message_type_sms_gsm;
153static int hf_map_application_parameter_data_filter_period_begin;
154static int hf_map_application_parameter_data_filter_period_end;
155static int hf_map_application_parameter_data_filter_read_status_reserved_6;
156static int hf_map_application_parameter_data_filter_read_status_get_read;
157static int hf_map_application_parameter_data_filter_read_status_get_unread;
158static int hf_map_application_parameter_data_filter_recipient;
159static int hf_map_application_parameter_data_filter_originator;
160static int hf_map_application_parameter_data_filter_priority_reserved_6;
161static int hf_map_application_parameter_data_filter_priority_get_high;
162static int hf_map_application_parameter_data_filter_priority_non_high;
163static int hf_map_application_parameter_data_reserved_7;
164static int hf_map_application_parameter_data_attachment;
165static int hf_map_application_parameter_data_transparent;
166static int hf_map_application_parameter_data_retry;
167static int hf_map_application_parameter_data_new_message;
168static int hf_map_application_parameter_data_notification_status;
169static int hf_map_application_parameter_data_mas_instance_id;
170static int hf_map_application_parameter_data_parameter_mask_reserved;
171static int hf_map_application_parameter_data_parameter_mask_reply_to_addressing;
172static int hf_map_application_parameter_data_parameter_mask_protected;
173static int hf_map_application_parameter_data_parameter_mask_sent;
174static int hf_map_application_parameter_data_parameter_mask_read;
175static int hf_map_application_parameter_data_parameter_mask_priority;
176static int hf_map_application_parameter_data_parameter_mask_attachment_size;
177static int hf_map_application_parameter_data_parameter_mask_text;
178static int hf_map_application_parameter_data_parameter_mask_reception_status;
179static int hf_map_application_parameter_data_parameter_mask_size;
180static int hf_map_application_parameter_data_parameter_mask_type;
181static int hf_map_application_parameter_data_parameter_mask_recipient_addressing;
182static int hf_map_application_parameter_data_parameter_mask_recipient_name;
183static int hf_map_application_parameter_data_parameter_mask_sender_addressing;
184static int hf_map_application_parameter_data_parameter_mask_sender_name;
185static int hf_map_application_parameter_data_parameter_mask_datetime;
186static int hf_map_application_parameter_data_parameter_mask_subject;
187static int hf_map_application_parameter_data_folder_listing_size;
188static int hf_map_application_parameter_data_messages_listing_size;
189static int hf_map_application_parameter_data_subject_length;
190static int hf_map_application_parameter_data_charset;
191static int hf_map_application_parameter_data_fraction_request;
192static int hf_map_application_parameter_data_fraction_deliver;
193static int hf_map_application_parameter_data_status_indicator;
194static int hf_map_application_parameter_data_status_value;
195static int hf_map_application_parameter_data_mse_time;
196static int hf_gpp_application_parameter_id;
197static int hf_gpp_application_parameter_data_max_list_count;
198static int hf_gpp_application_parameter_data_list_start_offset;
199static int hf_gpp_application_parameter_data_reserved_7;
200static int hf_gpp_application_parameter_data_notification_status;
201static int hf_gpp_application_parameter_data_instance_id;
202static int hf_gpp_application_parameter_data_listing_size;
203static int hf_ctn_application_parameter_id;
204static int hf_ctn_application_parameter_data_acoustic_alarm_status;
205static int hf_ctn_application_parameter_data_attachment;
206static int hf_ctn_application_parameter_data_send;
207static int hf_ctn_application_parameter_data_filter_period_begin;
208static int hf_ctn_application_parameter_data_filter_period_end;
209static int hf_ctn_application_parameter_data_parameter_mask;
210static int hf_ctn_application_parameter_data_parameter_mask_reserved;
211static int hf_ctn_application_parameter_data_parameter_mask_recurrent;
212static int hf_ctn_application_parameter_data_parameter_mask_send_status;
213static int hf_ctn_application_parameter_data_parameter_mask_alarm_status;
214static int hf_ctn_application_parameter_data_parameter_mask_pstatus;
215static int hf_ctn_application_parameter_data_parameter_mask_priority;
216static int hf_ctn_application_parameter_data_parameter_mask_originator_address;
217static int hf_ctn_application_parameter_data_parameter_mask_originator_name;
218static int hf_ctn_application_parameter_data_parameter_mask_end_time;
219static int hf_ctn_application_parameter_data_parameter_mask_summary;
220static int hf_ctn_application_parameter_data_parameter_mask_attachment;
221static int hf_ctn_application_parameter_data_status_indicator;
222static int hf_ctn_application_parameter_data_status_value;
223static int hf_ctn_application_parameter_data_postpone_val;
224static int hf_ctn_application_parameter_data_email_uri;
225static int hf_ctn_application_parameter_data_cse_time;
226static int hf_ctn_application_parameter_data_recurrent;
227static int hf_ctn_application_parameter_data_attach_id;
228static int hf_ctn_application_parameter_data_last_update;
229static int hf_profile;
230static int hf_type;
231static int hf_object_class;
232static int hf_time_iso8601;
233static int hf_wan_uuid;
234static int hf_hdr_val_action;
235static int hf_hdr_val_single_response_mode;
236static int hf_hdr_val_single_response_mode_parameter;
237static int hf_session_parameter;
238static int hf_session_parameter_tag;
239static int hf_session_parameter_length;
240static int hf_session_parameter_data;
241static int hf_session_parameter_nonce;
242static int hf_session_parameter_session_id;
243static int hf_session_parameter_next_sequence_number;
244static int hf_session_parameter_timeout;
245static int hf_session_parameter_opcode;
246static int hf_sender_bd_addr;
247static int hf_count;
248static int hf_data_length;
249static int hf_connection_id;
250static int hf_name;
251static int hf_current_path;
252static int hf_request_in_frame;
253static int hf_response_in_frame;
254
255static int * const hfx_hdr_id[] = {
256 &hf_hdr_id_encoding,
257 &hf_hdr_id_meaning,
258 NULL((void*)0)
259};
260
261static int * const hfx_pbap_application_parameter_data_filter_1[] = {
262 &hf_pbap_application_parameter_data_filter_reserved_32_38,
263 &hf_pbap_application_parameter_data_filter_proprietary_filter,
264 &hf_pbap_application_parameter_data_filter_reserved_for_proprietary_filter_usage,
265 NULL((void*)0)
266};
267
268static int * const hfx_pbap_application_parameter_data_filter_0[] = {
269 &hf_pbap_application_parameter_data_filter_version,
270 &hf_pbap_application_parameter_data_filter_fn,
271 &hf_pbap_application_parameter_data_filter_n,
272 &hf_pbap_application_parameter_data_filter_photo,
273 &hf_pbap_application_parameter_data_filter_birthday,
274 &hf_pbap_application_parameter_data_filter_adr,
275 &hf_pbap_application_parameter_data_filter_label,
276 &hf_pbap_application_parameter_data_filter_tel,
277 &hf_pbap_application_parameter_data_filter_email,
278 &hf_pbap_application_parameter_data_filter_mailer,
279 &hf_pbap_application_parameter_data_filter_time_zone,
280 &hf_pbap_application_parameter_data_filter_geographic_position,
281 &hf_pbap_application_parameter_data_filter_title,
282 &hf_pbap_application_parameter_data_filter_role,
283 &hf_pbap_application_parameter_data_filter_logo,
284 &hf_pbap_application_parameter_data_filter_agent,
285 &hf_pbap_application_parameter_data_filter_name_of_organization,
286 &hf_pbap_application_parameter_data_filter_comments,
287 &hf_pbap_application_parameter_data_filter_revision,
288 &hf_pbap_application_parameter_data_filter_pronunciation_of_name,
289 &hf_pbap_application_parameter_data_filter_url,
290 &hf_pbap_application_parameter_data_filter_uid,
291 &hf_pbap_application_parameter_data_filter_key,
292 &hf_pbap_application_parameter_data_filter_nickname,
293 &hf_pbap_application_parameter_data_filter_categories,
294 &hf_pbap_application_parameter_data_filter_product_id,
295 &hf_pbap_application_parameter_data_filter_class,
296 &hf_pbap_application_parameter_data_filter_sort_string,
297 &hf_pbap_application_parameter_data_filter_timestamp,
298 &hf_pbap_application_parameter_data_filter_reserved_29_31,
299 NULL((void*)0)
300};
301
302static int * const hfx_pbap_application_parameter_data_supported_features[] = {
303 &hf_pbap_application_parameter_data_supported_features_reserved,
304 &hf_pbap_application_parameter_data_supported_features_default_contact_image_format,
305 &hf_pbap_application_parameter_data_supported_features_contact_referencing,
306 &hf_pbap_application_parameter_data_supported_features_x_bt_uid_vcard_property,
307 &hf_pbap_application_parameter_data_supported_features_x_bt_uci_vcard_property,
308 &hf_pbap_application_parameter_data_supported_features_enhanced_missed_calls,
309 &hf_pbap_application_parameter_data_supported_features_vcard_selecting,
310 &hf_pbap_application_parameter_data_supported_features_folder_version_counters,
311 &hf_pbap_application_parameter_data_supported_features_database_identifier,
312 &hf_pbap_application_parameter_data_supported_features_browsing,
313 &hf_pbap_application_parameter_data_supported_features_download,
314 NULL((void*)0)
315};
316
317static int * const hfx_ctn_application_parameter_data_parameter_mask[] = {
318 &hf_ctn_application_parameter_data_parameter_mask_reserved,
319 &hf_ctn_application_parameter_data_parameter_mask_recurrent,
320 &hf_ctn_application_parameter_data_parameter_mask_send_status,
321 &hf_ctn_application_parameter_data_parameter_mask_alarm_status,
322 &hf_ctn_application_parameter_data_parameter_mask_pstatus,
323 &hf_ctn_application_parameter_data_parameter_mask_priority,
324 &hf_ctn_application_parameter_data_parameter_mask_originator_address,
325 &hf_ctn_application_parameter_data_parameter_mask_originator_name,
326 &hf_ctn_application_parameter_data_parameter_mask_end_time,
327 &hf_ctn_application_parameter_data_parameter_mask_summary,
328 &hf_ctn_application_parameter_data_parameter_mask_attachment,
329 NULL((void*)0)
330};
331
332static expert_field ei_unexpected_data;
333static expert_field ei_application_parameter_length_bad;
334static expert_field ei_decoded_as_profile;
335
336static dissector_table_t obex_profile_table;
337static dissector_table_t media_type_dissector_table;
338
339
340/* ************************************************************************* */
341/* Header values for reassembly */
342/* ************************************************************************* */
343static int hf_obex_fragments;
344static int hf_obex_fragment;
345static int hf_obex_fragment_overlap;
346static int hf_obex_fragment_overlap_conflict;
347static int hf_obex_fragment_multiple_tails;
348static int hf_obex_fragment_too_long_fragment;
349static int hf_obex_fragment_error;
350static int hf_obex_fragment_count;
351static int hf_obex_reassembled_in;
352static int hf_obex_reassembled_length;
353
354static int ett_obex_fragment;
355static int ett_obex_fragments;
356
357static dissector_handle_t obex_handle;
358static dissector_handle_t raw_application_parameters_handle;
359static dissector_handle_t bt_bpp_application_parameters_handle;
360static dissector_handle_t bt_bip_application_parameters_handle;
361static dissector_handle_t bt_gpp_application_parameters_handle;
362static dissector_handle_t bt_ctn_application_parameters_handle;
363static dissector_handle_t bt_map_application_parameters_handle;
364static dissector_handle_t bt_pbap_application_parameters_handle;
365
366static reassembly_table obex_reassembly_table;
367
368static const fragment_items obex_frag_items = {
369 &ett_obex_fragment,
370 &ett_obex_fragments,
371 &hf_obex_fragments,
372 &hf_obex_fragment,
373 &hf_obex_fragment_overlap,
374 &hf_obex_fragment_overlap_conflict,
375 &hf_obex_fragment_multiple_tails,
376 &hf_obex_fragment_too_long_fragment,
377 &hf_obex_fragment_error,
378 &hf_obex_fragment_count,
379 &hf_obex_reassembled_in,
380 &hf_obex_reassembled_length,
381 /* Reassembled data field */
382 NULL((void*)0),
383 "fragments"
384};
385
386/* Initialize the subtree pointers */
387static int ett_obex;
388static int ett_obex_hdrs;
389static int ett_obex_hdr;
390static int ett_obex_hdr_id;
391static int ett_obex_filter;
392static int ett_obex_parameter;
393static int ett_obex_session_parameters;
394static int ett_obex_application_parameters;
395static int ett_obex_authentication_parameters;
396
397static wmem_tree_t *obex_path;
398static wmem_tree_t *obex_profile;
399static wmem_tree_t *obex_last_opcode;
400static wmem_tree_t *obex_fragment;
401
402static dissector_handle_t http_handle;
403static dissector_handle_t xml_handle;
404static dissector_handle_t data_handle;
405static dissector_handle_t data_text_lines_handle;
406
407static const char *path_unknown = "?";
408static const char *path_root = "/";
409
410typedef struct _obex_proto_data_t {
411 uint32_t interface_id;
412 uint32_t adapter_id;
413 uint32_t chandle;
414 uint32_t channel;
415} obex_proto_data_t;
416
417typedef struct _ext_value_string {
418 uint8_t value[16];
419 int length;
420 const char *strptr;
421} ext_value_string;
422
423typedef struct _obex_path_data_t {
424 uint32_t interface_id;
425 uint32_t adapter_id;
426 uint32_t chandle;
427 uint32_t channel;
428/* TODO: add OBEX ConnectionId */
429
430 const char *path;
431} obex_path_data_t;
432
433typedef struct _obex_profile_data_t {
434 uint32_t interface_id;
435 uint32_t adapter_id;
436 uint32_t chandle;
437 uint32_t channel;
438/* TODO: add OBEX ConnectionId */
439
440 int profile;
441} obex_profile_data_t;
442
443typedef struct _obex_last_opcode_data_t {
444 uint32_t interface_id;
445 uint32_t adapter_id;
446 uint32_t chandle;
447 uint32_t channel;
448/* TODO: add OBEX ConnectionId */
449 int code;
450
451 bool_Bool final_flag;
452
453 uint32_t request_in_frame;
454 uint32_t response_in_frame;
455
456 union {
457 struct {
458 const char *name;
459 bool_Bool go_up;
460 } set_data;
461 struct {
462 char *type;
463 char *name;
464 } get_put;
465 } data;
466} obex_last_opcode_data_t;
467
468typedef struct _obex_fragment_data_t {
469 uint32_t interface_id;
470 uint32_t adapter_id;
471 uint32_t chandle;
472 uint32_t channel;
473/* TODO: add OBEX ConnectionId */
474 uint32_t fragment_start;
475} obex_fragment_data_t;
476
477#define PROFILE_UNKNOWN0 0
478#define PROFILE_OPP1 1
479#define PROFILE_FTP2 2
480#define PROFILE_SYNCML3 3
481#define PROFILE_PBAP4 4
482#define PROFILE_MAP5 5
483#define PROFILE_BIP6 6
484#define PROFILE_BPP7 7
485#define PROFILE_SYNC8 8
486#define PROFILE_CTN9 9
487#define PROFILE_GPP10 10
488#define PROFILE_AVRCP11 11
489
490#define PROTO_DATA_MEDIA_TYPE0x00 0x00
491#define PROTO_DATA_OBEX_PROFILE0x01 0x01
492
493static const value_string profile_vals[] = {
494 { PROFILE_UNKNOWN0, "Unknown" },
495 { PROFILE_OPP1, "OPP" },
496 { PROFILE_FTP2, "FTP" },
497 { PROFILE_SYNCML3, "SyncML" },
498 { PROFILE_PBAP4, "PBAP" },
499 { PROFILE_MAP5, "MAP" },
500 { PROFILE_BIP6, "BIP" },
501 { PROFILE_BPP7, "BPP" },
502 { PROFILE_SYNC8, "SYNC" },
503 { PROFILE_CTN9, "CTN" },
504 { PROFILE_GPP10, "GPP" },
505 { PROFILE_AVRCP11, "AVRCP" },
506 { 0, NULL((void*)0) }
507};
508static value_string_ext(profile_vals_ext) = VALUE_STRING_EXT_INIT(profile_vals){ _try_val_to_str_ext_init, 0, (sizeof (profile_vals) / sizeof
((profile_vals)[0]))-1, profile_vals, "profile_vals", ((void
*)0) }
;
509
510
511static const ext_value_string target_vals[] = {
512 { { 0xF9, 0xEC, 0x7B, 0xC4, 0x95, 0x3C, 0x11, 0xD2, 0x98, 0x4E, 0x52, 0x54, 0x00, 0xDC, 0x9E, 0x09 }, 16, "Folder Browsing" },
513 { { 0x79, 0x61, 0x35, 0xf0, 0xf0, 0xc5, 0x11, 0xd8, 0x09, 0x66, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, "Phone Book Access Profile" },
514 { { 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x02, 0xEE, 0x00, 0x00, 0x02 }, 16, "SyncML" },
515 { { 0xE3, 0x3D, 0x95, 0x45, 0x83, 0x74, 0x4A, 0xD7, 0x9E, 0xC5, 0xC1, 0x6B, 0xE3, 0x1E, 0xDE, 0x8E }, 16, "Basic Imaging Profile - Push" },
516 { { 0x8E, 0xE9, 0xB3, 0xD0, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Pull" },
517 { { 0x92, 0x35, 0x33, 0x50, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Advanced Printing" },
518 { { 0x94, 0x01, 0x26, 0xC0, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Automativ Archive" },
519 { { 0x94, 0x7E, 0x74, 0x20, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Remote Camera" },
520 { { 0x94, 0xC7, 0xCD, 0x20, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Remote Display" },
521 { { 0x8E, 0x61, 0xF9, 0x5D, 0x1A, 0x79, 0x11, 0xD4, 0x8E, 0xA4, 0x00, 0x80, 0x5F, 0x9B, 0x98, 0x34 }, 16, "Basic Imaging Profile- Referenced Objects" },
522 { { 0x8E, 0x61, 0xF9, 0x5D, 0x1A, 0x79, 0x11, 0xD4, 0x8E, 0xA4, 0x00, 0x80, 0x5F, 0x9B, 0x98, 0x34 }, 16, "Basic Imaging Profile - Archived Objects" },
523 { { 0x71, 0x63, 0xDD, 0x54, 0x4A, 0x7E, 0x11, 0xE2, 0xB4, 0x7C, 0x00, 0x50, 0xC2, 0x49, 0x00, 0x48 }, 16, "Audio/Video Remote Control Profile - Cover Art" },
524 { { 0xbb, 0x58, 0x2b, 0x40, 0x42, 0x0c, 0x11, 0xdb, 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, "Message Access Profile - Message Access Service" },
525 { { 0xbb, 0x58, 0x2b, 0x41, 0x42, 0x0c, 0x11, 0xdb, 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, "Message Access Profile - Message Notification Service" },
526 { { 0x00, 0x00, 0x11, 0x18, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Direct Printing Service" },
527 { { 0x00, 0x00, 0x11, 0x19, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Reference Printing Service" },
528 { { 0x00, 0x00, 0x11, 0x20, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Direct Printing Referenced Objects Service" },
529 { { 0x00, 0x00, 0x11, 0x21, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Reflected UI" },
530 { { 0x00, 0x00, 0x11, 0x22, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Basic Printing" },
531 { { 0x00, 0x00, 0x11, 0x23, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Printing Status" },
532 { { "IRMC-SYNC" }, 9, "Synchronization Profile" },
533 { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0, NULL((void*)0) },
534};
535
536/* This table must map targets from "target_vals" to profile */
537static const int target_to_profile[] = {
538 PROFILE_FTP2,
539 PROFILE_PBAP4,
540 PROFILE_SYNCML3,
541 PROFILE_BIP6,
542 PROFILE_BIP6,
543 PROFILE_BIP6,
544 PROFILE_BIP6,
545 PROFILE_BIP6,
546 PROFILE_BIP6,
547 PROFILE_BIP6,
548 PROFILE_BIP6,
549 PROFILE_AVRCP11,
550 PROFILE_MAP5,
551 PROFILE_MAP5,
552 PROFILE_BPP7,
553 PROFILE_BPP7,
554 PROFILE_BPP7,
555 PROFILE_BPP7,
556 PROFILE_BPP7,
557 PROFILE_BPP7,
558 PROFILE_SYNC8
559};
560
561static const value_string version_vals[] = {
562 { 0x10, "1.0" },
563 { 0x11, "1.1" },
564 { 0x12, "1.2" },
565 { 0x13, "1.3" },
566 { 0x20, "2.0" },
567 { 0x21, "2.1" },
568 { 0, NULL((void*)0) }
569};
570
571static const value_string header_id_encoding_vals[] = {
572 { 0x00, "Null terminated Unicode text, length prefixed with 2 byte Unsigned Integer" },
573 { 0x01, "Byte sequence, length prefixed with 2 byte Unsigned Integer" },
574 { 0x02, "1 byte quantity" },
575 { 0x03, "4 byte quantity (network order)" },
576 { 0, NULL((void*)0) }
577};
578
579#define OBEX_CODE_VALS_CONNECT0x00 0x00
580#define OBEX_CODE_VALS_DISCONNECT0x01 0x01
581#define OBEX_CODE_VALS_PUT0x02 0x02
582#define OBEX_CODE_VALS_GET0x03 0x03
583#define OBEX_CODE_VALS_SET_PATH0x05 0x05
584#define OBEX_CODE_VALS_CONTINUE0x10 0x10
585#define OBEX_CODE_VALS_SUCCESS0x20 0x20
586#define OBEX_CODE_VALS_ABORT0x7F 0x7F
587#define OBEX_CODE_VALS_MASK0x7F 0x7F
588
589static const value_string code_vals[] = {
590 { 0x00, "Connect" },
591 { 0x01, "Disconnect" },
592 { 0x02, "Put" },
593 { 0x03, "Get"},
594 { 0x05, "Set Path" },
595 { 0x06, "Action" },
596 { 0x07, "Session" },
597 { 0x10, "Continue" },
598 { 0x20, "Success" },
599 { 0x21, "Created" },
600 { 0x22, "Accepted" },
601 { 0x23, "Non-Authoritative Information" },
602 { 0x24, "No Content" },
603 { 0x25, "Reset Content" },
604 { 0x26, "Partial Content" },
605 { 0x30, "Multiple Choices" },
606 { 0x31, "Moved Permanently" },
607 { 0x32, "Moved Temporarily" },
608 { 0x33, "See Other" },
609 { 0x34, "Not Modified" },
610 { 0x35, "Use Proxy" },
611 { 0x40, "Bad Request" },
612 { 0x41, "Unauthorised" },
613 { 0x42, "Payment Required" },
614 { 0x43, "Forbidden" },
615 { 0x44, "Not Found" },
616 { 0x45, "Method Not Allowed" },
617 { 0x46, "Not Acceptable" },
618 { 0x47, "Proxy Authentication Required" },
619 { 0x48, "Request Timeout" },
620 { 0x49, "Conflict" },
621 { 0x4a, "Gone" },
622 { 0x4b, "Length Required" },
623 { 0x4c, "Precondition Failed" },
624 { 0x4d, "Requested Entity Too Large" },
625 { 0x4e, "Requested URL Too Large" },
626 { 0x4f, "Unsupported Media Type" },
627 { 0x50, "Internal Server Error" },
628 { 0x51, "Not Implemented" },
629 { 0x52, "Bad Gateway" },
630 { 0x53, "Service Unavailable" },
631 { 0x54, "Gateway Timeout" },
632 { 0x55, "HTTP Version Not Supported" },
633 { 0x60, "Database Full" },
634 { 0x61, "Database Locked" },
635 { OBEX_CODE_VALS_ABORT0x7F, "Abort" },
636 { 0, NULL((void*)0) }
637};
638static value_string_ext(code_vals_ext) = VALUE_STRING_EXT_INIT(code_vals){ _try_val_to_str_ext_init, 0, (sizeof (code_vals) / sizeof (
(code_vals)[0]))-1, code_vals, "code_vals", ((void*)0) }
;
639
640static const value_string header_id_meaning_vals[] = {
641 { 0x00, "Count" },
642 { 0x01, "Name" },
643 { 0x02, "Type" },
644 { 0x03, "Length" },
645 { 0x04, "Time" },
646 { 0x05, "Description" },
647 { 0x06, "Target" },
648 { 0x07, "HTTP" },
649 { 0x08, "Body" },
650 { 0x09, "End Of Body" },
651 { 0x0A, "Who" },
652 { 0x0B, "Connection Id" },
653 { 0x0C, "Application Parameters" },
654 { 0x0D, "Authentication Challenge" },
655 { 0x0E, "Authentication Response" },
656 { 0x0F, "Creator" },
657 { 0x10, "WAN UUID" },
658 { 0x11, "Object Class" },
659 { 0x12, "Session Parameter" },
660 { 0x13, "Session Sequence Number" },
661 { 0x14, "Action" },
662 { 0x15, "Destination Name" },
663 { 0x16, "Permissions" },
664 { 0x17, "Single Response Mode" },
665 { 0x18, "Single Response Mode Parameter" },
666 { 0x30, "User Defined" },
667 { 0x31, "User Defined" },
668 { 0x32, "User Defined" },
669 { 0x33, "User Defined" },
670 { 0x34, "User Defined" },
671 { 0x35, "User Defined" },
672 { 0x36, "User Defined" },
673 { 0x37, "User Defined" },
674 { 0x38, "User Defined" },
675 { 0x39, "User Defined" },
676 { 0x3A, "User Defined" },
677 { 0x3B, "User Defined" },
678 { 0x3C, "User Defined" },
679 { 0x3D, "User Defined" },
680 { 0x3E, "User Defined" },
681 { 0x3F, "User Defined" },
682 { 0, NULL((void*)0) }
683};
684
685static const value_string header_id_vals[] = {
686/* 0x00 - 0x3F - Null terminated Unicode text, length prefixed with 2 byte Unsigned Integer */
687 { 0x01, "Name" },
688 { 0x05, "Description" },
689 { 0x15, "Destination Name" },
690 { 0x30, "User Defined" },
691 { 0x31, "User Defined" },
692 { 0x32, "User Defined" },
693 { 0x33, "User Defined" },
694 { 0x34, "User Defined" },
695 { 0x35, "User Defined" },
696 { 0x36, "User Defined" },
697 { 0x37, "User Defined" },
698 { 0x38, "User Defined" },
699 { 0x39, "User Defined" },
700 { 0x3a, "User Defined" },
701 { 0x3b, "User Defined" },
702 { 0x3c, "User Defined" },
703 { 0x3d, "User Defined" },
704 { 0x3e, "User Defined" },
705 { 0x3f, "User Defined" },
706/* 0x40 - 0x07F - Byte sequence, length prefixed with 2 byte Unsigned Integer */
707 { 0x42, "Type" },
708 { 0x44, "Time (ISO8601)" },
709 { 0x46, "Target" },
710 { 0x47, "HTTP" },
711 { 0x48, "Body" },
712 { 0x49, "End Of Body" },
713 { 0x4a, "Who" },
714 { 0x4c, "Application Parameters" },
715 { 0x4d, "Authentication Challenge" },
716 { 0x4e, "Authentication Response" },
717 { 0x50, "WAN UUID" },
718 { 0x51, "Object Class" },
719 { 0x52, "Session Parameter" },
720 { 0x70, "User Defined" },
721 { 0x71, "User Defined" },
722 { 0x72, "User Defined" },
723 { 0x73, "User Defined" },
724 { 0x74, "User Defined" },
725 { 0x75, "User Defined" },
726 { 0x76, "User Defined" },
727 { 0x77, "User Defined" },
728 { 0x78, "User Defined" },
729 { 0x79, "User Defined" },
730 { 0x7a, "User Defined" },
731 { 0x7b, "User Defined" },
732 { 0x7c, "User Defined" },
733 { 0x7d, "User Defined" },
734 { 0x7e, "User Defined" },
735 { 0x7f, "User Defined" },
736/* 0x80 - 0xBF - 1 byte quantity */
737 { 0x93, "Session Sequence Number" },
738 { 0x94, "Action" },
739 { 0x97, "Single Response Mode" },
740 { 0x98, "Single Response Mode Parameter" },
741 { 0xb0, "User Defined" },
742 { 0xb1, "User Defined" },
743 { 0xb2, "User Defined" },
744 { 0xb3, "User Defined" },
745 { 0xb4, "User Defined" },
746 { 0xb5, "User Defined" },
747 { 0xb6, "User Defined" },
748 { 0xb7, "User Defined" },
749 { 0xb8, "User Defined" },
750 { 0xb9, "User Defined" },
751 { 0xba, "User Defined" },
752 { 0xbb, "User Defined" },
753 { 0xbc, "User Defined" },
754 { 0xbd, "User Defined" },
755 { 0xbe, "User Defined" },
756 { 0xbf, "User Defined" },
757/* 0xC0 - 0xFF - 4 byte quantity (network order) */
758 { 0xc0, "Count" },
759 { 0xc3, "Length" },
760 { 0xc4, "Time (UNIX)" },
761 { 0xcb, "Connection Id" },
762 { 0xcf, "Creator" },
763 { 0xd6, "Permissions" },
764 { 0xf0, "User Defined" },
765 { 0xf1, "User Defined" },
766 { 0xf2, "User Defined" },
767 { 0xf3, "User Defined" },
768 { 0xf4, "User Defined" },
769 { 0xf5, "User Defined" },
770 { 0xf6, "User Defined" },
771 { 0xf7, "User Defined" },
772 { 0xf8, "User Defined" },
773 { 0xf9, "User Defined" },
774 { 0xfa, "User Defined" },
775 { 0xfb, "User Defined" },
776 { 0xfc, "User Defined" },
777 { 0xfd, "User Defined" },
778 { 0xfe, "User Defined" },
779 { 0xff, "User Defined" },
780 { 0, NULL((void*)0) }
781};
782static value_string_ext header_id_vals_ext = VALUE_STRING_EXT_INIT(header_id_vals){ _try_val_to_str_ext_init, 0, (sizeof (header_id_vals) / sizeof
((header_id_vals)[0]))-1, header_id_vals, "header_id_vals", (
(void*)0) }
;
783
784static const value_string map_application_parameters_vals[] = {
785 { 0x01, "Max List Count" },
786 { 0x02, "Start Offset" },
787 { 0x03, "Filter Message Type" },
788 { 0x04, "Filter Period Begin" },
789 { 0x05, "End Filter PeriodEnd" },
790 { 0x06, "Filter Read Status" },
791 { 0x07, "Filter Recipient" },
792 { 0x08, "Filter Originator" },
793 { 0x09, "Filter Priority" },
794 { 0x0A, "Attachment" },
795 { 0x0B, "Transparent" },
796 { 0x0C, "Retry" },
797 { 0x0D, "New Message" },
798 { 0x0E, "Notification Status" },
799 { 0x0F, "MAS Instance ID" },
800 { 0x10, "Parameter Mask" },
801 { 0x11, "Folder Listing Size" },
802 { 0x12, "Messages Listing Size" },
803 { 0x13, "Subject Length" },
804 { 0x14, "Charset" },
805 { 0x15, "Fraction Request" },
806 { 0x16, "Fraction Deliver" },
807 { 0x17, "Status Indicator" },
808 { 0x18, "Status Value" },
809 { 0x19, "MSE Time" },
810 { 0, NULL((void*)0) }
811};
812
813static const value_string pbap_application_parameters_vals[] = {
814 { 0x01, "Order" },
815 { 0x02, "Search Value" },
816 { 0x03, "Search Attribute" },
817 { 0x04, "Max List Count" },
818 { 0x05, "List Start Offset" },
819 { 0x06, "Filter" },
820 { 0x07, "Format" },
821 { 0x08, "Phonebook Size" },
822 { 0x09, "New Missed Calls" },
823 { 0x0A, "Primary Version Counter" },
824 { 0x0B, "Secondary Version Counter" },
825 { 0x0C, "vCard Selector" },
826 { 0x0D, "Database Identifier" },
827 { 0x0E, "vCard Selector Operator" },
828 { 0x0F, "Reset New Missed Calls" },
829 { 0x10, "PBAP Supported Features" },
830 { 0, NULL((void*)0) }
831};
832
833static const value_string bpp_application_parameters_vals[] = {
834 { 0x01, "Offset" },
835 { 0x02, "Count" },
836 { 0x03, "Job ID" },
837 { 0x04, "File Size" },
838 { 0, NULL((void*)0) }
839};
840
841static const value_string bip_application_parameters_vals[] = {
842 { 0x01, "Number of Returned Handles" },
843 { 0x02, "List Start Offset" },
844 { 0x03, "Latest Captures Images" },
845 { 0x04, "Partial File Length" },
846 { 0x05, "Partial File Start Offset" },
847 { 0x06, "Total File Size" },
848 { 0x07, "End Flag" },
849 { 0x08, "Remote Display" },
850 { 0x09, "Service ID" },
851 { 0x0A, "Store Flag" },
852 { 0, NULL((void*)0) }
853};
854
855static const value_string gpp_application_parameters_vals[] = {
856 { 0x41, "Max List Count" },
857 { 0x42, "List Start Offset" },
858 { 0x43, "Notification Status" },
859 { 0x44, "Instance ID" },
860 { 0x46, "Listing Size" },
861 { 0, NULL((void*)0) }
862};
863
864static const value_string ctn_application_parameters_vals[] = {
865 { 0x01, "Acoustic Alarm Status" },
866 { 0x02, "Attachment" },
867 { 0x03, "Send" },
868 { 0x04, "Filter Period Begin" },
869 { 0x05, "Filter Period End" },
870 { 0x06, "Parameter Mask" },
871 { 0x07, "Status Indicator" },
872 { 0x08, "Status Value" },
873 { 0x09, "Postpone Val" },
874 { 0x0A, "Email URI" },
875 { 0x0B, "CSE Time" },
876 { 0x0C, "Recurrent" },
877 { 0x0D, "Attach ID" },
878 { 0x0E, "Last Update" },
879 { 0x41, "Max List Count" },
880 { 0x42, "List Start Offset" },
881 { 0x43, "Notification Status" },
882 { 0x44, "Instance ID" },
883 { 0x46, "Listing Size" },
884 { 0, NULL((void*)0) }
885};
886
887static const value_string bip_remote_display_vals[] = {
888 { 0x01, "Next Image" },
889 { 0x02, "Previous Image" },
890 { 0x03, "Select Image" },
891 { 0x04, "Current Image" },
892 { 0, NULL((void*)0) }
893};
894
895static const value_string pbap_order_vals[] = {
896 { 0x00, "Indexed" },
897 { 0x01, "Alphanumeric" },
898 { 0x02, "Phonetic" },
899 { 0, NULL((void*)0) }
900};
901
902static const value_string pbap_format_vals[] = {
903 { 0x00, "2.1" },
904 { 0x01, "3.0" },
905 { 0, NULL((void*)0) }
906};
907
908static const value_string pbap_search_attribute_vals[] = {
909 { 0x00, "Name" },
910 { 0x01, "Number" },
911 { 0x02, "Sound" },
912 { 0, NULL((void*)0) }
913};
914
915static const value_string map_charset_vals[] = {
916 { 0x00, "Native" },
917 { 0x01, "UTF-8" },
918 { 0, NULL((void*)0) }
919};
920
921static const value_string map_fraction_request_vals[] = {
922 { 0x00, "First" },
923 { 0x01, "Next" },
924 { 0, NULL((void*)0) }
925};
926
927static const value_string map_fraction_deliver_vals[] = {
928 { 0x00, "More" },
929 { 0x01, "Last" },
930 { 0, NULL((void*)0) }
931};
932
933static const value_string map_status_indicator_vals[] = {
934 { 0x00, "Read Status" },
935 { 0x01, "Deleted Status" },
936 { 0, NULL((void*)0) }
937};
938
939static const value_string authentication_challenge_tag_vals[] = {
940 { 0x00, "Key" },
941 { 0x01, "Options" },
942 { 0x02, "Info" },
943 { 0, NULL((void*)0) }
944};
945
946static const value_string authentication_response_tag_vals[] = {
947 { 0x00, "Result Key" },
948 { 0x01, "User ID" },
949 { 0x02, "Key" },
950 { 0, NULL((void*)0) }
951};
952
953static const value_string info_charset_vals[] = {
954 { 0x00, "ASCII" },
955 { 0xFF, "Unicode" },
956 { 0, NULL((void*)0) }
957};
958
959static const value_string action_vals[] = {
960 { 0x00, "Copy" },
961 { 0x01, "Move" },
962 { 0x02, "Set Permission" },
963 { 0, NULL((void*)0) }
964};
965
966static const value_string single_response_mode_vals[] = {
967 { 0x00, "Disable" },
968 { 0x01, "Enable" },
969 { 0x02, "Indicate" },
970 { 0, NULL((void*)0) }
971};
972
973static const value_string single_response_mode_parameter_vals[] = {
974 { 0x00, "Next" },
975 { 0x01, "Wait" },
976 { 0x02, "Next and Wait" },
977 { 0, NULL((void*)0) }
978};
979
980static const value_string session_tag_vals[] = {
981 { 0x00, "Device Address" },
982 { 0x01, "Nonce" },
983 { 0x02, "Session ID" },
984 { 0x03, "Next Sequence Number" },
985 { 0x04, "Timeout" },
986 { 0x05, "Session Opcode" },
987 { 0, NULL((void*)0) }
988};
989
990static const value_string session_opcode_vals[] = {
991 { 0x00, "Create Session" },
992 { 0x01, "Close Session" },
993 { 0x02, "Suspend Session" },
994 { 0x03, "Resume Session" },
995 { 0x04, "Set Timeout" },
996 { 0, NULL((void*)0) }
997};
998
999static const value_string pbap_application_parameter_data_vcard_selector_operator_vals[] = {
1000 { 0x00, "Or" },
1001 { 0x01, "And" },
1002 { 0, NULL((void*)0) }
1003};
1004
1005static const value_string pbap_application_parameter_data_reset_new_missed_calls_vals[] = {
1006 { 0x01, "Reset" },
1007 { 0, NULL((void*)0) }
1008};
1009
1010static const value_string off_on_vals[] = {
1011 { 0x00, "Off" },
1012 { 0x01, "On" },
1013 { 0, NULL((void*)0) }
1014};
1015
1016static const value_string no_yes_vals[] = {
1017 { 0x00, "No" },
1018 { 0x01, "Yes" },
1019 { 0, NULL((void*)0) }
1020};
1021
1022static const value_string ctn_application_parameter_data_attachment_vals[] = {
1023 { 0x00, "On" },
1024 { 0x01, "Off" },
1025 { 0x02, "Selected" },
1026 { 0, NULL((void*)0) }
1027};
1028
1029static const value_string ctn_application_parameter_data_status_indicator_vals[] = {
1030 { 0x00, "pStatus" },
1031 { 0x01, "Alarm Status" },
1032 { 0x02, "Send Status" },
1033 { 0x03, "Deleted Status" },
1034 { 0, NULL((void*)0) }
1035};
1036
1037static const value_string ctn_application_parameter_data_status_value_vals[] = {
1038 { 0x00, "No" },
1039 { 0x01, "Yes" },
1040 { 0x02, "Postpone" },
1041 { 0x03, "Tentative" },
1042 { 0x04, "Needs-action" },
1043 { 0x05, "Accepted" },
1044 { 0x06, "Declined" },
1045 { 0x07, "Delegated" },
1046 { 0x08, "Completed" },
1047 { 0x09, "In-progress" },
1048 { 0, NULL((void*)0) }
1049};
1050
1051static value_string_ext map_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(map_application_parameters_vals){ _try_val_to_str_ext_init, 0, (sizeof (map_application_parameters_vals
) / sizeof ((map_application_parameters_vals)[0]))-1, map_application_parameters_vals
, "map_application_parameters_vals", ((void*)0) }
;
1052static value_string_ext pbap_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(pbap_application_parameters_vals){ _try_val_to_str_ext_init, 0, (sizeof (pbap_application_parameters_vals
) / sizeof ((pbap_application_parameters_vals)[0]))-1, pbap_application_parameters_vals
, "pbap_application_parameters_vals", ((void*)0) }
;
1053static value_string_ext bpp_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(bpp_application_parameters_vals){ _try_val_to_str_ext_init, 0, (sizeof (bpp_application_parameters_vals
) / sizeof ((bpp_application_parameters_vals)[0]))-1, bpp_application_parameters_vals
, "bpp_application_parameters_vals", ((void*)0) }
;
1054static value_string_ext bip_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(bip_application_parameters_vals){ _try_val_to_str_ext_init, 0, (sizeof (bip_application_parameters_vals
) / sizeof ((bip_application_parameters_vals)[0]))-1, bip_application_parameters_vals
, "bip_application_parameters_vals", ((void*)0) }
;
1055
1056void proto_register_obex(void);
1057void proto_reg_handoff_obex(void);
1058
1059static void
1060save_path(packet_info *pinfo, const char *current_path, const char *name,
1061 bool_Bool go_up, obex_proto_data_t *obex_proto_data)
1062{
1063
1064/* On Connect response sets "/"
1065 On SetPath sets what is needed
1066 */
1067 if (!pinfo->fd->visited
42.1
Field 'visited' is 0
) {
43
Taking true branch
1068 obex_path_data_t *obex_path_data;
1069 wmem_tree_key_t key[6];
1070 uint32_t frame_number;
1071 const char *path = path_unknown;
1072
1073 frame_number = pinfo->num;
1074
1075 key[0].length = 1;
1076 key[0].key = &obex_proto_data->interface_id;
1077 key[1].length = 1;
1078 key[1].key = &obex_proto_data->adapter_id;
1079 key[2].length = 1;
1080 key[2].key = &obex_proto_data->chandle;
1081 key[3].length = 1;
1082 key[3].key = &obex_proto_data->channel;
1083 key[4].length = 1;
1084 key[4].key = &frame_number;
1085 key[5].length = 0;
1086 key[5].key = NULL((void*)0);
1087
1088 obex_path_data = wmem_new(wmem_file_scope(), obex_path_data_t)((obex_path_data_t*)wmem_alloc((wmem_file_scope()), sizeof(obex_path_data_t
)))
;
1089 obex_path_data->interface_id = obex_proto_data->interface_id;
1090 obex_path_data->adapter_id = obex_proto_data->adapter_id;
1091 obex_path_data->chandle = obex_proto_data->chandle;
1092 obex_path_data->channel = obex_proto_data->channel;
1093
1094 if (go_up == true1) {
44
Assuming 'go_up' is equal to true
1095 if (current_path != path_unknown && current_path != path_root) {
45
Assuming 'current_path' is not equal to 'path_unknown'
46
Assuming 'current_path' is not equal to 'path_root'
47
Taking true branch
1096 char *i_path;
1097
1098 i_path = strrchr(current_path, '/');
48
Null pointer passed to 1st parameter expecting 'nonnull'
1099 if (!i_path) {
1100 current_path = path_unknown;
1101 } else {
1102 if (i_path == current_path)
1103 path = current_path = path_root;
1104 else
1105 path = current_path = wmem_strndup(wmem_epan_scope(), current_path, i_path - current_path);
1106 }
1107 }
1108 }
1109
1110 if (name && *name == '\0')
1111 path = path_root;
1112 else if (name && current_path == path_root)
1113 path = wmem_strdup_printf(wmem_file_scope(), "/%s", name);
1114 else if (name)
1115 path = wmem_strdup_printf(wmem_file_scope(), "%s/%s", current_path, name);
1116
1117 obex_path_data->path = path;
1118
1119 wmem_tree_insert32_array(obex_path, key, obex_path_data);
1120 }
1121}
1122
1123static void media_type_prompt(packet_info *pinfo, char* result)
1124{
1125 char *value_data;
1126
1127 value_data = (char *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE0x00);
1128 if (value_data)
1129 snprintf(result, MAX_DECODE_AS_PROMPT_LEN200, "Media Type %s as", (char *) value_data);
1130 else
1131 snprintf(result, MAX_DECODE_AS_PROMPT_LEN200, "Unknown Media Type");
1132}
1133
1134static void *media_type_value(packet_info *pinfo)
1135{
1136 char *value_data;
1137
1138 value_data = (char *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE0x00);
1139
1140 if (value_data)
1141 return (void *) value_data;
1142
1143 return NULL((void*)0);
1144}
1145
1146static void obex_profile_prompt(packet_info *pinfo, char* result)
1147{
1148 uint8_t *value_data;
1149
1150 value_data = (uint8_t *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE0x01);
1151 if (value_data)
1152 snprintf(result, MAX_DECODE_AS_PROMPT_LEN200, "OBEX Profile 0x%04x as", (unsigned) *value_data);
1153 else
1154 snprintf(result, MAX_DECODE_AS_PROMPT_LEN200, "Unknown OBEX Profile");
1155}
1156
1157static void *obex_profile_value(packet_info *pinfo)
1158{
1159 uint8_t *value_data;
1160
1161 value_data = (uint8_t *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE0x01);
1162
1163 if (value_data)
1164 return GUINT_TO_POINTER((unsigned long)*value_data)((gpointer) (gulong) ((unsigned long)*value_data));
1165
1166 return NULL((void*)0);
1167}
1168
1169static int
1170is_ascii_str(const uint8_t *str, int length)
1171{
1172 int i;
1173
1174 if ((length < 1) || (str[length-1] != '\0'))
1175 return 0;
1176
1177 for(i=0; i<length-1; i++) {
1178 if ((str[i] < 0x20) && (str[i] != 0x0a)) /* not strict ascii */
1179 break;
1180 }
1181
1182 if (i < (length-1))
1183 return 0;
1184
1185 return 1;
1186}
1187
1188static int
1189dissect_obex_application_parameter_raw(tvbuff_t *tvb, packet_info *pinfo _U___attribute__((unused)), proto_tree *tree, void *data _U___attribute__((unused)))
1190{
1191 proto_item *parameter_item;
1192 proto_tree *parameter_tree;
1193 uint8_t parameter_id;
1194 int offset = 0;
1195 int parameters_length;
1196 int parameter_length;
1197
1198 parameters_length = tvb_reported_length(tvb);
1199
1200 while (parameters_length > 0) {
1201 parameter_id = tvb_get_uint8(tvb, offset);
1202 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset,
1203 tvb_captured_length_remaining(tvb, offset), "Parameter: 0x%02x", parameter_id);
1204 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1205
1206 proto_tree_add_item(parameter_tree, hf_application_parameter_id, tvb, offset,
1207 1, ENC_BIG_ENDIAN0x00000000);
1208 offset += 1;
1209
1210 proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset,
1211 1, ENC_BIG_ENDIAN0x00000000);
1212 parameter_length = tvb_get_uint8(tvb, offset);
1213 proto_item_set_len(parameter_item, parameter_length + 2);
1214 offset += 1;
1215
1216 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset,
1217 parameter_length, ENC_NA0x00000000);
1218
1219 parameters_length -= 2 + parameter_length;
1220 offset += parameter_length;
1221 }
1222
1223 return offset;
1224}
1225
1226static int
1227dissect_obex_application_parameter_bt_bpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1228{
1229 proto_item *item;
1230 proto_item *parameter_item;
1231 proto_tree *parameter_tree;
1232 uint8_t parameter_id;
1233 int offset = 0;
1234 int parameters_length;
1235 int parameter_length;
1236
1237 parameters_length = tvb_reported_length(tvb);
1238
1239 while (parameters_length > 0) {
1240 parameter_id = tvb_get_uint8(tvb, offset);
1241 parameter_length = tvb_get_uint8(tvb, offset + 1);
1242
1243 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
1244 "Parameter: %s", val_to_str_const(parameter_id,
1245 bpp_application_parameters_vals, "Unknown"));
1246 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1247
1248 proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1249 offset += 1;
1250
1251 item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1252 offset += 1;
1253
1254 if (parameter_length != 4) {
1255 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1256 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1257 "According to the specification this parameter length should be 4, but there is %i", parameter_length);
1258 } else switch (parameter_id) {
1259 case 0x01:
1260 proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_offset, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
1261 break;
1262 case 0x02:
1263 proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_count, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
1264 break;
1265 case 0x03:
1266 proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_job_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
1267 break;
1268 case 0x04:
1269 proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_file_size, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
1270 break;
1271 default:
1272 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1273 }
1274
1275 parameters_length -= 2 + parameter_length;
1276 offset += parameter_length;
1277 }
1278
1279 return offset;
1280}
1281
1282static int
1283dissect_obex_application_parameter_bt_bip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1284{
1285 proto_item *item;
1286 proto_item *parameter_item;
1287 proto_tree *parameter_tree;
1288 uint8_t parameter_id;
1289 int offset = 0;
1290 int parameters_length;
1291 int parameter_length;
1292 static const int required_length_map[] = {0, 2, 2, 1, 4, 4, 4, 1, 1, 16, 1};
1293
1294 parameters_length = tvb_reported_length(tvb);
1295
1296 while (parameters_length > 0) {
1297 parameter_id = tvb_get_uint8(tvb, offset);
1298 parameter_length = tvb_get_uint8(tvb, offset + 1);
1299
1300 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
1301 "Parameter: %s", val_to_str_const(parameter_id,
1302 bip_application_parameters_vals, "Unknown"));
1303 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1304
1305 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1306 offset += 1;
1307
1308 item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1309 offset += 1;
1310
1311 if (parameter_id < array_length(required_length_map)(sizeof (required_length_map) / sizeof (required_length_map)[
0])
&&
1312 required_length_map[parameter_id] != parameter_length) {
1313 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1314 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1315 "According to the specification this parameter length should be %i, but there is %i",
1316 required_length_map[parameter_id], parameter_length);
1317 } else switch (parameter_id) {
1318 case 0x01:
1319 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_number_of_returned_handles, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1320 break;
1321 case 0x02:
1322 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_list_start_offset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1323 break;
1324 case 0x03:
1325 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_latest_captured_images, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1326 break;
1327 case 0x04:
1328 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_partial_file_length, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1329 break;
1330 case 0x05:
1331 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_partial_file_start_offset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1332 break;
1333 case 0x06:
1334 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_total_file_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1335 break;
1336 case 0x07:
1337 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_end_flag, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1338 break;
1339 case 0x08:
1340 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_remote_display, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1341 break;
1342 case 0x09:
1343 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_service_id, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1344 break;
1345 case 0x0A:
1346 proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_store_flag, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1347 break;
1348 default:
1349 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1350 }
1351
1352 parameters_length -= 2 + parameter_length;
1353 offset += parameter_length;
1354 }
1355
1356 return offset;
1357}
1358
1359static int
1360dissect_obex_application_parameter_bt_pbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1361{
1362 proto_item *item;
1363 proto_item *parameter_item;
1364 proto_tree *parameter_tree;
1365 uint8_t parameter_id;
1366 int offset = 0;
1367 int parameters_length;
1368 int parameter_length;
1369 static const int required_length_map[] = {0, 1, -1, 1, 2, 2, 8, 1, 2, 1, 16, 16, 8, 16, 1, 1};
1370
1371 parameters_length = tvb_reported_length(tvb);
1372
1373 while (parameters_length > 0) {
1374 parameter_id = tvb_get_uint8(tvb, offset);
1375 parameter_length = tvb_get_uint8(tvb, offset + 1);
1376
1377 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
1378 "Parameter: %s", val_to_str_const(parameter_id,
1379 pbap_application_parameters_vals, "Unknown"));
1380 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1381
1382 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1383 offset += 1;
1384
1385 item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1386 offset += 1;
1387
1388 if (parameter_id < array_length(required_length_map)(sizeof (required_length_map) / sizeof (required_length_map)[
0])
&&
1389 required_length_map[parameter_id] != -1 &&
1390 required_length_map[parameter_id] != parameter_length) {
1391 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1392 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1393 "According to the specification this parameter length should be %i, but there is %i",
1394 required_length_map[parameter_id], parameter_length);
1395 } else switch (parameter_id) {
1396 case 0x01: /* Order */
1397 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_order, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1398 break;
1399 case 0x02: /* Search Value */
1400 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_search_value, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1401 break;
1402 case 0x03: /* Search Attribute */
1403 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_search_attribute, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1404 break;
1405 case 0x04: /* Max List Count */
1406 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_max_list_count, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1407 break;
1408 case 0x05: /* List Start Offset */
1409 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_list_start_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1410 break;
1411 case 0x06: /* Filter */
1412 proto_tree_add_bitmask(parameter_tree, tvb, offset + 0, hf_pbap_application_parameter_data_filter, ett_obex_filter, hfx_pbap_application_parameter_data_filter_1, ENC_BIG_ENDIAN0x00000000);
1413 proto_tree_add_bitmask(parameter_tree, tvb, offset + 4, hf_pbap_application_parameter_data_filter, ett_obex_filter, hfx_pbap_application_parameter_data_filter_0, ENC_BIG_ENDIAN0x00000000);
1414 break;
1415 case 0x07: /* Format */
1416 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_format, tvb, offset, 1, ENC_NA0x00000000);
1417 break;
1418 case 0x08: /* Phonebook Size */
1419 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_phonebook_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1420 break;
1421 case 0x09: /* New Missed Calls */
1422 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_new_missed_calls, tvb, offset, 1, ENC_NA0x00000000);
1423 break;
1424 case 0x0A: /* Primary Version Counter */
1425 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_primary_version_counter, tvb, offset, 16, ENC_NA0x00000000);
1426 break;
1427 case 0x0B: /* Secondary Version Counter */
1428 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_secondary_version_counter, tvb, offset, 16, ENC_NA0x00000000);
1429 break;
1430 case 0x0C: /* vCard Selector */
1431 proto_tree_add_bitmask(parameter_tree, tvb, offset + 0, hf_pbap_application_parameter_vcard_selector, ett_obex_filter, hfx_pbap_application_parameter_data_filter_1, ENC_BIG_ENDIAN0x00000000);
1432 proto_tree_add_bitmask(parameter_tree, tvb, offset + 4, hf_pbap_application_parameter_vcard_selector, ett_obex_filter, hfx_pbap_application_parameter_data_filter_0, ENC_BIG_ENDIAN0x00000000);
1433 break;
1434 case 0x0D: /* Database Identifier */
1435 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_database_identifier, tvb, offset, 16, ENC_NA0x00000000);
1436 break;
1437 case 0x0E: /* vCard Selector Operator */
1438 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_vcard_selector_operator, tvb, offset, 1, ENC_NA0x00000000);
1439 break;
1440 case 0x0F: /* Reset New Missed Calls */
1441 proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_reset_new_missed_calls, tvb, offset, 1, ENC_NA0x00000000);
1442 break;
1443 case 0x10: /* PBAP Supported Features */
1444 proto_tree_add_bitmask(parameter_tree, tvb, offset, hf_pbap_application_parameter_data_supported_features, ett_obex_parameter, hfx_pbap_application_parameter_data_supported_features, ENC_BIG_ENDIAN0x00000000);
1445 break;
1446 default:
1447 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1448 }
1449
1450 parameters_length -= 2 + parameter_length;
1451 offset += parameter_length;
1452 }
1453
1454 return offset;
1455}
1456
1457static int
1458dissect_obex_application_parameter_bt_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1459{
1460 proto_item *item;
1461 proto_item *parameter_item;
1462 proto_tree *parameter_tree;
1463 uint8_t parameter_id;
1464 int offset = 0;
1465 int parameters_length;
1466 int parameter_length;
1467 static const int required_length_map[] = {0, 2, 2, 1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 2, 1, 1, 1, 1, 1, 1, -1};
1468
1469 parameters_length = tvb_reported_length(tvb);
1470
1471 while (parameters_length > 0) {
1472 parameter_id = tvb_get_uint8(tvb, offset);
1473 parameter_length = tvb_get_uint8(tvb, offset + 1);
1474
1475 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
1476 "Parameter: %s", val_to_str_const(parameter_id,
1477 map_application_parameters_vals, "Unknown"));
1478 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1479
1480 proto_tree_add_item(parameter_tree, hf_map_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1481 offset += 1;
1482
1483 item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1484 offset += 1;
1485
1486 if (parameter_id < array_length(required_length_map)(sizeof (required_length_map) / sizeof (required_length_map)[
0])
&&
1487 required_length_map[parameter_id] != -1 &&
1488 required_length_map[parameter_id] != parameter_length) {
1489 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1490 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1491 "According to the specification this parameter length should be %i, but there is %i",
1492 required_length_map[parameter_id], parameter_length);
1493 } else switch (parameter_id) {
1494 case 0x01:
1495 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_max_list_count, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1496 break;
1497 case 0x02:
1498 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_start_offset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1499 break;
1500 case 0x03:
1501 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_reserved, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1502 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_mms, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1503 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_email, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1504 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_sms_cdma, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1505 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_sms_gsm, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1506 break;
1507 case 0x04:
1508 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_period_begin, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1509 break;
1510 case 0x05:
1511 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_period_end, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1512 break;
1513 case 0x06:
1514 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_read_status_reserved_6, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1515 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_read_status_get_read, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1516 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_read_status_get_unread, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1517 break;
1518 case 0x07:
1519 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_recipient, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1520 break;
1521 case 0x08:
1522 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_originator, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1523 break;
1524 case 0x09:
1525 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_priority_reserved_6, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1526 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_priority_get_high, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1527 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_priority_non_high, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1528 break;
1529 case 0x0A:
1530 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1531 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_attachment, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1532 break;
1533 case 0x0B:
1534 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1535 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_transparent, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1536 break;
1537 case 0x0C:
1538 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1539 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_retry, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1540 break;
1541 case 0x0D:
1542 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1543 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_new_message, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1544 break;
1545 case 0x0E:
1546 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1547 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_notification_status, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1548 break;
1549 case 0x0F:
1550 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_mas_instance_id, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1551 break;
1552 case 0x10:
1553 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_reserved, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1554 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_reply_to_addressing, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1555 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_protected, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1556 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_sent, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1557 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_read, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1558 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_priority, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1559 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_attachment_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1560 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_text, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1561 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_reception_status, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1562 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1563 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_type, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1564 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_recipient_addressing, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1565 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_recipient_name, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1566 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_sender_addressing, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1567 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_sender_name, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1568 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_datetime, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1569 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_subject, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1570
1571 break;
1572 case 0x11:
1573 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_folder_listing_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1574 break;
1575 case 0x12:
1576 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_messages_listing_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1577 break;
1578 case 0x13:
1579 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_subject_length, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1580 break;
1581 case 0x14:
1582 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1583 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_charset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1584 break;
1585 case 0x15:
1586 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1587 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_fraction_request, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1588 break;
1589 case 0x16:
1590 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1591 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_fraction_deliver, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1592 break;
1593 case 0x17:
1594 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1595 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_status_indicator, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1596 break;
1597 case 0x18:
1598 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1599 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_status_value, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN0x00000000);
1600 break;
1601 case 0x19:
1602 proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_mse_time, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1603 break;
1604 default:
1605 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1606 }
1607
1608 parameters_length -= 2 + parameter_length;
1609 offset += parameter_length;
1610 }
1611
1612 return offset;
1613}
1614
1615static int
1616dissect_obex_application_parameter_bt_gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1617{
1618 proto_item *item;
1619 proto_item *parameter_item;
1620 proto_tree *parameter_tree;
1621 uint8_t parameter_id;
1622 int offset = 0;
1623 int parameters_length;
1624 int parameter_length;
1625 static const int required_length_map[] = {2, 2, 1, 1, 0, 2};
1626
1627 parameters_length = tvb_reported_length(tvb);
1628
1629 while (parameters_length > 0) {
1630 parameter_id = tvb_get_uint8(tvb, offset);
1631 parameter_length = tvb_get_uint8(tvb, offset + 1);
1632
1633 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
1634 "Parameter: %s", val_to_str_const(parameter_id,
1635 gpp_application_parameters_vals, "Unknown"));
1636 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1637
1638 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1639 offset += 1;
1640
1641 item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1642 offset += 1;
1643
1644 if (parameter_id >= 0x41 && (uint8_t)(parameter_id - 0x41) < array_length(required_length_map)(sizeof (required_length_map) / sizeof (required_length_map)[
0])
&&
1645 required_length_map[parameter_id - 0x41] != -1 &&
1646 required_length_map[parameter_id - 0x41] != parameter_length) {
1647 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1648 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1649 "According to the specification this parameter length should be %i, but there is %i",
1650 required_length_map[parameter_id - 0x41], parameter_length);
1651 } else switch (parameter_id) {
1652 case 0x41: /* Max List Count */
1653 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_max_list_count, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1654 break;
1655 case 0x42: /* List Start Offset */
1656 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_list_start_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1657 break;
1658 case 0x43: /* Notification Status */
1659 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_reserved_7, tvb, offset, 1, ENC_NA0x00000000);
1660 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_notification_status, tvb, offset, 1, ENC_NA0x00000000);
1661 break;
1662 case 0x44: /* Instance ID */
1663 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_instance_id, tvb, offset, 1, ENC_NA0x00000000);
1664 break;
1665 case 0x46: /* Listing Size */
1666 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_listing_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1667 break;
1668 default:
1669 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1670 }
1671
1672 parameters_length -= 2 + parameter_length;
1673 offset += parameter_length;
1674 }
1675
1676 return offset;
1677}
1678
1679static int
1680dissect_obex_application_parameter_bt_ctn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U___attribute__((unused)))
1681{
1682 proto_item *item;
1683 proto_item *parameter_item;
1684 proto_tree *parameter_tree;
1685 uint8_t parameter_id;
1686 int offset = 0;
1687 int parameters_length;
1688 int parameter_length;
1689 static const int required_length_map[] = {0, 1, 1, 1, -1, -1, 4, 1, 1, 4, -1, -1, 1, 1, -1};
1690 static const int required_length_map_gpp[] = {2, 2, 1, 1, -1, 2};
1691
1692 parameters_length = tvb_reported_length(tvb);
1693
1694 while (parameters_length > 0) {
1695 parameter_id = tvb_get_uint8(tvb, offset);
1696 parameter_length = tvb_get_uint8(tvb, offset + 1);
1697
1698 parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
1699 "Parameter: %s", val_to_str_const(parameter_id,
1700 ctn_application_parameters_vals, "Unknown"));
1701 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
1702
1703 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1704 offset += 1;
1705
1706 item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1707 offset += 1;
1708
1709 if ((parameter_id < 0x41) && (parameter_id < array_length(required_length_map)(sizeof (required_length_map) / sizeof (required_length_map)[
0])
) &&
1710 required_length_map[parameter_id] != -1 &&
1711 required_length_map[parameter_id] != parameter_length) {
1712
1713 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1714 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1715 "According to the specification this parameter length should be %i, but there is %i",
1716 required_length_map[parameter_id], parameter_length);
1717 } else if ((parameter_id >= 0x41) && ((uint8_t)(parameter_id - 0x41) < array_length(required_length_map_gpp)(sizeof (required_length_map_gpp) / sizeof (required_length_map_gpp
)[0])
) &&
1718 required_length_map[parameter_id - 0x41] != -1 &&
1719 required_length_map[parameter_id - 0x41] != parameter_length) {
1720
1721 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1722 expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
1723 "According to the specification this parameter length should be %i, but there is %i",
1724 required_length_map_gpp[parameter_id - 0x41], parameter_length);
1725 } else switch (parameter_id) {
1726 case 0x41: /* Max List Count */
1727 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_max_list_count, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1728 break;
1729 case 0x42: /* List Start Offset */
1730 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_list_start_offset, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1731 break;
1732 case 0x43: /* Notification Status */
1733 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_reserved_7, tvb, offset, 1, ENC_NA0x00000000);
1734 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_notification_status, tvb, offset, 1, ENC_NA0x00000000);
1735 break;
1736 case 0x44: /* Instance ID */
1737 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_instance_id, tvb, offset, 1, ENC_NA0x00000000);
1738 break;
1739 case 0x46: /* Listing Size */
1740 proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_listing_size, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1741 break;
1742 case 0x01: /* Acoustic Alarm Status */
1743 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_acoustic_alarm_status, tvb, offset, 1, ENC_NA0x00000000);
1744 break;
1745 case 0x02: /* Attachment */
1746 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_attachment, tvb, offset, 1, ENC_NA0x00000000);
1747 break;
1748 case 0x03: /* Send */
1749 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_send, tvb, offset, 1, ENC_NA0x00000000);
1750 break;
1751 case 0x04: /* Filter Period Begin */
1752 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_filter_period_begin, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1753 break;
1754 case 0x05: /* Filter Period End */
1755 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_filter_period_end, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1756 break;
1757 case 0x06: /* Parameter Mask */
1758 proto_tree_add_bitmask(parameter_tree, tvb, offset, hf_ctn_application_parameter_data_parameter_mask, ett_obex_filter, hfx_ctn_application_parameter_data_parameter_mask, ENC_BIG_ENDIAN0x00000000);
1759 break;
1760 case 0x07: /* Status Indicator */
1761 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_status_indicator, tvb, offset, 1, ENC_NA0x00000000);
1762 break;
1763 case 0x08: /* Status Value */
1764 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_status_value, tvb, offset, 1, ENC_NA0x00000000);
1765 break;
1766 case 0x09: /* Postpone Val */
1767 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_postpone_val, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
1768 break;
1769 case 0x0A: /* Email URI */
1770 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_email_uri, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1771 break;
1772 case 0x0B: /* CSE Time */
1773 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_cse_time, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1774 break;
1775 case 0x0C: /* Recurrent */
1776 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_recurrent, tvb, offset, 1, ENC_NA0x00000000);
1777 break;
1778 case 0x0D: /* Attach ID */
1779 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_attach_id, tvb, offset, 1, ENC_NA0x00000000);
1780 break;
1781 case 0x0E: /* Last Update */
1782 proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_last_update, tvb, offset, parameter_length, ENC_ASCII0x00000000);
1783 break;
1784 default:
1785 proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA0x00000000);
1786 }
1787
1788 parameters_length -= 2 + parameter_length;
1789 offset += parameter_length;
1790 }
1791
1792 return offset;
1793}
1794
1795static int
1796dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
1797 int profile, obex_last_opcode_data_t *obex_last_opcode_data,
1798 obex_proto_data_t *obex_proto_data)
1799{
1800 proto_tree *hdrs_tree = NULL((void*)0);
1801 proto_tree *hdr_tree = NULL((void*)0);
1802 proto_item *hdr = NULL((void*)0);
1803 proto_item *handle_item;
1804 tvbuff_t *next_tvb;
1805 int new_offset;
1806 int item_length = 0;
1807 int value_length = 0;
1808 uint8_t hdr_id, i;
1809 uint32_t value;
1810 uint32_t frame_number;
1811 uint8_t tag;
1812 char *str = NULL((void*)0);
1813
1814 if (tvb_reported_length_remaining(tvb, offset) > 0) {
1815 proto_item *hdrs;
1816 hdrs = proto_tree_add_item(tree, hf_headers, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA0x00000000);
1817 hdrs_tree = proto_item_add_subtree(hdrs, ett_obex_hdrs);
1818 }
1819 else {
1820 return offset;
1821 }
1822
1823 while (tvb_reported_length_remaining(tvb, offset) > 0) {
1824 hdr_id = tvb_get_uint8(tvb, offset);
1825
1826 switch(0xC0 & hdr_id)
1827 {
1828 case 0x00: /* null terminated unicode */
1829 item_length = tvb_get_ntohs(tvb, offset + 1);
1830 value_length = item_length - 3;
1831 break;
1832 case 0x40: /* byte sequence */
1833 item_length = tvb_get_ntohs(tvb, offset + 1);
1834 value_length = item_length - 3;
1835 break;
1836 case 0x80: /* 1 byte */
1837 item_length = 1 + 1;
1838 value_length = 1;
1839 break;
1840 case 0xc0: /* 4 bytes */
1841 item_length = 1 + 4;
1842 value_length = 4;
1843 break;
1844 }
1845
1846 hdr = proto_tree_add_none_format(hdrs_tree, hf_header, tvb, offset, item_length, "%s",
1847 val_to_str_ext_const(hdr_id, &header_id_vals_ext, "Unknown"));
1848 hdr_tree = proto_item_add_subtree(hdr, ett_obex_hdr);
1849
1850 proto_tree_add_bitmask_with_flags(hdr_tree, tvb, offset, hf_hdr_id, ett_obex_hdr_id, hfx_hdr_id, ENC_NA0x00000000, BMT_NO_APPEND0x01);
1851
1852 offset++;
1853
1854 switch(0xC0 & hdr_id)
1855 {
1856 case 0x00: /* null terminated unicode */
1857 proto_tree_add_item(hdr_tree, hf_hdr_length, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1858 offset += 2;
1859
1860 switch (hdr_id) {
1861 case 0x01: /* Name */
1862 proto_tree_add_item(hdr_tree, hf_name, tvb, offset, value_length, ENC_UCS_20x00000006 | ENC_BIG_ENDIAN0x00000000);
1863 if (!pinfo->fd->visited && obex_last_opcode_data) {
1864 if (obex_last_opcode_data->code == OBEX_CODE_VALS_SET_PATH0x05)
1865 obex_last_opcode_data->data.set_data.name = (char*)tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_UCS_20x00000006 | ENC_BIG_ENDIAN0x00000000);
1866 else if (obex_last_opcode_data->code == OBEX_CODE_VALS_GET0x03 || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT0x02)
1867 obex_last_opcode_data->data.get_put.name = (char*)tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_UCS_20x00000006 | ENC_BIG_ENDIAN0x00000000);
1868 }
1869 break;
1870 default:
1871 proto_tree_add_item(hdr_tree, hf_hdr_val_unicode, tvb, offset, value_length, ENC_UCS_20x00000006 | ENC_BIG_ENDIAN0x00000000);
1872 }
1873 str = (char*)tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_UCS_20x00000006 | ENC_BIG_ENDIAN0x00000000);
1874 proto_item_append_text(hdr_tree, ": \"%s\"", str);
1875
1876 col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", str);
1877 offset += value_length;
1878
1879 break;
1880 case 0x40: /* byte sequence */
1881 proto_tree_add_item(hdr_tree, hf_hdr_length, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
1882 offset += 2;
1883
1884 switch (hdr_id) {
1885 case 0x4c: /* Application Parameters */
1886 next_tvb = tvb_new_subset_length(tvb, offset, value_length);
1887 if (!(new_offset = dissector_try_uint_with_data(obex_profile_table, profile, next_tvb, pinfo, hdr_tree, true1, NULL((void*)0)))) {
1888 new_offset = call_dissector(raw_application_parameters_handle, next_tvb, pinfo, hdr_tree);
1889 }
1890 offset += new_offset;
1891
1892 break;
1893 case 0x4d: /* Authentication Challenge */
1894 while (value_length) {
1895 uint8_t parameter_id;
1896 uint8_t sub_parameter_length;
1897 proto_item *parameter_item;
1898 proto_tree *parameter_tree;
1899
1900 parameter_id = tvb_get_uint8(tvb, offset);
1901 sub_parameter_length = tvb_get_uint8(tvb, offset + 1);
1902
1903 parameter_item = proto_tree_add_none_format(hdr_tree, hf_authentication_parameter, tvb, offset,
1904 2 + sub_parameter_length, "Tag: %s", val_to_str_const(parameter_id,
1905 authentication_challenge_tag_vals, "Unknown"));
1906 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_authentication_parameters);
1907
1908 proto_tree_add_item_ret_uint8(parameter_tree, hf_authentication_challenge_tag, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tag);
1909 offset += 1;
1910
1911 proto_tree_add_item(parameter_tree, hf_authentication_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1912 offset += 1;
1913
1914 switch (tag) {
1915 case 0x00:
1916 proto_tree_add_item(parameter_tree, hf_authentication_key, tvb, offset, 16, ENC_NA0x00000000);
1917 offset += 16;
1918 break;
1919 case 0x01:
1920 proto_tree_add_item(parameter_tree, hf_authentication_option_reserved, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1921 proto_tree_add_item(parameter_tree, hf_authentication_option_read_only, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1922 proto_tree_add_item(parameter_tree, hf_authentication_option_user_id, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1923 offset += 1;
1924 break;
1925 case 0x02:
1926 proto_tree_add_item(parameter_tree, hf_authentication_info_charset, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1927 offset += 1;
1928 proto_tree_add_item(parameter_tree, hf_authentication_info, tvb, offset, sub_parameter_length - 1, ENC_ASCII0x00000000);
1929 offset += sub_parameter_length - 1;
1930 break;
1931 default:
1932 proto_tree_add_item(parameter_tree, hf_authentication_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
1933 offset += sub_parameter_length;
1934 }
1935
1936 value_length -= 2 + sub_parameter_length;
1937 }
1938 break;
1939 case 0x4e: /* Authentication Response */
1940 while (value_length) {
1941 uint8_t parameter_id;
1942 uint8_t sub_parameter_length;
1943 proto_item *parameter_item;
1944 proto_tree *parameter_tree;
1945
1946 parameter_id = tvb_get_uint8(tvb, offset);
1947 sub_parameter_length = tvb_get_uint8(tvb, offset + 1);
1948
1949 parameter_item = proto_tree_add_none_format(hdr_tree, hf_authentication_parameter, tvb, offset,
1950 2 + sub_parameter_length, "Tag: %s", val_to_str_const(parameter_id,
1951 authentication_response_tag_vals, "Unknown"));
1952 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_authentication_parameters);
1953
1954 proto_tree_add_item_ret_uint8(parameter_tree, hf_authentication_response_tag, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tag);
1955 offset += 1;
1956
1957 proto_tree_add_item(parameter_tree, hf_authentication_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
1958 sub_parameter_length = tvb_get_uint8(tvb, offset);
1959 offset += 1;
1960
1961 switch (tag) {
1962 case 0x00:
1963 proto_tree_add_item(parameter_tree, hf_authentication_result_key, tvb, offset, 16, ENC_NA0x00000000);
1964 offset += 16;
1965 break;
1966 case 0x01:
1967 proto_tree_add_item(parameter_tree, hf_authentication_user_id, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
1968 offset += sub_parameter_length;
1969 break;
1970 case 0x02:
1971 proto_tree_add_item(parameter_tree, hf_authentication_key, tvb, offset, 16, ENC_NA0x00000000);
1972 offset += 16;
1973 break;
1974 default:
1975 proto_tree_add_item(parameter_tree, hf_authentication_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
1976 offset += sub_parameter_length;
1977 break;
1978 }
1979
1980
1981 value_length -= 2 + sub_parameter_length;
1982 }
1983 break;
1984 case 0x42: /* Type */
1985 proto_tree_add_item(hdr_tree, hf_type, tvb, offset, value_length, ENC_ASCII0x00000000);
1986 proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_ASCII0x00000000));
1987 if (!pinfo->fd->visited && obex_last_opcode_data && (obex_last_opcode_data->code == OBEX_CODE_VALS_GET0x03 || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT0x02)) {
1988 obex_last_opcode_data->data.get_put.type = (char*)tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_ASCII0x00000000 | ENC_NA0x00000000);
1989 }
1990 if (p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE0x00) == NULL((void*)0)) {
1991 uint8_t *value_data;
1992
1993 value_data = tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_ASCII0x00000000 | ENC_NA0x00000000);
1994
1995 p_add_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE0x00, value_data);
1996 }
1997 offset += value_length;
1998
1999 break;
2000 case 0x44: /* Time (ISO8601) */
2001 {
2002 const uint8_t* time_str;
2003 proto_tree_add_item_ret_string(hdr_tree, hf_time_iso8601, tvb, offset, value_length, ENC_ASCII0x00000000 | ENC_NA0x00000000, pinfo->pool, &time_str);
2004 proto_item_append_text(hdr_tree, ": \"%s\"", time_str);
2005
2006 offset += value_length;
2007 }
2008 break;
2009 case 0x48: /* Body */
2010 case 0x49: /* End Of Body */
2011 proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA0x00000000);
2012 next_tvb = tvb_new_subset_length(tvb, offset, value_length);
2013
2014 if (value_length > 0 && obex_last_opcode_data &&
2015 (obex_last_opcode_data->code == OBEX_CODE_VALS_GET0x03 || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT0x02) &&
2016 p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE0x00) == NULL((void*)0)) {
2017 char *value_data;
2018
2019 value_data = obex_last_opcode_data->data.get_put.type;
2020
2021 p_add_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE0x00, value_data);
2022 }
2023 if (value_length > 0 && obex_last_opcode_data &&
2024 (obex_last_opcode_data->code == OBEX_CODE_VALS_GET0x03 || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT0x02) &&
2025 obex_last_opcode_data->data.get_put.type &&
2026 dissector_try_string_with_data(media_type_dissector_table, obex_last_opcode_data->data.get_put.type, next_tvb, pinfo, tree, true1, NULL((void*)0)) > 0) {
2027 offset += value_length;
2028 } else {
2029 if (!tvb_strneql(tvb, offset, "<?xml", 5))
2030 {
2031 call_dissector(xml_handle, next_tvb, pinfo, tree);
2032 } else if (is_ascii_str(tvb_get_ptr(tvb, offset, value_length), value_length)) {
2033 proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_ASCII0x00000000));
2034 col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset, value_length, ENC_ASCII0x00000000));
2035 }
2036 offset += value_length;
2037 }
2038
2039 break;
2040 case 0x46: /* Target */
2041 case 0x4a: /* Who */
2042 handle_item = proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA0x00000000);
2043
2044 if (value_length == 16) for (i = 0; target_vals[i].strptr != NULL((void*)0); i++) {
2045 if (tvb_memeql(tvb, offset, target_vals[i].value, target_vals[i].length) == 0) {
2046 proto_item_append_text(handle_item, ": %s", target_vals[i].strptr);
2047 proto_item_append_text(hdr_tree, ": %s", target_vals[i].strptr);
2048
2049 col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", target_vals[i].strptr);
2050 if (!pinfo->fd->visited) {
2051 obex_profile_data_t *obex_profile_data;
2052
2053 wmem_tree_key_t key[6];
2054 frame_number = pinfo->num;
2055
2056 key[0].length = 1;
2057 key[0].key = &obex_proto_data->interface_id;
2058 key[1].length = 1;
2059 key[1].key = &obex_proto_data->adapter_id;
2060 key[2].length = 1;
2061 key[2].key = &obex_proto_data->chandle;
2062 key[3].length = 1;
2063 key[3].key = &obex_proto_data->channel;
2064 key[4].length = 1;
2065 key[4].key = &frame_number;
2066 key[5].length = 0;
2067 key[5].key = NULL((void*)0);
2068
2069 obex_profile_data = wmem_new(wmem_file_scope(), obex_profile_data_t)((obex_profile_data_t*)wmem_alloc((wmem_file_scope()), sizeof
(obex_profile_data_t)))
;
2070 obex_profile_data->interface_id = obex_proto_data->interface_id;
2071 obex_profile_data->adapter_id = obex_proto_data->adapter_id;
2072 obex_profile_data->chandle = obex_proto_data->chandle;
2073 obex_profile_data->channel = obex_proto_data->channel;
2074 obex_profile_data->profile = target_to_profile[i];
2075
2076 wmem_tree_insert32_array(obex_profile, key, obex_profile_data);
2077 }
2078 }
2079 }
2080 offset += value_length;
2081
2082 break;
2083 case 0x47: /* HTTP */ {
2084 next_tvb = tvb_new_subset_remaining(tvb, offset);
2085
2086 call_dissector(http_handle, next_tvb, pinfo, hdr_tree);
2087
2088 }
2089 break;
2090 case 0x50: /* WAN UUID */
2091 if (value_length == 2) {
2092 proto_tree_add_item(hdr_tree, hf_wan_uuid, tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2093 offset += 2;
2094 } else {
2095 proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA0x00000000);
2096 offset += value_length;
2097 }
2098
2099 break;
2100 case 0x51: /* Object Class */
2101 {
2102 const uint8_t* obj_str;
2103 proto_tree_add_item_ret_string(hdr_tree, hf_object_class, tvb, offset, value_length, ENC_ASCII0x00000000 | ENC_NA0x00000000, pinfo->pool, &obj_str);
2104 proto_item_append_text(hdr_tree, ": \"%s\"", obj_str);
2105
2106 offset += value_length;
2107 }
2108 break;
2109 case 0x52: /* Session Parameter */
2110 while (value_length) {
2111 uint8_t parameter_id;
2112 uint8_t sub_parameter_length;
2113 proto_item *parameter_item;
2114 proto_tree *parameter_tree;
2115
2116 parameter_id = tvb_get_uint8(tvb, offset);
2117 sub_parameter_length = tvb_get_uint8(tvb, offset + 1);
2118
2119 parameter_item = proto_tree_add_none_format(hdr_tree, hf_session_parameter, tvb, offset,
2120 2 + sub_parameter_length, "Tag: %s", val_to_str_const(parameter_id,
2121 session_tag_vals, "Unknown"));
2122 parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_session_parameters);
2123
2124 proto_tree_add_item_ret_uint8(parameter_tree, hf_session_parameter_tag, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &tag);
2125 offset += 1;
2126
2127 proto_tree_add_item_ret_uint8(parameter_tree, hf_session_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN0x00000000, &sub_parameter_length);
2128 offset += 1;
2129
2130 switch (tag) {
2131 case 0x00: /* Device Address */
2132 if (sub_parameter_length == 6) {
2133 offset = dissect_bd_addr(hf_sender_bd_addr, pinfo, parameter_tree, tvb, offset, false0, obex_proto_data->interface_id, obex_proto_data->adapter_id, NULL((void*)0));
2134 } else {
2135 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2136
2137 offset += sub_parameter_length;
2138 }
2139
2140 break;
2141 case 0x01: /* Nonce */
2142 if (sub_parameter_length >= 4 && sub_parameter_length <= 16) {
2143 proto_tree_add_item(parameter_tree, hf_session_parameter_nonce, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2144
2145 offset += sub_parameter_length;
2146 } else {
2147 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2148
2149 offset += sub_parameter_length;
2150 }
2151
2152 break;
2153 case 0x02: /* Session ID */
2154 if (sub_parameter_length == 16) {
2155 proto_tree_add_item(parameter_tree, hf_session_parameter_session_id, tvb, offset, 16, ENC_NA0x00000000);
2156
2157 offset += 16;
2158 } else {
2159 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2160
2161 offset += sub_parameter_length;
2162 }
2163
2164 break;
2165 case 0x03: /* Next Sequence Number */
2166 if (sub_parameter_length == 1) {
2167 proto_tree_add_item(parameter_tree, hf_session_parameter_next_sequence_number, tvb, offset, 1, ENC_NA0x00000000);
2168
2169 offset += 1;
2170 } else {
2171 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2172
2173 offset += sub_parameter_length;
2174 }
2175
2176 break;
2177 case 0x04: /* Timeout */
2178 if (sub_parameter_length == 4) {
2179 proto_tree_add_item(parameter_tree, hf_session_parameter_timeout, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2180
2181 offset += 4;
2182 } else {
2183 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2184
2185 offset += sub_parameter_length;
2186 }
2187
2188 break;
2189 case 0x05: /* Session Opcode */
2190 if (sub_parameter_length == 1) {
2191 proto_tree_add_item(parameter_tree, hf_session_parameter_opcode, tvb, offset, 1, ENC_NA0x00000000);
2192
2193 offset += 1;
2194 } else {
2195 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2196
2197 offset += sub_parameter_length;
2198 }
2199
2200 break;
2201 default:
2202 proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA0x00000000);
2203 offset += sub_parameter_length;
2204 break;
2205 }
2206
2207
2208 value_length -= 2 + sub_parameter_length;
2209 }
2210 break;
2211 default:
2212 proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA0x00000000);
2213 offset += value_length;
2214 }
2215
2216 break;
2217 case 0x80: /* 1 byte */
2218 value = tvb_get_uint8(tvb, offset);
2219
2220 switch (hdr_id) {
2221 case 0x94: /* Action */
2222 proto_tree_add_item(hdr_tree, hf_hdr_val_action, tvb, offset, 1, ENC_NA0x00000000);
2223 proto_item_append_text(hdr_tree, ": %s", val_to_str_const(value, action_vals, "Unknown"));
2224
2225 break;
2226 case 0x97: /* Single Response Mode */
2227 proto_tree_add_item(hdr_tree, hf_hdr_val_single_response_mode, tvb, offset, 1, ENC_NA0x00000000);
2228 proto_item_append_text(hdr_tree, ": %s", val_to_str_const(value, single_response_mode_vals, "Unknown"));
2229
2230 break;
2231 case 0x98: /* Single Response Mode Parameter */
2232 proto_tree_add_item(hdr_tree, hf_hdr_val_single_response_mode_parameter, tvb, offset, 1, ENC_NA0x00000000);
2233 proto_item_append_text(hdr_tree, ": %s", val_to_str_const(value, single_response_mode_parameter_vals, "Unknown"));
2234
2235 break;
2236 case 0x93: /* Session Sequence Number */
2237 default:
2238 proto_tree_add_item(hdr_tree, hf_hdr_val_byte, tvb, offset, 1, ENC_NA0x00000000);
2239 proto_item_append_text(hdr_tree, ": %i", value);
2240 }
2241
2242 offset += 1;
2243
2244 break;
2245 case 0xC0: /* 4 bytes */
2246 switch (hdr_id) {
2247 case 0xC0: /* Count */
2248 proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
2249 proto_tree_add_item(hdr_tree, hf_count, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2250
2251 break;
2252 case 0xC3: /* Length */
2253 proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
2254 proto_tree_add_item(hdr_tree, hf_data_length, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2255
2256 break;
2257 case 0xCB: /* Connection Id */
2258 proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
2259 proto_tree_add_item(hdr_tree, hf_connection_id, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2260
2261 break;
2262 case 0xC4: /* Time */
2263 case 0xCF: /* Creator */
2264 case 0xD6: /* Permissions */
2265 default:
2266 proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
2267 proto_tree_add_item(hdr_tree, hf_hdr_val_long, tvb, offset, 4, ENC_BIG_ENDIAN0x00000000);
2268 }
2269
2270 offset += 4;
2271
2272 break;
2273 default:
2274 break;
2275 }
2276 }
2277
2278 return offset;
2279}
2280
2281static int
2282dissect_obex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
2283{
2284 proto_item *main_item;
2285 proto_tree *main_tree;
2286 proto_item *sub_item;
2287 fragment_head *frag_msg = NULL((void*)0);
2288 fragment_item *frag = NULL((void*)0);
2289 bool_Bool save_fragmented;
2290 bool_Bool complete;
2291 tvbuff_t* new_tvb = NULL((void*)0);
2292 tvbuff_t* next_tvb = NULL((void*)0);
2293 int offset = 0;
2294 int profile = PROFILE_UNKNOWN0;
2295 const char *path = path_unknown;
1
'path' initialized here
2296 obex_profile_data_t *obex_profile_data;
2297 wmem_tree_key_t key[6];
2298 uint32_t frame_number;
2299 obex_last_opcode_data_t *obex_last_opcode_data;
2300 obex_path_data_t *obex_path_data;
2301 obex_fragment_data_t *obex_fragment_data;
2302 uint32_t length;
2303 uint8_t *profile_data;
2304 uint32_t fragment_id = 0;
2305 dissector_handle_t current_handle;
2306 dissector_handle_t default_handle;
2307 int previous_proto;
2308 obex_proto_data_t obex_proto_data;
2309
2310 previous_proto = (GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_frame_prev(wmem_list_tail(pinfo->layers))))((gint) (glong) (wmem_list_frame_data(wmem_list_frame_prev(wmem_list_tail
(pinfo->layers)))))
);
2311 if (previous_proto
1.1
'previous_proto' is not equal to 'proto_btl2cap'
== proto_btl2cap || previous_proto
1.2
'previous_proto' is not equal to 'proto_btavrcp'
== proto_btavrcp) {
2
Taking false branch
2312 btl2cap_data_t *l2cap_data;
2313
2314 l2cap_data = (btl2cap_data_t *) data;
2315
2316 obex_proto_data.interface_id = l2cap_data->interface_id;
2317 obex_proto_data.adapter_id = l2cap_data->adapter_id;
2318 obex_proto_data.chandle = l2cap_data->chandle;
2319 obex_proto_data.channel = l2cap_data->local_cid;
2320 } else if (previous_proto
2.1
'previous_proto' is not equal to 'proto_btrfcomm'
== proto_btrfcomm) {
3
Taking false branch
2321 btrfcomm_data_t *rfcomm_data;
2322
2323 rfcomm_data = (btrfcomm_data_t *) data;
2324
2325 obex_proto_data.interface_id = rfcomm_data->interface_id;
2326 obex_proto_data.adapter_id = rfcomm_data->adapter_id;
2327 obex_proto_data.chandle = rfcomm_data->chandle;
2328 obex_proto_data.channel = rfcomm_data->dlci >> 1;
2329 } else {
2330 obex_proto_data.interface_id = HCI_INTERFACE_DEFAULT0;
2331 obex_proto_data.adapter_id = HCI_ADAPTER_DEFAULT0;
2332 obex_proto_data.chandle = 0;
2333 obex_proto_data.channel = 0;
2334 }
2335
2336 col_set_str(pinfo->cinfo, COL_PROTOCOL, "OBEX");
2337
2338 main_item = proto_tree_add_item(tree, proto_obex, tvb, 0, tvb_captured_length(tvb), ENC_NA0x00000000);
2339 main_tree = proto_item_add_subtree(main_item, ett_obex);
2340
2341 save_fragmented = pinfo->fragmented;
2342
2343 frame_number = pinfo->num;
2344
2345 key[0].length = 1;
2346 key[0].key = &obex_proto_data.interface_id;
2347 key[1].length = 1;
2348 key[1].key = &obex_proto_data.adapter_id;
2349 key[2].length = 1;
2350 key[2].key = &obex_proto_data.chandle;
2351 key[3].length = 1;
2352 key[3].key = &obex_proto_data.channel;
2353 key[4].length = 1;
2354 key[4].key = &frame_number;
2355 key[5].length = 0;
2356 key[5].key = NULL((void*)0);
2357
2358 profile_data = (uint8_t *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE0x01);
2359 if (profile_data == NULL((void*)0)) {
4
Assuming 'profile_data' is not equal to NULL
5
Taking false branch
2360 obex_profile_data = (obex_profile_data_t *)wmem_tree_lookup32_array_le(obex_profile, key);
2361 if (obex_profile_data && obex_profile_data->interface_id == obex_proto_data.interface_id &&
2362 obex_profile_data->adapter_id == obex_proto_data.adapter_id &&
2363 obex_profile_data->chandle == obex_proto_data.chandle &&
2364 obex_profile_data->channel == obex_proto_data.channel) {
2365 profile = obex_profile_data->profile;
2366 }
2367
2368 profile_data = wmem_new(wmem_file_scope(), uint8_t)((uint8_t*)wmem_alloc((wmem_file_scope()), sizeof(uint8_t)));
2369 *profile_data = profile;
2370
2371 p_add_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE0x01, profile_data);
2372 }
2373
2374 obex_path_data = (obex_path_data_t *)wmem_tree_lookup32_array_le(obex_path, key);
2375 if (obex_path_data && obex_path_data->interface_id == obex_proto_data.interface_id &&
6
Assuming 'obex_path_data' is null
2376 obex_path_data->adapter_id == obex_proto_data.adapter_id &&
2377 obex_path_data->chandle == obex_proto_data.chandle &&
2378 obex_path_data->channel == obex_proto_data.channel) {
2379 path = obex_path_data->path;
2380 }
2381
2382 sub_item = proto_tree_add_uint(main_tree, hf_profile, tvb, 0, 0, profile);
2383 proto_item_set_generated(sub_item);
2384
2385 if (path) {
7
Assuming 'path' is null
8
Taking false branch
2386 sub_item = proto_tree_add_string(main_tree, hf_current_path, tvb, 0, 0, path);
2387 proto_item_set_generated(sub_item);
2388 }
2389
2390 current_handle = dissector_get_uint_handle(obex_profile_table, profile);
2391 default_handle = dissector_get_default_uint_handle("obex.profile", profile);
2392 if (current_handle != default_handle) {
9
Assuming 'current_handle' is equal to 'default_handle'
10
Taking false branch
2393 expert_add_info_format(pinfo, main_item, &ei_decoded_as_profile, "Decoded As %s", dissector_handle_get_protocol_long_name(current_handle));
2394 }
2395
2396 complete = false0;
2397
2398 if (tvb_captured_length(tvb) == tvb_reported_length(tvb)) {
11
Assuming the condition is true
12
Taking true branch
2399 obex_fragment_data = (obex_fragment_data_t *)wmem_tree_lookup32_array_le(obex_fragment, key);
2400 if (obex_fragment_data && obex_fragment_data->interface_id == obex_proto_data.interface_id &&
13
Assuming 'obex_fragment_data' is null
2401 obex_fragment_data->adapter_id == obex_proto_data.adapter_id &&
2402 obex_fragment_data->chandle == obex_proto_data.chandle &&
2403 obex_fragment_data->channel == obex_proto_data.channel &&
2404 obex_fragment_data->fragment_start <= frame_number) {
2405 fragment_id = obex_fragment_data->fragment_start;
2406 }
2407
2408 frag_msg = fragment_get_reassembled_id(&obex_reassembly_table, pinfo, fragment_id);
2409 if (frag_msg && pinfo->num != frag_msg->reassembled_in) {
14
Assuming 'frag_msg' is null
2410 /* reassembled but not last */
2411
2412 new_tvb = process_reassembled_data(tvb, 0, pinfo,
2413 "Reassembled Obex packet", frag_msg, &obex_frag_items, NULL((void*)0), main_tree);
2414 } else if (frag_msg
14.1
'frag_msg' is null
&& pinfo->num == frag_msg->reassembled_in) {
2415 /* reassembled and last, so dissect reassembled packet here */
2416
2417 new_tvb = process_reassembled_data(tvb, 0, pinfo,
2418 "Reassembled Obex packet", frag_msg, &obex_frag_items, NULL((void*)0), main_tree);
2419 } else {
2420 frag_msg = fragment_get(&obex_reassembly_table, pinfo, fragment_id, NULL((void*)0));
2421
2422 if (frag_msg) {
15
Assuming 'frag_msg' is null
16
Taking false branch
2423 /* not the first fragment */
2424
2425 /* packet stream is guaranteed to be sequence of fragments, one by one,
2426 so find last fragment for its offset and length */
2427 for (frag = frag_msg->next; frag->next; frag = frag->next) {}
2428
2429 frag_msg = fragment_add_check(&obex_reassembly_table,
2430 tvb, 0, pinfo, fragment_id, NULL((void*)0),
2431 frag->offset + frag->len, tvb_reported_length(tvb),
2432 ((frag->offset + frag->len + tvb_reported_length(tvb)) <
2433 fragment_get_tot_len(&obex_reassembly_table, pinfo, fragment_id, NULL((void*)0))) ? true1 : false0);
2434
2435 new_tvb = process_reassembled_data(tvb, 0, pinfo,
2436 "Reassembled Obex packet", frag_msg, &obex_frag_items, NULL((void*)0), main_tree);
2437
2438 pinfo->fragmented = true1;
2439 } else {
2440 if (tvb_reported_length(tvb) < 3) {
17
Assuming the condition is false
2441 /* Packet length is in the second and the third bye of packet, anything shorter than 3 is bad */
2442 col_add_fstr(pinfo->cinfo, COL_INFO, "%s OBEX packet too short",
2443 (pinfo->p2p_dir==P2P_DIR_SENT0) ? "Sent" : "Rcvd");
2444 call_dissector(data_handle, tvb, pinfo, main_tree);
2445 return tvb_reported_length(tvb);
2446 } else if (tvb_reported_length(tvb) >= 3 && tvb_reported_length(tvb) < tvb_get_ntohs(tvb, offset+1)) {
18
Assuming the condition is false
2447 /* first fragment in a sequence */
2448 frame_number = pinfo->num;
2449
2450 key[0].length = 1;
2451 key[0].key = &obex_proto_data.interface_id;
2452 key[1].length = 1;
2453 key[1].key = &obex_proto_data.adapter_id;
2454 key[2].length = 1;
2455 key[2].key = &obex_proto_data.chandle;
2456 key[3].length = 1;
2457 key[3].key = &obex_proto_data.channel;
2458 key[4].length = 1;
2459 key[4].key = &frame_number;
2460 key[5].length = 0;
2461 key[5].key = NULL((void*)0);
2462
2463 obex_fragment_data = wmem_new(wmem_file_scope(), obex_fragment_data_t)((obex_fragment_data_t*)wmem_alloc((wmem_file_scope()), sizeof
(obex_fragment_data_t)))
;
2464 obex_fragment_data->interface_id = obex_proto_data.interface_id;
2465 obex_fragment_data->adapter_id = obex_proto_data.adapter_id;
2466 obex_fragment_data->chandle = obex_proto_data.chandle;
2467 obex_fragment_data->channel = obex_proto_data.channel;
2468 obex_fragment_data->fragment_start = frame_number;
2469
2470 wmem_tree_insert32_array(obex_fragment, key, obex_fragment_data);
2471
2472 fragment_id = obex_fragment_data->fragment_start;
2473 frag_msg = fragment_add_check(&obex_reassembly_table,
2474 tvb, 0, pinfo, fragment_id, NULL((void*)0),
2475 0, tvb_reported_length(tvb), true1);
2476
2477 fragment_set_tot_len(&obex_reassembly_table,
2478 pinfo, fragment_id, NULL((void*)0),
2479 tvb_get_ntohs(tvb, offset + 1));
2480
2481 new_tvb = process_reassembled_data(tvb, 0, pinfo,
2482 "Reassembled Obex packet", frag_msg, &obex_frag_items, NULL((void*)0), main_tree);
2483 pinfo->fragmented = true1;
2484 } else if (tvb_reported_length(tvb) == tvb_get_ntohs(tvb, offset+1)) {
19
Assuming the condition is true
20
Taking true branch
2485 /* non-fragmented */
2486 complete = true1;
2487 pinfo->fragmented = false0;
2488 }
2489 }
2490 }
2491 }
2492
2493 if (new_tvb
20.1
'new_tvb' is null
) { /* take it all */
21
Taking false branch
2494 next_tvb = new_tvb;
2495 complete = true1;
2496 } else { /* make a new subset */
2497 next_tvb = tvb_new_subset_remaining(tvb, offset);
2498 }
2499
2500 if (complete
21.1
'complete' is true
) {
22
Taking true branch
2501 uint8_t code;
2502 uint8_t final_flag;
2503
2504 /* fully dissectable packet ready */
2505
2506 /* op/response code */
2507 code = tvb_get_uint8(next_tvb, offset) & OBEX_CODE_VALS_MASK0x7F;
2508 final_flag = tvb_get_uint8(next_tvb, offset) & 0x80;
2509
2510 switch (pinfo->p2p_dir) {
23
Control jumps to the 'default' case at line 2517
2511 case P2P_DIR_SENT0:
2512 col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
2513 break;
2514 case P2P_DIR_RECV1:
2515 col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
2516 break;
2517 default:
2518 col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
2519 break;
24
Execution continues on line 2522
2520 }
2521
2522 col_append_str(pinfo->cinfo, COL_INFO,
2523 val_to_str_ext_const(code, &code_vals_ext, "Unknown"));
2524
2525 if (code < OBEX_CODE_VALS_CONTINUE0x10 || code == OBEX_CODE_VALS_ABORT0x7F) {
25
Assuming 'code' is >= OBEX_CODE_VALS_CONTINUE
26
Assuming 'code' is not equal to OBEX_CODE_VALS_ABORT
27
Taking false branch
2526 proto_tree_add_item(main_tree, hf_opcode, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2527 if (!pinfo->fd->visited &&
2528 (pinfo->p2p_dir == P2P_DIR_SENT0 ||
2529 pinfo->p2p_dir == P2P_DIR_RECV1)) {
2530 frame_number = pinfo->num;
2531
2532 key[0].length = 1;
2533 key[0].key = &obex_proto_data.interface_id;
2534 key[1].length = 1;
2535 key[1].key = &obex_proto_data.adapter_id;
2536 key[2].length = 1;
2537 key[2].key = &obex_proto_data.chandle;
2538 key[3].length = 1;
2539 key[3].key = &obex_proto_data.channel;
2540 key[4].length = 1;
2541 key[4].key = &frame_number;
2542 key[5].length = 0;
2543 key[5].key = NULL((void*)0);
2544
2545 obex_last_opcode_data = wmem_new0(wmem_file_scope(), obex_last_opcode_data_t)((obex_last_opcode_data_t*)wmem_alloc0((wmem_file_scope()), sizeof
(obex_last_opcode_data_t)))
;
2546 obex_last_opcode_data->interface_id = obex_proto_data.interface_id;
2547 obex_last_opcode_data->adapter_id = obex_proto_data.adapter_id;
2548 obex_last_opcode_data->chandle = obex_proto_data.chandle;
2549 obex_last_opcode_data->channel = obex_proto_data.channel;
2550 obex_last_opcode_data->code = code;
2551 obex_last_opcode_data->final_flag = final_flag;
2552 obex_last_opcode_data->request_in_frame = frame_number;
2553 obex_last_opcode_data->response_in_frame = 0;
2554
2555 wmem_tree_insert32_array(obex_last_opcode, key, obex_last_opcode_data);
2556 }
2557 } else {
2558 proto_tree_add_item(main_tree, hf_response_code, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2559 }
2560
2561 proto_tree_add_item(main_tree, hf_final_flag, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2562 offset++;
2563
2564 /* length */
2565 proto_tree_add_item(main_tree, hf_length, next_tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2566 length = tvb_get_ntohs(tvb, offset) - 3;
2567 offset += 2;
2568
2569 frame_number = pinfo->num;
2570
2571 key[0].length = 1;
2572 key[0].key = &obex_proto_data.interface_id;
2573 key[1].length = 1;
2574 key[1].key = &obex_proto_data.adapter_id;
2575 key[2].length = 1;
2576 key[2].key = &obex_proto_data.chandle;
2577 key[3].length = 1;
2578 key[3].key = &obex_proto_data.channel;
2579 key[4].length = 1;
2580 key[4].key = &frame_number;
2581 key[5].length = 0;
2582 key[5].key = NULL((void*)0);
2583
2584 obex_last_opcode_data = (obex_last_opcode_data_t *)wmem_tree_lookup32_array_le(obex_last_opcode, key);
2585 if (obex_last_opcode_data && obex_last_opcode_data->interface_id == obex_proto_data.interface_id &&
28
Assuming 'obex_last_opcode_data' is non-null
29
Assuming 'obex_last_opcode_data->interface_id' is not equal to 'obex_proto_data.interface_id'
2586 obex_last_opcode_data->adapter_id == obex_proto_data.adapter_id &&
2587 obex_last_opcode_data->chandle == obex_proto_data.chandle &&
2588 obex_last_opcode_data->channel == obex_proto_data.channel) {
2589 if (obex_last_opcode_data->request_in_frame > 0 && obex_last_opcode_data->request_in_frame != pinfo->num) {
2590 sub_item = proto_tree_add_uint(main_tree, hf_request_in_frame, next_tvb, 0, 0, obex_last_opcode_data->request_in_frame);
2591 proto_item_set_generated(sub_item);
2592 }
2593
2594 if (!pinfo->fd->visited && obex_last_opcode_data->response_in_frame == 0 && obex_last_opcode_data->request_in_frame < pinfo->num) {
2595 obex_last_opcode_data->response_in_frame = pinfo->num;
2596 }
2597
2598 if (obex_last_opcode_data->response_in_frame > 0 && obex_last_opcode_data->response_in_frame != pinfo->num) {
2599 sub_item = proto_tree_add_uint(main_tree, hf_response_in_frame, next_tvb, 0, 0, obex_last_opcode_data->response_in_frame);
2600 proto_item_set_generated(sub_item);
2601 }
2602 }
2603
2604 switch(code)
30
Control jumps to the 'default' case at line 2642
2605 {
2606 case OBEX_CODE_VALS_CONNECT0x00:
2607 proto_tree_add_item(main_tree, hf_version, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2608 offset++;
2609
2610 proto_tree_add_item(main_tree, hf_flags, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2611 offset++;
2612
2613 proto_tree_add_item(main_tree, hf_max_pkt_len, next_tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2614 offset += 2;
2615 break;
2616
2617 case OBEX_CODE_VALS_PUT0x02:
2618 case OBEX_CODE_VALS_GET0x03:
2619 col_append_fstr(pinfo->cinfo, COL_INFO, " %s", (final_flag == 0x80) ? "final" : "continue");
2620 break;
2621
2622 case OBEX_CODE_VALS_SET_PATH0x05:
2623 proto_tree_add_item(main_tree, hf_flags, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2624 proto_tree_add_item(main_tree, hf_set_path_flags_0, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2625 proto_tree_add_item(main_tree, hf_set_path_flags_1, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2626
2627 if (!pinfo->fd->visited && obex_last_opcode_data) {
2628 obex_last_opcode_data->data.set_data.go_up = tvb_get_uint8(tvb, offset) & 0x01;
2629 obex_last_opcode_data->data.set_data.name = NULL((void*)0);
2630 }
2631
2632 offset++;
2633
2634 proto_tree_add_item(main_tree, hf_constants, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2635 offset++;
2636 break;
2637
2638 case OBEX_CODE_VALS_DISCONNECT0x01:
2639 case OBEX_CODE_VALS_ABORT0x7F:
2640 break;
2641
2642 default:
2643 if (length == 0 && tvb_reported_length_remaining(tvb, offset) > 0) {
31
Assuming 'length' is equal to 0
32
Assuming the condition is false
33
Taking false branch
2644 proto_tree_add_expert(main_tree, pinfo, &ei_unexpected_data, tvb, offset, tvb_reported_length_remaining(tvb, offset));
2645 offset += tvb_reported_length_remaining(tvb, offset);
2646 break;
2647 } else if (length
33.1
'length' is equal to 0
== 0) break;
34
Taking true branch
35
Execution continues on line 2665
2648
2649 if (obex_last_opcode_data && obex_last_opcode_data->code == OBEX_CODE_VALS_CONNECT0x00) {
2650 proto_tree_add_item(main_tree, hf_version, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2651 offset++;
2652
2653 proto_tree_add_item(main_tree, hf_flags, next_tvb, offset, 1, ENC_BIG_ENDIAN0x00000000);
2654 offset++;
2655
2656 proto_tree_add_item(main_tree, hf_max_pkt_len, next_tvb, offset, 2, ENC_BIG_ENDIAN0x00000000);
2657 offset += 2;
2658
2659 if (!pinfo->fd->visited)
2660 save_path(pinfo, path, "", false0, &obex_proto_data);
2661 }
2662 break;
2663 }
2664
2665 dissect_headers(main_tree, next_tvb, offset, pinfo, profile, obex_last_opcode_data, &obex_proto_data);
2666 if (!pinfo->fd->visited &&
36
Assuming field 'visited' is 0
40
Taking true branch
2667 obex_last_opcode_data
36.1
'obex_last_opcode_data' is non-null
&&
2668 obex_last_opcode_data->data.set_data.name &&
37
Assuming field 'name' is non-null
2669 obex_last_opcode_data->code == OBEX_CODE_VALS_SET_PATH0x05 &&
38
Assuming field 'code' is equal to OBEX_CODE_VALS_SET_PATH
2670 code == OBEX_CODE_VALS_SUCCESS0x20) {
39
Assuming 'code' is equal to OBEX_CODE_VALS_SUCCESS
2671 save_path(pinfo, path, obex_last_opcode_data->data.set_data.name, obex_last_opcode_data->data.set_data.go_up, &obex_proto_data);
41
Passing null pointer value via 2nd parameter 'current_path'
42
Calling 'save_path'
2672 }
2673 } else {
2674 /* packet fragment */
2675 col_add_fstr(pinfo->cinfo, COL_INFO, "%s OBEX fragment",
2676 (pinfo->p2p_dir==P2P_DIR_SENT0) ? "Sent" : "Rcvd");
2677 call_dissector(data_handle, next_tvb, pinfo, main_tree);
2678
2679 offset = tvb_reported_length(tvb);
2680 }
2681
2682 pinfo->fragmented = save_fragmented;
2683
2684 return offset;
2685}
2686
2687
2688void
2689proto_register_obex(void)
2690{
2691 module_t *module;
2692 expert_module_t *expert_obex;
2693 int proto_raw;
2694 int proto_bpp;
2695 int proto_bip;
2696 int proto_map;
2697 int proto_bt_gpp;
2698 int proto_bt_ctn;
2699 int proto_bt_pbap;
2700
2701 static hf_register_info hf[] = {
2702 { &hf_opcode,
2703 { "Opcode", "obex.opcode",
2704 FT_UINT8, BASE_HEX|BASE_EXT_STRING0x00000200, &code_vals_ext, OBEX_CODE_VALS_MASK0x7F,
2705 "Request Opcode", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2706 },
2707 { &hf_response_code,
2708 { "Response Code", "obex.resp_code",
2709 FT_UINT8, BASE_HEX|BASE_EXT_STRING0x00000200, &code_vals_ext, OBEX_CODE_VALS_MASK0x7F,
2710 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2711 },
2712 { &hf_final_flag,
2713 { "Final Flag", "obex.final_flag",
2714 FT_BOOLEAN, 8, NULL((void*)0), 0x80,
2715 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2716 },
2717 { &hf_length,
2718 { "Packet Length", "obex.pkt_len",
2719 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
2720 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2721 },
2722 { &hf_version,
2723 { "Version", "obex.version",
2724 FT_UINT8, BASE_HEX, VALS(version_vals)((0 ? (const struct _value_string*)0 : ((version_vals)))), 0x00,
2725 "Obex Protocol Version", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2726 },
2727 { &hf_flags,
2728 { "Flags", "obex.flags",
2729 FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
2730 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2731 },
2732 { &hf_constants,
2733 { "Constants", "obex.constants",
2734 FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
2735 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2736 },
2737 { &hf_max_pkt_len,
2738 { "Max. Packet Length", "obex.max_pkt_len",
2739 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
2740 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2741 },
2742 { &hf_set_path_flags_0,
2743 { "Go back one folder (../) first", "obex.set_path_flags_0",
2744 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
2745 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2746 },
2747 { &hf_set_path_flags_1,
2748 { "Do not create folder, if not existing", "obex.set_path_flags_1",
2749 FT_BOOLEAN, 8, NULL((void*)0), 0x02,
2750 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2751 },
2752 { &hf_headers,
2753 { "Headers", "obex.headers",
2754 FT_NONE, BASE_NONE, NULL((void*)0), 0x00,
2755 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2756 },
2757 { &hf_header,
2758 { "Header", "obex.header",
2759 FT_NONE, BASE_NONE, NULL((void*)0), 0x00,
2760 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2761 },
2762 { &hf_hdr_id,
2763 { "Header Id", "obex.header.id",
2764 FT_UINT8, BASE_HEX|BASE_EXT_STRING0x00000200, &header_id_vals_ext, 0x00,
2765 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2766 },
2767 { &hf_hdr_id_encoding,
2768 { "Encoding", "obex.header.id.encoding",
2769 FT_UINT8, BASE_HEX, VALS(header_id_encoding_vals)((0 ? (const struct _value_string*)0 : ((header_id_encoding_vals
))))
, 0xC0,
2770 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2771 },
2772 { &hf_hdr_id_meaning,
2773 { "Meaning", "obex.header.id.meaning",
2774 FT_UINT8, BASE_HEX, VALS(header_id_meaning_vals)((0 ? (const struct _value_string*)0 : ((header_id_meaning_vals
))))
, 0x3F,
2775 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2776 },
2777 { &hf_hdr_length,
2778 { "Length", "obex.header.length",
2779 FT_UINT16, BASE_DEC, NULL((void*)0), 0,
2780 "Header Length", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2781 },
2782 { &hf_hdr_val_unicode,
2783 { "Value", "obex.header.value.unicode",
2784 FT_STRING, BASE_NONE, NULL((void*)0), 0,
2785 "Unicode Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
2786 },
2787 { &hf_hdr_val_byte_seq,
2788 { "Value", "obex.header.value.byte_sequence",
2789 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2790 "Byte Sequence Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2791 },
2792 { &hf_hdr_val_byte,
2793 { "Value", "obex.header.value.byte",
2794 FT_UINT8, BASE_DEC_HEX, NULL((void*)0), 0,
2795 "Byte Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2796 },
2797 { &hf_hdr_val_long,
2798 { "Value", "obex.header.value.long",
2799 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
2800 "4-byte Value", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2801 },
2802 { &hf_count,
2803 { "Count", "obex.count",
2804 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
2805 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2806 },
2807 { &hf_data_length,
2808 { "Length", "obex.length",
2809 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
2810 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2811 },
2812 { &hf_connection_id,
2813 { "Connection ID", "obex.connection_id",
2814 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
2815 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2816 },
2817 { &hf_session_parameter,
2818 { "Session Parameter", "obex.session",
2819 FT_NONE, BASE_NONE, NULL((void*)0), 0x00,
2820 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2821 },
2822 { &hf_session_parameter_data,
2823 { "Parameter Value", "obex.session.value",
2824 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2825 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2826 },
2827 { &hf_session_parameter_tag,
2828 { "Tag", "obex.session.tag",
2829 FT_UINT8, BASE_HEX, VALS(session_tag_vals)((0 ? (const struct _value_string*)0 : ((session_tag_vals)))), 0x00,
2830 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2831 },
2832 { &hf_session_parameter_length,
2833 { "Length", "obex.session.length",
2834 FT_UINT8, BASE_DEC, NULL((void*)0), 0,
2835 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2836 },
2837 { &hf_session_parameter_nonce,
2838 { "Nonce", "obex.session.nonce",
2839 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2840 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2841 },
2842 { &hf_session_parameter_session_id,
2843 { "Session ID", "obex.session.session_id",
2844 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2845 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2846 },
2847 { &hf_session_parameter_next_sequence_number,
2848 { "Next Sequence Number", "obex.session.next_sequence_number",
2849 FT_UINT8, BASE_DEC, NULL((void*)0), 0,
2850 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2851 },
2852 { &hf_session_parameter_timeout,
2853 { "Timeout", "obex.session.timeout",
2854 FT_UINT32, BASE_DEC, NULL((void*)0), 0,
2855 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2856 },
2857 { &hf_session_parameter_opcode,
2858 { "Opcode", "obex.session.opcode",
2859 FT_UINT8, BASE_HEX, VALS(session_opcode_vals)((0 ? (const struct _value_string*)0 : ((session_opcode_vals)
)))
, 0,
2860 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2861 },
2862 { &hf_authentication_parameter,
2863 { "Authentication Parameter", "obex.authentication",
2864 FT_NONE, BASE_NONE, NULL((void*)0), 0x00,
2865 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2866 },
2867 { &hf_authentication_parameter_data,
2868 { "Parameter Value", "obex.authentication.value",
2869 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2870 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2871 },
2872 { &hf_authentication_challenge_tag,
2873 { "Tag", "obex.authentication.challenge_tag",
2874 FT_UINT8, BASE_HEX, VALS(authentication_challenge_tag_vals)((0 ? (const struct _value_string*)0 : ((authentication_challenge_tag_vals
))))
, 0x00,
2875 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2876 },
2877 { &hf_authentication_response_tag,
2878 { "Tag", "obex.authentication.response_tag",
2879 FT_UINT8, BASE_HEX, VALS(authentication_response_tag_vals)((0 ? (const struct _value_string*)0 : ((authentication_response_tag_vals
))))
, 0x00,
2880 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2881 },
2882 { &hf_authentication_length,
2883 { "Length", "obex.authentication.length",
2884 FT_UINT8, BASE_DEC, NULL((void*)0), 0,
2885 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2886 },
2887 { &hf_authentication_key,
2888 { "Key", "obex.authentication.key",
2889 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2890 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2891 },
2892 { &hf_authentication_result_key,
2893 { "Result Key", "obex.authentication.result_key",
2894 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2895 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2896 },
2897 { &hf_authentication_user_id,
2898 { "User Id", "obex.authentication.user_id",
2899 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2900 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2901 },
2902 { &hf_authentication_option_reserved,
2903 { "Reserved", "obex.authentication.option.reserved",
2904 FT_UINT8, BASE_HEX, NULL((void*)0), 0xFC,
2905 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2906 },
2907 { &hf_authentication_option_read_only,
2908 { "Read Only", "obex.authentication.option.read_only",
2909 FT_BOOLEAN, 8, NULL((void*)0), 0x02,
2910 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2911 },
2912 { &hf_authentication_option_user_id,
2913 { "User ID", "obex.authentication.option.user_id",
2914 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
2915 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2916 },
2917 { &hf_authentication_info_charset,
2918 { "Charset", "obex.authentication.info.charset",
2919 FT_UINT8, BASE_HEX, VALS(info_charset_vals)((0 ? (const struct _value_string*)0 : ((info_charset_vals)))
)
, 0,
2920 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2921 },
2922 { &hf_authentication_info,
2923 { "Info", "obex.authentication.info",
2924 FT_STRING, BASE_NONE, NULL((void*)0), 0,
2925 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2926 },
2927 { &hf_application_parameter,
2928 { "Parameter", "obex.parameter",
2929 FT_NONE, BASE_NONE, NULL((void*)0), 0x00,
2930 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2931 },
2932 { &hf_application_parameter_id,
2933 { "Parameter Id", "obex.parameter.id",
2934 FT_UINT8, BASE_HEX, NULL((void*)0), 0x00,
2935 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2936 },
2937 { &hf_application_parameter_length,
2938 { "Parameter Length", "obex.parameter.length",
2939 FT_UINT8, BASE_DEC, NULL((void*)0), 0,
2940 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2941 },
2942 { &hf_application_parameter_data,
2943 { "Parameter Value", "obex.parameter.value",
2944 FT_BYTES, BASE_NONE, NULL((void*)0), 0,
2945 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2946 },
2947 /* application parameters for BPP */
2948 { &hf_bpp_application_parameter_id,
2949 { "Parameter Id", "obex.parameter.id",
2950 FT_UINT8, BASE_HEX | BASE_EXT_STRING0x00000200, &bpp_application_parameters_vals_ext, 0x00,
2951 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2952 },
2953 { &hf_bpp_application_parameter_data_offset,
2954 { "Offset", "obex.parameter.value.offset",
2955 FT_UINT32, BASE_DEC_HEX, NULL((void*)0), 0,
2956 "The byte offset into the image or file.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2957 },
2958 { &hf_bpp_application_parameter_data_count,
2959 { "Count", "obex.parameter.value.count",
2960 FT_INT32, BASE_DEC, NULL((void*)0), 0,
2961 "The number of bytes of the image or file to be sent.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2962 },
2963 { &hf_bpp_application_parameter_data_job_id,
2964 { "Job ID", "obex.parameter.value.job_id",
2965 FT_UINT32, BASE_DEC_HEX, NULL((void*)0), 0,
2966 "The job identifier of the print job.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2967 },
2968 { &hf_bpp_application_parameter_data_file_size,
2969 { "File Size", "obex.parameter.value.file_size",
2970 FT_INT32, BASE_DEC, NULL((void*)0), 0,
2971 "The size (in bytes) of object or file.", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2972 },
2973 /* application parameters for BIP */
2974 { &hf_bip_application_parameter_id,
2975 { "Parameter Id", "obex.parameter.id",
2976 FT_UINT8, BASE_HEX | BASE_EXT_STRING0x00000200, &bip_application_parameters_vals_ext, 0x00,
2977 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
2978 },
2979 { &hf_bip_application_parameter_data_number_of_returned_handles,
2980 { "Number of Returned Handles", "obex.parameter.value.number_of_returned_handles",
2981 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
2982 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
2983 },
2984 { &hf_bip_application_parameter_data_list_start_offset,
2985 { "List Start Offset", "obex.parameter.value.list_start_offset",
2986 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
2987 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
2988 },
2989 { &hf_bip_application_parameter_data_latest_captured_images,
2990 { "Latest Captured Images", "obex.parameter.value.latest_captured_images",
2991 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00,
2992 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
2993 },
2994 { &hf_bip_application_parameter_data_partial_file_length,
2995 { "Partial File Length", "obex.parameter.value.partial_file_length",
2996 FT_UINT32, BASE_DEC_HEX, NULL((void*)0), 0x00,
2997 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
2998 },
2999 { &hf_bip_application_parameter_data_partial_file_start_offset,
3000 { "Partial File Start Offset", "obex.parameter.value.partial_file_start_offset",
3001 FT_UINT32, BASE_DEC_HEX, NULL((void*)0), 0x00,
3002 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3003 },
3004 { &hf_bip_application_parameter_data_total_file_size,
3005 { "Total File Size", "obex.parameter.value.total_file_size",
3006 FT_UINT32, BASE_DEC_HEX, NULL((void*)0), 0x00,
3007 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3008 },
3009 { &hf_bip_application_parameter_data_end_flag,
3010 { "End Flag", "obex.parameter.value.end_flag",
3011 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00,
3012 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3013 },
3014 { &hf_bip_application_parameter_data_remote_display,
3015 { "Remote Display", "obex.parameter.value.remote_display",
3016 FT_UINT8, BASE_HEX, VALS(bip_remote_display_vals)((0 ? (const struct _value_string*)0 : ((bip_remote_display_vals
))))
, 0x00,
3017 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3018 },
3019 { &hf_bip_application_parameter_data_service_id,
3020 { "Service ID", "obex.parameter.value.service_id",
3021 FT_UINT16, BASE_HEX | BASE_EXT_STRING0x00000200, &bluetooth_uuid_vals_ext, 0x00,
3022 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3023 },
3024 { &hf_bip_application_parameter_data_store_flag,
3025 { "Store Flag", "obex.parameter.value.store_flag",
3026 FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x00,
3027 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3028 },
3029 /* application parameters for PBAP */
3030 { &hf_pbap_application_parameter_id,
3031 { "Parameter Id", "obex.parameter.id",
3032 FT_UINT8, BASE_HEX | BASE_EXT_STRING0x00000200, &pbap_application_parameters_vals_ext, 0x00,
3033 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3034 },
3035 { &hf_pbap_application_parameter_data_order,
3036 { "Max List Count", "obex.parameter.value.order",
3037 FT_UINT8, BASE_HEX, VALS(pbap_order_vals)((0 ? (const struct _value_string*)0 : ((pbap_order_vals)))), 0x00,
3038 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3039 },
3040 { &hf_pbap_application_parameter_data_search_value,
3041 { "Search Value", "obex.parameter.value.search_value",
3042 FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
3043 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3044 },
3045 { &hf_pbap_application_parameter_data_search_attribute,
3046 { "Search Attribute", "obex.parameter.value.search_attribute",
3047 FT_UINT8, BASE_HEX, VALS(pbap_search_attribute_vals)((0 ? (const struct _value_string*)0 : ((pbap_search_attribute_vals
))))
, 0x00,
3048 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3049 },
3050 { &hf_pbap_application_parameter_data_max_list_count,
3051 { "Max List Count", "obex.parameter.value.max_list_count",
3052 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3053 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3054 },
3055 { &hf_pbap_application_parameter_data_list_start_offset,
3056 { "List Start Offset", "obex.parameter.value.list_start_offset",
3057 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3058 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3059 },
3060 { &hf_pbap_application_parameter_data_filter,
3061 { "Filter", "obex.parameter.value.filter",
3062 FT_UINT32, BASE_HEX, NULL((void*)0), 0x0,
3063 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3064 },
3065 { &hf_pbap_application_parameter_vcard_selector,
3066 { "vCard Selector", "obex.parameter.value.vcard_selector",
3067 FT_UINT32, BASE_HEX, NULL((void*)0), 0x0,
3068 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3069 },
3070 { &hf_pbap_application_parameter_data_filter_version,
3071 { "vCard Version", "obex.parameter.value.filter.version",
3072 FT_BOOLEAN, 32, NULL((void*)0), 0x00000001,
3073 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3074 },
3075 { &hf_pbap_application_parameter_data_filter_fn,
3076 { "Formatted Name", "obex.parameter.value.filter.fn",
3077 FT_BOOLEAN, 32, NULL((void*)0), 0x00000002,
3078 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3079 },
3080 { &hf_pbap_application_parameter_data_filter_n,
3081 { "Structured Presentation of Name", "obex.parameter.value.filter.n",
3082 FT_BOOLEAN, 32, NULL((void*)0), 0x00000004,
3083 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3084 },
3085 { &hf_pbap_application_parameter_data_filter_photo,
3086 { "Associated Image or Photo", "obex.parameter.value.filter.photo",
3087 FT_BOOLEAN, 32, NULL((void*)0), 0x00000008,
3088 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3089 },
3090 { &hf_pbap_application_parameter_data_filter_birthday,
3091 { "Birthday", "obex.parameter.value.filter.birthday",
3092 FT_BOOLEAN, 32, NULL((void*)0), 0x00000010,
3093 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3094 },
3095 { &hf_pbap_application_parameter_data_filter_adr,
3096 { "Delivery Address", "obex.parameter.value.filter.adr",
3097 FT_BOOLEAN, 32, NULL((void*)0), 0x00000020,
3098 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3099 },
3100 { &hf_pbap_application_parameter_data_filter_label,
3101 { "Delivery", "obex.parameter.value.filter.label",
3102 FT_BOOLEAN, 32, NULL((void*)0), 0x00000040,
3103 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3104 },
3105 { &hf_pbap_application_parameter_data_filter_tel,
3106 { "Telephone Number", "obex.parameter.value.filter.tel",
3107 FT_BOOLEAN, 32, NULL((void*)0), 0x00000080,
3108 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3109 },
3110 { &hf_pbap_application_parameter_data_filter_email,
3111 { "Electronic Mail Address", "obex.parameter.value.filter.email",
3112 FT_BOOLEAN, 32, NULL((void*)0), 0x00000100,
3113 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3114 },
3115 { &hf_pbap_application_parameter_data_filter_mailer,
3116 { "Electronic Mail", "obex.parameter.value.filter.mailer",
3117 FT_BOOLEAN, 32, NULL((void*)0), 0x00000200,
3118 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3119 },
3120 { &hf_pbap_application_parameter_data_filter_time_zone,
3121 { "Time Zone", "obex.parameter.value.filter.time_zone",
3122 FT_BOOLEAN, 32, NULL((void*)0), 0x00000400,
3123 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3124 },
3125 { &hf_pbap_application_parameter_data_filter_geographic_position,
3126 { "Geographic Position", "obex.parameter.value.filter.geographic_position",
3127 FT_BOOLEAN, 32, NULL((void*)0), 0x00000800,
3128 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3129 },
3130 { &hf_pbap_application_parameter_data_filter_title,
3131 { "Job", "obex.parameter.value.filter.title",
3132 FT_BOOLEAN, 32, NULL((void*)0), 0x00001000,
3133 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3134 },
3135 { &hf_pbap_application_parameter_data_filter_role,
3136 { "Role within the Organization", "obex.parameter.value.filter.role",
3137 FT_BOOLEAN, 32, NULL((void*)0), 0x00002000,
3138 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3139 },
3140 { &hf_pbap_application_parameter_data_filter_logo,
3141 { "Organization Logo", "obex.parameter.value.filter.logo",
3142 FT_BOOLEAN, 32, NULL((void*)0), 0x00004000,
3143 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3144 },
3145 { &hf_pbap_application_parameter_data_filter_agent,
3146 { "vCard of Person Representing", "obex.parameter.value.filter.agent",
3147 FT_BOOLEAN, 32, NULL((void*)0), 0x00008000,
3148 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3149 },
3150 { &hf_pbap_application_parameter_data_filter_name_of_organization,
3151 { "Name of Organization", "obex.parameter.value.filter.name_of_organization",
3152 FT_BOOLEAN, 32, NULL((void*)0), 0x00010000,
3153 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3154 },
3155 { &hf_pbap_application_parameter_data_filter_comments,
3156 { "Comments", "obex.parameter.value.filter.comments",
3157 FT_BOOLEAN, 32, NULL((void*)0), 0x00020000,
3158 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3159 },
3160 { &hf_pbap_application_parameter_data_filter_revision,
3161 { "Revision", "obex.parameter.value.filter.revision",
3162 FT_BOOLEAN, 32, NULL((void*)0), 0x00040000,
3163 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3164 },
3165 { &hf_pbap_application_parameter_data_filter_pronunciation_of_name,
3166 { "Pronunciation of Name", "obex.parameter.value.filter.pronunciation_of_name",
3167 FT_BOOLEAN, 32, NULL((void*)0), 0x00080000,
3168 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3169 },
3170 { &hf_pbap_application_parameter_data_filter_url,
3171 { "Uniform Resource Locator", "obex.parameter.value.filter.url",
3172 FT_BOOLEAN, 32, NULL((void*)0), 0x00100000,
3173 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3174 },
3175 { &hf_pbap_application_parameter_data_filter_uid,
3176 { "Unique ID", "obex.parameter.value.filter.uid",
3177 FT_BOOLEAN, 32, NULL((void*)0), 0x00200000,
3178 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3179 },
3180 { &hf_pbap_application_parameter_data_filter_key,
3181 { "Public Encryption Key", "obex.parameter.value.filter.key",
3182 FT_BOOLEAN, 32, NULL((void*)0), 0x00400000,
3183 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3184 },
3185 { &hf_pbap_application_parameter_data_filter_nickname,
3186 { "Nickname", "obex.parameter.value.filter.nickname",
3187 FT_BOOLEAN, 32, NULL((void*)0), 0x00800000,
3188 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3189 },
3190 { &hf_pbap_application_parameter_data_filter_categories,
3191 { "Categories", "obex.parameter.value.filter.categories",
3192 FT_BOOLEAN, 32, NULL((void*)0), 0x01000000,
3193 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3194 },
3195 { &hf_pbap_application_parameter_data_filter_product_id,
3196 { "Product ID", "obex.parameter.value.filter.product_id",
3197 FT_BOOLEAN, 32, NULL((void*)0), 0x02000000,
3198 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3199 },
3200 { &hf_pbap_application_parameter_data_filter_class,
3201 { "Class Information", "obex.parameter.value.filter.class",
3202 FT_BOOLEAN, 32, NULL((void*)0), 0x04000000,
3203 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3204 },
3205 { &hf_pbap_application_parameter_data_filter_sort_string,
3206 { "String Used For Sorting Operations", "obex.parameter.value.filter.sort_string",
3207 FT_BOOLEAN, 32, NULL((void*)0), 0x08000000,
3208 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3209 },
3210 { &hf_pbap_application_parameter_data_filter_timestamp,
3211 { "Timestamp", "obex.parameter.value.filter.timestamp",
3212 FT_BOOLEAN, 32, NULL((void*)0), 0x10000000,
3213 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3214 },
3215 { &hf_pbap_application_parameter_data_filter_reserved_29_31,
3216 { "Reserved", "obex.parameter.value.filter.reserved_29_31",
3217 FT_UINT32, BASE_HEX, NULL((void*)0), 0xE0000000,
3218 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3219 },
3220 { &hf_pbap_application_parameter_data_filter_reserved_32_38,
3221 { "Reserved", "obex.parameter.value.filter.reserved_32_38",
3222 FT_UINT32, BASE_HEX, NULL((void*)0), 0x0000007F,
3223 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3224 },
3225 { &hf_pbap_application_parameter_data_filter_proprietary_filter,
3226 { "Proprietary Filter", "obex.parameter.value.filter.proprietary_filter",
3227 FT_BOOLEAN, 32, NULL((void*)0), 0x00000080,
3228 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3229 },
3230 { &hf_pbap_application_parameter_data_filter_reserved_for_proprietary_filter_usage,
3231 { "Reserved for Proprietary Filter Usage", "obex.parameter.value.filter.reserved_for_proprietary_filter_usage",
3232 FT_UINT32, BASE_HEX, NULL((void*)0), 0xFFFFFF00,
3233 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3234 },
3235 { &hf_pbap_application_parameter_data_format,
3236 { "Format", "obex.parameter.value.format",
3237 FT_UINT8, BASE_HEX, VALS(pbap_format_vals)((0 ? (const struct _value_string*)0 : ((pbap_format_vals)))), 0x00,
3238 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3239 },
3240 { &hf_pbap_application_parameter_data_phonebook_size,
3241 { "Phonebook Size", "obex.parameter.value.phonebook_size",
3242 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3243 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3244 },
3245 { &hf_pbap_application_parameter_data_new_missed_calls,
3246 { "New Missed Calls", "obex.parameter.value.new_missed_calls",
3247 FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
3248 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3249 },
3250 { &hf_pbap_application_parameter_data_primary_version_counter,
3251 { "Primary Version Counter", "obex.parameter.value.primary_version_counter",
3252 FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
3253 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3254 },
3255 { &hf_pbap_application_parameter_data_secondary_version_counter,
3256 { "Secondary Version Counter", "obex.parameter.value.secondary_version_counter",
3257 FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
3258 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3259 },
3260 { &hf_pbap_application_parameter_data_database_identifier,
3261 { "Database Identifier", "obex.parameter.value.database_identifier",
3262 FT_BYTES, BASE_NONE, NULL((void*)0), 0x00,
3263 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3264 },
3265 { &hf_pbap_application_parameter_data_vcard_selector_operator,
3266 { "vCard Selector Operator", "obex.parameter.value.vcard_selector_operator",
3267 FT_UINT8, BASE_HEX, VALS(pbap_application_parameter_data_vcard_selector_operator_vals)((0 ? (const struct _value_string*)0 : ((pbap_application_parameter_data_vcard_selector_operator_vals
))))
, 0x00,
3268 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3269 },
3270 { &hf_pbap_application_parameter_data_reset_new_missed_calls,
3271 { "vCard Selector Operator", "obex.parameter.value.reset_new_missed_calls",
3272 FT_UINT8, BASE_HEX, VALS(pbap_application_parameter_data_reset_new_missed_calls_vals)((0 ? (const struct _value_string*)0 : ((pbap_application_parameter_data_reset_new_missed_calls_vals
))))
, 0x00,
3273 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3274 },
3275 { &hf_pbap_application_parameter_data_supported_features,
3276 { "Supported Features", "obex.parameter.supported_features",
3277 FT_UINT32, BASE_HEX, NULL((void*)0), 0x0,
3278 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3279 },
3280 { &hf_pbap_application_parameter_data_supported_features_reserved,
3281 { "Reserved", "obex.parameter.supported_features.reserved",
3282 FT_UINT32, BASE_HEX, NULL((void*)0), 0xFFFFFC00,
3283 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3284 },
3285 { &hf_pbap_application_parameter_data_supported_features_default_contact_image_format,
3286 { "Default Contact Image Format", "obex.parameter.supported_features.default_contact_image_format",
3287 FT_BOOLEAN, 32, NULL((void*)0), 0x00000200,
3288 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3289 },
3290 { &hf_pbap_application_parameter_data_supported_features_contact_referencing,
3291 { "Contact Referencing", "obex.parameter.supported_features.contact_referencing",
3292 FT_BOOLEAN, 32, NULL((void*)0), 0x00000100,
3293 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3294 },
3295 { &hf_pbap_application_parameter_data_supported_features_x_bt_uid_vcard_property,
3296 { "X-BT-UID vCard Property", "obex.parameter.supported_features.x_bt_uid_vcard_property",
3297 FT_BOOLEAN, 32, NULL((void*)0), 0x00000080,
3298 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3299 },
3300 { &hf_pbap_application_parameter_data_supported_features_x_bt_uci_vcard_property,
3301 { "X-BT-UCI vCard Property", "obex.parameter.supported_features.x_bt_uci_vcard_property",
3302 FT_BOOLEAN, 32, NULL((void*)0), 0x00000040,
3303 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3304 },
3305 { &hf_pbap_application_parameter_data_supported_features_enhanced_missed_calls,
3306 { "Enhanced Missed Calls", "obex.parameter.supported_features.enhanced_missed_calls",
3307 FT_BOOLEAN, 32, NULL((void*)0), 0x00000020,
3308 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3309 },
3310 { &hf_pbap_application_parameter_data_supported_features_vcard_selecting,
3311 { "vCard Selecting", "obex.parameter.supported_features.vcard_selecting",
3312 FT_BOOLEAN, 32, NULL((void*)0), 0x00000010,
3313 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3314 },
3315 { &hf_pbap_application_parameter_data_supported_features_folder_version_counters,
3316 { "Folder Version Counters", "obex.parameter.supported_features.folder_version_counters",
3317 FT_BOOLEAN, 32, NULL((void*)0), 0x00000008,
3318 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3319 },
3320 { &hf_pbap_application_parameter_data_supported_features_database_identifier,
3321 { "Database Identifier", "obex.parameter.supported_features.database_identifier",
3322 FT_BOOLEAN, 32, NULL((void*)0), 0x00000004,
3323 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3324 },
3325 { &hf_pbap_application_parameter_data_supported_features_browsing,
3326 { "Browsing", "obex.parameter.supported_features.browsing",
3327 FT_BOOLEAN, 32, NULL((void*)0), 0x00000002,
3328 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3329 },
3330 { &hf_pbap_application_parameter_data_supported_features_download,
3331 { "Download", "obex.parameter.supported_features.download",
3332 FT_BOOLEAN, 32, NULL((void*)0), 0x00000001,
3333 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3334 },
3335 /* application parameters for MAP */
3336 { &hf_map_application_parameter_id,
3337 { "Parameter Id", "obex.parameter.id",
3338 FT_UINT8, BASE_HEX | BASE_EXT_STRING0x00000200, &map_application_parameters_vals_ext, 0x00,
3339 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3340 },
3341 { &hf_map_application_parameter_data_max_list_count,
3342 { "Max List Count", "obex.parameter.value.max_list_count",
3343 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3344 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3345 },
3346 { &hf_map_application_parameter_data_start_offset,
3347 { "Start Offset", "obex.parameter.value.start_offset",
3348 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3349 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3350 },
3351 { &hf_map_application_parameter_data_filter_message_type_reserved,
3352 { "Reserved", "obex.parameter.value.filter_message_type.reserved",
3353 FT_UINT8, BASE_HEX, NULL((void*)0), 0xF0,
3354 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3355 },
3356 { &hf_map_application_parameter_data_filter_message_type_mms,
3357 { "MMS", "obex.parameter.value.filter_message_type.mms",
3358 FT_BOOLEAN, 8, NULL((void*)0), 0x08,
3359 "True to filter out, False to listing this type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3360 },
3361 { &hf_map_application_parameter_data_filter_message_type_email,
3362 { "EMAIL", "obex.parameter.value.filter_message_type.sms_email",
3363 FT_BOOLEAN, 8, NULL((void*)0), 0x04,
3364 "True to filter out, False to listing this type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3365 },
3366 { &hf_map_application_parameter_data_filter_message_type_sms_cdma,
3367 { "SMS_CDMA", "obex.parameter.value.filter_message_type.sms_cdma",
3368 FT_BOOLEAN, 8, NULL((void*)0), 0x02,
3369 "True to filter out, False to listing this type", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3370 },
3371 { &hf_map_application_parameter_data_filter_message_type_sms_gsm,
3372 { "SMS_GSM", "obex.parameter.value.filter_message_type.sms_gsm",
3373 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3374 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3375 },
3376 { &hf_map_application_parameter_data_filter_period_begin,
3377 { "Filter Period Begin", "obex.parameter.value.filter_period_begin",
3378 FT_STRING, BASE_NONE, NULL((void*)0), 0,
3379 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3380 },
3381 { &hf_map_application_parameter_data_filter_period_end,
3382 { "Filter Period End", "obex.parameter.value.filter_period_end",
3383 FT_STRING, BASE_NONE, NULL((void*)0), 0,
3384 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3385 },
3386 { &hf_map_application_parameter_data_filter_read_status_reserved_6,
3387 { "Filter Read Status: Reserved", "obex.parameter.value.filter_read_status.reserved",
3388 FT_UINT8, BASE_HEX, NULL((void*)0), 0xFC,
3389 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3390 },
3391 { &hf_map_application_parameter_data_filter_read_status_get_read,
3392 { "Filter Read Status: Get Read", "obex.parameter.value.filter_read_status.get_read",
3393 FT_BOOLEAN, 8, NULL((void*)0), 0x02,
3394 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3395 },
3396 { &hf_map_application_parameter_data_filter_read_status_get_unread,
3397 { "Filter Read Status: Get Unread", "obex.parameter.value.filter_read_status.get_unread",
3398 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3399 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3400 },
3401 { &hf_map_application_parameter_data_filter_recipient,
3402 { "Filter Recipient", "obex.parameter.value.filter_recipient",
3403 FT_STRING, BASE_NONE, NULL((void*)0), 0,
3404 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3405 },
3406 { &hf_map_application_parameter_data_filter_originator,
3407 { "Filter Originator", "obex.parameter.value.filter_originator",
3408 FT_STRING, BASE_NONE, NULL((void*)0), 0,
3409 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3410 },
3411 { &hf_map_application_parameter_data_filter_priority_reserved_6,
3412 { "Filter Priority: Reserved", "obex.parameter.value.filter_priority.reserved",
3413 FT_UINT8, BASE_HEX, NULL((void*)0), 0xFC,
3414 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3415 },
3416 { &hf_map_application_parameter_data_filter_priority_get_high,
3417 { "Filter Priority: Get Read", "obex.parameter.value.filter_priority.get_high",
3418 FT_BOOLEAN, 8, NULL((void*)0), 0x02,
3419 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3420 },
3421 { &hf_map_application_parameter_data_filter_priority_non_high,
3422 { "Filter Priority: Get Non High", "obex.parameter.value.filter_priority.non_high",
3423 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3424 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3425 },
3426 { &hf_map_application_parameter_data_reserved_7,
3427 { "Reserved", "obex.parameter.value.reserved",
3428 FT_UINT8, BASE_HEX, NULL((void*)0), 0xFE,
3429 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3430 },
3431 { &hf_map_application_parameter_data_attachment,
3432 { "Attachment", "obex.parameter.value.attachment",
3433 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3434 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3435 },
3436 { &hf_map_application_parameter_data_transparent,
3437 { "Transparent", "obex.parameter.value.transparent",
3438 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3439 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3440 },
3441 { &hf_map_application_parameter_data_retry,
3442 { "Retry", "obex.parameter.value.retry",
3443 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3444 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3445 },
3446 { &hf_map_application_parameter_data_new_message,
3447 { "New Message", "obex.parameter.value.new_message",
3448 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3449 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3450 },
3451 { &hf_map_application_parameter_data_notification_status,
3452 { "Notification Status", "obex.parameter.value.notification_status",
3453 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3454 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3455 },
3456 { &hf_map_application_parameter_data_mas_instance_id,
3457 { "MAS Instance ID", "obex.parameter.value.mas_instance_id",
3458 FT_UINT8, BASE_DEC_HEX, NULL((void*)0), 0,
3459 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3460 },
3461 { &hf_map_application_parameter_data_parameter_mask_reserved,
3462 { "Parameter Mask: Reserved", "obex.parameter.value.parameter_mask.reserved",
3463 FT_UINT32, BASE_HEX, NULL((void*)0), 0xFFFF0000,
3464 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3465 },
3466 { &hf_map_application_parameter_data_parameter_mask_reply_to_addressing,
3467 { "Parameter Mask: Reply to Addressing", "obex.parameter.value.parameter_mask.reply_to_addressing",
3468 FT_BOOLEAN, 32, NULL((void*)0), 0x00008000,
3469 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3470 },
3471 { &hf_map_application_parameter_data_parameter_mask_protected,
3472 { "Parameter Mask: Protected", "obex.parameter.value.parameter_mask.protected",
3473 FT_BOOLEAN, 32, NULL((void*)0), 0x00004000,
3474 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3475 },
3476 { &hf_map_application_parameter_data_parameter_mask_sent,
3477 { "Parameter Mask: Sent", "obex.parameter.value.parameter_mask.sent",
3478 FT_BOOLEAN, 32, NULL((void*)0), 0x00002000,
3479 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3480 },
3481 { &hf_map_application_parameter_data_parameter_mask_read,
3482 { "Parameter Mask: Read", "obex.parameter.value.parameter_mask.read",
3483 FT_BOOLEAN, 32, NULL((void*)0), 0x00001000,
3484 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3485 },
3486 { &hf_map_application_parameter_data_parameter_mask_priority,
3487 { "Parameter Mask: Priority", "obex.parameter.value.parameter_mask.priority",
3488 FT_BOOLEAN, 32, NULL((void*)0), 0x00000800,
3489 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3490 },
3491 { &hf_map_application_parameter_data_parameter_mask_attachment_size,
3492 { "Parameter Mask: Attachment Size", "obex.parameter.value.parameter_mask.attachment_size",
3493 FT_BOOLEAN, 32, NULL((void*)0), 0x00000400,
3494 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3495 },
3496 { &hf_map_application_parameter_data_parameter_mask_text,
3497 { "Parameter Mask: Text", "obex.parameter.value.parameter_mask.text",
3498 FT_BOOLEAN, 32, NULL((void*)0), 0x00000200,
3499 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3500 },
3501 { &hf_map_application_parameter_data_parameter_mask_reception_status,
3502 { "Parameter Mask: Reception Status", "obex.parameter.value.parameter_mask.reception_status",
3503 FT_BOOLEAN, 32, NULL((void*)0), 0x00000100,
3504 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3505 },
3506 { &hf_map_application_parameter_data_parameter_mask_size,
3507 { "Parameter Mask: Size", "obex.parameter.value.parameter_mask.size",
3508 FT_BOOLEAN, 32, NULL((void*)0), 0x00000080,
3509 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3510 },
3511 { &hf_map_application_parameter_data_parameter_mask_type,
3512 { "Parameter Mask: Type", "obex.parameter.value.parameter_mask.type",
3513 FT_BOOLEAN, 32, NULL((void*)0), 0x00000040,
3514 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3515 },
3516 { &hf_map_application_parameter_data_parameter_mask_recipient_addressing,
3517 { "Parameter Mask: Recipient Addressing", "obex.parameter.value.parameter_mask.recipient_addressing",
3518 FT_BOOLEAN, 32, NULL((void*)0), 0x00000020,
3519 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3520 },
3521 { &hf_map_application_parameter_data_parameter_mask_recipient_name,
3522 { "Parameter Mask: Recipient Name", "obex.parameter.value.parameter_mask.recipient_name",
3523 FT_BOOLEAN, 32, NULL((void*)0), 0x00000010,
3524 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3525 },
3526 { &hf_map_application_parameter_data_parameter_mask_sender_addressing,
3527 { "Parameter Mask: Sender Addressing", "obex.parameter.value.parameter_mask.sender_addressing",
3528 FT_BOOLEAN, 32, NULL((void*)0), 0x00000008,
3529 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3530 },
3531 { &hf_map_application_parameter_data_parameter_mask_sender_name,
3532 { "Parameter Mask: Sender Name", "obex.parameter.value.parameter_mask.sender_name",
3533 FT_BOOLEAN, 32, NULL((void*)0), 0x00000004,
3534 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3535 },
3536 { &hf_map_application_parameter_data_parameter_mask_datetime,
3537 { "Parameter Mask: Datetime", "obex.parameter.value.parameter_mask.datetime",
3538 FT_BOOLEAN, 32, NULL((void*)0), 0x00000002,
3539 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3540 },
3541 { &hf_map_application_parameter_data_parameter_mask_subject,
3542 { "Parameter Mask: Subject", "obex.parameter.value.parameter_mask.subject",
3543 FT_BOOLEAN, 32, NULL((void*)0), 0x00000001,
3544 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3545 },
3546 { &hf_map_application_parameter_data_folder_listing_size,
3547 { "Folder Listing Size", "obex.parameter.value.folder_listing_size",
3548 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0,
3549 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3550 },
3551 { &hf_map_application_parameter_data_messages_listing_size,
3552 { "Messages Listing Size", "obex.parameter.value.messages_listing_size",
3553 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0,
3554 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3555 },
3556 { &hf_map_application_parameter_data_subject_length,
3557 { "Subject Length", "obex.parameter.value.subject_length",
3558 FT_UINT8, BASE_DEC_HEX, NULL((void*)0), 0,
3559 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3560 },
3561 { &hf_map_application_parameter_data_charset,
3562 { "Charset", "obex.parameter.value.charset",
3563 FT_UINT8, BASE_HEX, VALS(map_charset_vals)((0 ? (const struct _value_string*)0 : ((map_charset_vals)))), 0x01,
3564 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3565 },
3566 { &hf_map_application_parameter_data_fraction_request,
3567 { "Fraction Request", "obex.parameter.value.fraction_request",
3568 FT_UINT8, BASE_HEX, VALS(map_fraction_request_vals)((0 ? (const struct _value_string*)0 : ((map_fraction_request_vals
))))
, 0x01,
3569 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3570 },
3571 { &hf_map_application_parameter_data_fraction_deliver,
3572 { "Fraction Deliver", "obex.parameter.value.fraction_deliver",
3573 FT_UINT8, BASE_HEX, VALS(map_fraction_deliver_vals)((0 ? (const struct _value_string*)0 : ((map_fraction_deliver_vals
))))
, 0x01,
3574 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3575 },
3576 { &hf_map_application_parameter_data_status_indicator,
3577 { "Status Indicator", "obex.parameter.value.status_indicator",
3578 FT_UINT8, BASE_HEX, VALS(map_status_indicator_vals)((0 ? (const struct _value_string*)0 : ((map_status_indicator_vals
))))
, 0x01,
3579 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3580 },
3581 { &hf_map_application_parameter_data_status_value,
3582 { "Status Value", "obex.parameter.value.status_value",
3583 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3584 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3585 },
3586 { &hf_map_application_parameter_data_mse_time,
3587 { "MSE Time", "obex.parameter.value.mse_time",
3588 FT_STRING, BASE_NONE, NULL((void*)0), 0,
3589 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3590 },
3591 /* application parameters for GPP */
3592 { &hf_gpp_application_parameter_id,
3593 { "Parameter Id", "obex.parameter.gpp.id",
3594 FT_UINT8, BASE_HEX, VALS(gpp_application_parameters_vals)((0 ? (const struct _value_string*)0 : ((gpp_application_parameters_vals
))))
, 0x00,
3595 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3596 },
3597 { &hf_gpp_application_parameter_data_max_list_count,
3598 { "Max List Count", "obex.parameter.gpp.value.max_list_count",
3599 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3600 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3601 },
3602 { &hf_gpp_application_parameter_data_list_start_offset,
3603 { "List Start Offset", "obex.parameter.gpp.value.list_start_offset",
3604 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3605 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3606 },
3607 { &hf_gpp_application_parameter_data_reserved_7,
3608 { "Reserved", "obex.parameter.gpp.value.reserved",
3609 FT_UINT8, BASE_HEX, NULL((void*)0), 0xFE,
3610 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3611 },
3612 { &hf_gpp_application_parameter_data_notification_status,
3613 { "Notification Status", "obex.parameter.gpp.value.notification_status",
3614 FT_BOOLEAN, 8, NULL((void*)0), 0x01,
3615 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3616 },
3617 { &hf_gpp_application_parameter_data_instance_id,
3618 { "Instance ID", "obex.parameter.gpp.value.instance_id",
3619 FT_UINT8, BASE_DEC_HEX, NULL((void*)0), 0,
3620 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3621 },
3622 { &hf_gpp_application_parameter_data_listing_size,
3623 { "Listing Size", "obex.parameter.gpp.value.listing_size",
3624 FT_UINT16, BASE_DEC_HEX, NULL((void*)0), 0x00,
3625 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3626 },
3627 /* application parameters for CTN */
3628 { &hf_ctn_application_parameter_id,
3629 { "Parameter Id", "obex.parameter.ctn.id",
3630 FT_UINT8, BASE_HEX, VALS(ctn_application_parameters_vals)((0 ? (const struct _value_string*)0 : ((ctn_application_parameters_vals
))))
, 0x00,
3631 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3632 },
3633 { &hf_ctn_application_parameter_data_acoustic_alarm_status,
3634 { "Acoustic Alarm Status", "obex.parameter.ctn.acoustic_alarm_status",
3635 FT_UINT8, BASE_HEX, VALS(off_on_vals)((0 ? (const struct _value_string*)0 : ((off_on_vals)))), 0x00,
3636 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3637 },
3638 { &hf_ctn_application_parameter_data_attachment,
3639 { "Attachment", "obex.parameter.ctn.attachment",
3640 FT_UINT8, BASE_HEX, VALS(ctn_application_parameter_data_attachment_vals)((0 ? (const struct _value_string*)0 : ((ctn_application_parameter_data_attachment_vals
))))
, 0x00,
3641 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3642 },
3643 { &hf_ctn_application_parameter_data_send,
3644 { "Attachment", "obex.parameter.ctn.attachment",
3645 FT_UINT8, BASE_HEX, VALS(no_yes_vals)((0 ? (const struct _value_string*)0 : ((no_yes_vals)))), 0x00,
3646 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3647 },
3648 { &hf_ctn_application_parameter_data_filter_period_begin,
3649 { "Filter Period Begin", "obex.parameter.ctn.filter_period_begin",
3650 FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
3651 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3652 },
3653 { &hf_ctn_application_parameter_data_filter_period_end,
3654 { "Filter Period End", "obex.parameter.ctn.filter_period_end",
3655 FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
3656 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3657 },
3658 { &hf_ctn_application_parameter_data_parameter_mask,
3659 { "Parameter Mask", "obex.parameter.ctn.parameter_mask",
3660 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00,
3661 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3662 },
3663 { &hf_ctn_application_parameter_data_parameter_mask_reserved,
3664 { "Reserved", "obex.parameter.ctn.parameter_mask.reserved",
3665 FT_UINT32, BASE_HEX, NULL((void*)0), 0xFFFFFC00,
3666 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3667 },
3668 { &hf_ctn_application_parameter_data_parameter_mask_recurrent,
3669 { "Recurrent", "obex.parameter.ctn.parameter_mask.recurrent",
3670 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000200,
3671 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3672 },
3673 { &hf_ctn_application_parameter_data_parameter_mask_send_status,
3674 { "Send Status", "obex.parameter.ctn.parameter_mask.send_status",
3675 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000100,
3676 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3677 },
3678 { &hf_ctn_application_parameter_data_parameter_mask_alarm_status,
3679 { "Alarm Status", "obex.parameter.ctn.parameter_mask.alarm_status",
3680 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000080,
3681 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3682 },
3683 { &hf_ctn_application_parameter_data_parameter_mask_pstatus,
3684 { "pStatus", "obex.parameter.ctn.parameter_mask.pstatus",
3685 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000040,
3686 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3687 },
3688 { &hf_ctn_application_parameter_data_parameter_mask_priority,
3689 { "Priority", "obex.parameter.ctn.parameter_mask.priority",
3690 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000020,
3691 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3692 },
3693 { &hf_ctn_application_parameter_data_parameter_mask_originator_address,
3694 { "Originator Address", "obex.parameter.ctn.parameter_mask.originator_address",
3695 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000010,
3696 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3697 },
3698 { &hf_ctn_application_parameter_data_parameter_mask_originator_name,
3699 { "Originator Name", "obex.parameter.ctn.parameter_mask.originator_name",
3700 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000008,
3701 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3702 },
3703 { &hf_ctn_application_parameter_data_parameter_mask_end_time,
3704 { "End Time", "obex.parameter.ctn.parameter_mask.end_time",
3705 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000004,
3706 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3707 },
3708 { &hf_ctn_application_parameter_data_parameter_mask_summary,
3709 { "Summary", "obex.parameter.ctn.parameter_mask.summary",
3710 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000002,
3711 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3712 },
3713 { &hf_ctn_application_parameter_data_parameter_mask_attachment,
3714 { "Attachment", "obex.parameter.ctn.parameter_mask.attachment",
3715 FT_UINT32, BASE_HEX, NULL((void*)0), 0x00000001,
3716 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3717 },
3718 { &hf_ctn_application_parameter_data_status_indicator,
3719 { "Status Indicator", "obex.parameter.ctn.status_indicator",
3720 FT_UINT8, BASE_HEX, VALS(ctn_application_parameter_data_status_indicator_vals)((0 ? (const struct _value_string*)0 : ((ctn_application_parameter_data_status_indicator_vals
))))
, 0x00,
3721 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3722 },
3723 { &hf_ctn_application_parameter_data_status_value,
3724 { "Status Value", "obex.parameter.ctn.status_value",
3725 FT_UINT8, BASE_HEX, VALS(ctn_application_parameter_data_status_value_vals)((0 ? (const struct _value_string*)0 : ((ctn_application_parameter_data_status_value_vals
))))
, 0x00,
3726 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3727 },
3728 { &hf_ctn_application_parameter_data_postpone_val,
3729 { "Postpone Val", "obex.parameter.ctn.postpone_val",
3730 FT_UINT32, BASE_DEC, NULL((void*)0), 0x00,
3731 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3732 },
3733 { &hf_ctn_application_parameter_data_email_uri,
3734 { "Email URI", "obex.parameter.ctn.email_uri",
3735 FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
3736 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3737 },
3738 { &hf_ctn_application_parameter_data_cse_time,
3739 { "CSE Time", "obex.parameter.ctn.cse_time",
3740 FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
3741 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3742 },
3743 { &hf_ctn_application_parameter_data_recurrent,
3744 { "Recurrent", "obex.parameter.ctn.recurrent",
3745 FT_UINT8, BASE_HEX, VALS(no_yes_vals)((0 ? (const struct _value_string*)0 : ((no_yes_vals)))), 0x00,
3746 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3747 },
3748 { &hf_ctn_application_parameter_data_attach_id,
3749 { "Attach ID", "obex.parameter.ctn.attach_id",
3750 FT_UINT8, BASE_DEC, NULL((void*)0), 0x00,
3751 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3752 },
3753 { &hf_ctn_application_parameter_data_last_update,
3754 { "Last Update", "obex.parameter.ctn.last_update",
3755 FT_STRING, BASE_NONE, NULL((void*)0), 0x00,
3756 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3757 },
3758 /* for fragmentation */
3759 { &hf_obex_fragment_overlap,
3760 { "Fragment overlap", "obex.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
3761 "Fragment overlaps with other fragments", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3762 },
3763 { &hf_obex_fragment_overlap_conflict,
3764 { "Conflicting data in fragment overlap", "obex.fragment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
3765 "Overlapping fragments contained conflicting data", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3766 },
3767 { &hf_obex_fragment_multiple_tails,
3768 { "Multiple tail fragments found", "obex.fragment.multipletails", FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
3769 "Several tails were found when defragmenting the packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3770 },
3771 { &hf_obex_fragment_too_long_fragment,
3772 { "Fragment too long", "obex.fragment.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL((void*)0), 0x0,
3773 "Fragment contained data past end of packet", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3774 },
3775 { &hf_obex_fragment_error,
3776 { "Defragmentation error", "obex.fragment.error", FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0,
3777 "Defragmentation error due to illegal fragments", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3778 },
3779 { &hf_obex_fragment_count,
3780 { "Fragment count", "obex.fragment.count", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
3781 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3782 },
3783 { &hf_obex_fragment,
3784 { "OBEX Fragment", "obex.fragment", FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0,
3785 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3786 },
3787 { &hf_obex_fragments,
3788 { "OBEX Fragments", "obex.fragments", FT_NONE, BASE_NONE, NULL((void*)0), 0x0,
3789 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3790 },
3791 { &hf_obex_reassembled_in,
3792 { "Reassembled OBEX in frame", "obex.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL((void*)0), 0x0,
3793 "This OBEX frame is reassembled in this frame", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3794 },
3795 { &hf_obex_reassembled_length,
3796 { "Reassembled OBEX length", "obex.reassembled.length", FT_UINT32, BASE_DEC, NULL((void*)0), 0x0,
3797 "The total length of the reassembled payload", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3798 },
3799 { &hf_profile,
3800 { "Profile", "obex.profile", FT_UINT32, BASE_DEC | BASE_EXT_STRING0x00000200, &profile_vals_ext, 0x0,
3801 "Bluetooth Profile used in this OBEX session", HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3802 },
3803 { &hf_type,
3804 { "Type", "obex.type", FT_STRINGZ, BASE_NONE, NULL((void*)0), 0x0,
3805 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3806 },
3807 { &hf_object_class,
3808 { "Object Class", "obex.object_class", FT_STRINGZ, BASE_NONE, NULL((void*)0), 0x0,
3809 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3810 },
3811 { &hf_time_iso8601,
3812 { "Time", "obex.time", FT_STRINGZ, BASE_NONE, NULL((void*)0), 0x0,
3813 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3814 },
3815 { &hf_hdr_val_action,
3816 { "Action", "obex.action", FT_UINT8, BASE_DEC, VALS(action_vals)((0 ? (const struct _value_string*)0 : ((action_vals)))), 0x0,
3817 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3818 },
3819 { &hf_hdr_val_single_response_mode,
3820 { "Single Response Mode", "obex.single_response_mode", FT_UINT8, BASE_DEC, VALS(single_response_mode_vals)((0 ? (const struct _value_string*)0 : ((single_response_mode_vals
))))
, 0x0,
3821 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3822 },
3823 { &hf_hdr_val_single_response_mode_parameter,
3824 { "Single Response Mode Parameter", "obex.single_response_mode_parameter", FT_UINT8, BASE_DEC, VALS(single_response_mode_parameter_vals)((0 ? (const struct _value_string*)0 : ((single_response_mode_parameter_vals
))))
, 0x0,
3825 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3826 },
3827 { &hf_wan_uuid,
3828 { "WAN UUID", "obex.wan_uuid",
3829 FT_UINT16, BASE_HEX, NULL((void*)0), 0x00,
3830 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3831 },
3832 { &hf_sender_bd_addr,
3833 { "Sender Address", "obex.sender_bd_addr",
3834 FT_ETHER, BASE_NONE, NULL((void*)0), 0x0,
3835 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3836 },
3837 { &hf_name,
3838 { "Name", "obex.name",
3839 FT_STRING, BASE_NONE, NULL((void*)0), 0,
3840 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3841 },
3842 { &hf_current_path,
3843 { "Current Path", "obex.current_path",
3844 FT_STRINGZ, BASE_NONE, NULL((void*)0), 0,
3845 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0) }
3846 },
3847 { &hf_request_in_frame,
3848 { "Request in Frame", "obex.request_in_frame", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST)((gpointer) (glong) (FT_FRAMENUM_REQUEST)), 0x0,
3849 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3850 },
3851 { &hf_response_in_frame,
3852 { "Response in Frame", "obex.response_in_frame", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE)((gpointer) (glong) (FT_FRAMENUM_RESPONSE)), 0x0,
3853 NULL((void*)0), HFILL-1, 0, HF_REF_TYPE_NONE, -1, ((void*)0)}
3854 }
3855 };
3856
3857 /* Setup protocol subtree array */
3858 static int *ett[] = {
3859 &ett_obex,
3860 &ett_obex_hdrs,
3861 &ett_obex_hdr,
3862 &ett_obex_hdr_id,
3863 &ett_obex_filter,
3864 &ett_obex_parameter,
3865 &ett_obex_fragment,
3866 &ett_obex_fragments,
3867 &ett_obex_session_parameters,
3868 &ett_obex_application_parameters,
3869 &ett_obex_authentication_parameters
3870 };
3871
3872 static ei_register_info ei[] = {
3873 { &ei_application_parameter_length_bad, { "obex.parameter.length.bad", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Parameter length bad", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
3874 { &ei_unexpected_data, { "obex.expert.unexpected_data", PI_PROTOCOL0x09000000, PI_WARN0x00600000, "Unexpected data", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
3875 { &ei_decoded_as_profile, { "obex.expert.decoded_as.profile", PI_PROTOCOL0x09000000, PI_NOTE0x00400000, "Decoded As", EXPFILL0, ((void*)0), 0, ((void*)0), {0, {((void*)0), ((void*)0), FT_NONE
, BASE_NONE, ((void*)0), 0, ((void*)0), -1, 0, HF_REF_TYPE_NONE
, -1, ((void*)0)}}
}},
3876 };
3877
3878 /* Decode As handling */
3879 static build_valid_func obex_profile_da_build_value[1] = {obex_profile_value};
3880 static decode_as_value_t obex_profile_da_values = {obex_profile_prompt, 1, obex_profile_da_build_value};
3881 static decode_as_t obex_profile_da = {"obex", "obex.profile", 1, 0, &obex_profile_da_values, NULL((void*)0), NULL((void*)0),
3882 decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL((void*)0), NULL((void*)0), NULL((void*)0) };
3883
3884 static build_valid_func media_type_da_build_value[1] = {media_type_value};
3885 static decode_as_value_t media_type_da_values = {media_type_prompt, 1, media_type_da_build_value};
3886 static decode_as_t media_type_da = {"obex", "media_type",
3887 1, 0, &media_type_da_values, NULL((void*)0), NULL((void*)0),
3888 decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL((void*)0), NULL((void*)0), NULL((void*)0) };
3889
3890
3891 obex_path = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
3892 obex_profile = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
3893 obex_last_opcode = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
3894 obex_fragment = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
3895
3896 proto_obex = proto_register_protocol("OBEX Protocol", "OBEX", "obex");
3897
3898 obex_handle = register_dissector("obex", dissect_obex, proto_obex);
3899
3900 obex_profile_table = register_dissector_table("obex.profile", "OBEX Profile", proto_obex, FT_UINT8, BASE_DEC);
3901
3902 /* Required function calls to register the header fields and subtrees used */
3903 proto_register_field_array(proto_obex, hf, array_length(hf)(sizeof (hf) / sizeof (hf)[0]));
3904 proto_register_subtree_array(ett, array_length(ett)(sizeof (ett) / sizeof (ett)[0]));
3905 expert_obex = expert_register_protocol(proto_obex);
3906 expert_register_field_array(expert_obex, ei, array_length(ei)(sizeof (ei) / sizeof (ei)[0]));
3907
3908 reassembly_table_register(&obex_reassembly_table,
3909 &addresses_reassembly_table_functions);
3910
3911 register_decode_as(&obex_profile_da);
3912
3913 proto_raw = proto_register_protocol("OBEX Raw Application Parameters", "Raw Application Parameters", "obex.parameter.raw");
3914 raw_application_parameters_handle = register_dissector("obex.parameter.raw", dissect_obex_application_parameter_raw, proto_raw);
3915
3916 proto_bpp = proto_register_protocol("Bluetooth OBEX BPP Application Parameters", "BT BPP Application Parameters", "obex.parameter.bt.bpp");
3917 bt_bpp_application_parameters_handle = register_dissector("obex.parameter.bt.bpp", dissect_obex_application_parameter_bt_bpp, proto_bpp);
3918
3919 proto_bip = proto_register_protocol("Bluetooth OBEX BIP Application Parameters", "BT BIP Application Parameters", "obex.parameter.bt.bip");
3920 bt_bip_application_parameters_handle = register_dissector("obex.parameter.bt.bip", dissect_obex_application_parameter_bt_bip, proto_bip);
3921
3922 proto_map = proto_register_protocol("Bluetooth OBEX MAP Application Parameters", "BT MAP Application Parameters", "obex.parameter.bt.map");
3923 bt_map_application_parameters_handle = register_dissector("obex.parameter.bt.map", dissect_obex_application_parameter_bt_map, proto_map);
3924
3925 proto_bt_gpp = proto_register_protocol("Bluetooth OBEX GPP Application Parameters", "BT GPP Application Parameters", "obex.parameter.bt.gpp");
3926 bt_gpp_application_parameters_handle = register_dissector("obex.parameter.bt.gpp", dissect_obex_application_parameter_bt_gpp, proto_bt_gpp);
3927
3928 proto_bt_ctn = proto_register_protocol("Bluetooth OBEX CTN Application Parameters", "BT CTN Application Parameters", "obex.parameter.bt.ctn");
3929 bt_ctn_application_parameters_handle = register_dissector("obex.parameter.bt.ctn", dissect_obex_application_parameter_bt_ctn, proto_bt_ctn);
3930
3931 proto_bt_pbap = proto_register_protocol("Bluetooth OBEX PBAP Application Parameters", "BT PBAP Application Parameters", "obex.parameter.bt.pbap");
3932 bt_pbap_application_parameters_handle = register_dissector("obex.parameter.bt.pbap", dissect_obex_application_parameter_bt_pbap, proto_bt_pbap);
3933
3934 register_decode_as(&media_type_da);
3935
3936 module = prefs_register_protocol(proto_obex, NULL((void*)0));
3937 prefs_register_static_text_preference(module, "supported_bluetooth_profiles",
3938 "Protocol OBEX support Bluetooth profiles: AVRCP 1.6, BIP 1.2, BPP 1.2, CTN 1.0, FTP 1.3, GOEP 1.3, GPP 1.0, MAP 1.2, OPP 1.2, PBAP 1.2, SYNCH 1.2",
3939 "Versions of Bluetooth profiles supported by this dissector.");
3940}
3941
3942void
3943proto_reg_handoff_obex(void)
3944{
3945 dissector_add_string("bluetooth.uuid", "1104", obex_handle);
3946 dissector_add_string("bluetooth.uuid", "1105", obex_handle);
3947 dissector_add_string("bluetooth.uuid", "1106", obex_handle);
3948 dissector_add_string("bluetooth.uuid", "1107", obex_handle);
3949 dissector_add_string("bluetooth.uuid", "1118", obex_handle);
3950 dissector_add_string("bluetooth.uuid", "1119", obex_handle);
3951 dissector_add_string("bluetooth.uuid", "111a", obex_handle);
3952 dissector_add_string("bluetooth.uuid", "111b", obex_handle);
3953 dissector_add_string("bluetooth.uuid", "111c", obex_handle);
3954 dissector_add_string("bluetooth.uuid", "111d", obex_handle);
3955 dissector_add_string("bluetooth.uuid", "1120", obex_handle);
3956 dissector_add_string("bluetooth.uuid", "1121", obex_handle);
3957 dissector_add_string("bluetooth.uuid", "1122", obex_handle);
3958 dissector_add_string("bluetooth.uuid", "1123", obex_handle);
3959 dissector_add_string("bluetooth.uuid", "112e", obex_handle);
3960 dissector_add_string("bluetooth.uuid", "112f", obex_handle);
3961 dissector_add_string("bluetooth.uuid", "1130", obex_handle);
3962 dissector_add_string("bluetooth.uuid", "1132", obex_handle);
3963 dissector_add_string("bluetooth.uuid", "1133", obex_handle);
3964 dissector_add_string("bluetooth.uuid", "1134", obex_handle);
3965
3966 http_handle = find_dissector_add_dependency("http", proto_obex);
3967 xml_handle = find_dissector_add_dependency("xml", proto_obex);
3968 data_handle = find_dissector("data");
3969 data_text_lines_handle = find_dissector("data-text-lines");
3970
3971 proto_btavrcp = proto_get_id_by_filter_name("btavrcp");
3972
3973 dissector_add_uint("obex.profile", PROFILE_UNKNOWN0, raw_application_parameters_handle);
3974 dissector_add_uint("obex.profile", PROFILE_BPP7, bt_bpp_application_parameters_handle);
3975 dissector_add_uint("obex.profile", PROFILE_BIP6, bt_bip_application_parameters_handle);
3976 dissector_add_uint("obex.profile", PROFILE_CTN9, bt_ctn_application_parameters_handle);
3977 dissector_add_uint("obex.profile", PROFILE_GPP10, bt_gpp_application_parameters_handle);
3978 dissector_add_uint("obex.profile", PROFILE_MAP5, bt_map_application_parameters_handle);
3979 dissector_add_uint("obex.profile", PROFILE_PBAP4, bt_pbap_application_parameters_handle);
3980
3981 dissector_add_uint("obex.profile", PROFILE_OPP1, raw_application_parameters_handle);
3982 dissector_add_uint("obex.profile", PROFILE_FTP2, raw_application_parameters_handle);
3983 dissector_add_uint("obex.profile", PROFILE_SYNCML3, raw_application_parameters_handle);
3984 dissector_add_uint("obex.profile", PROFILE_SYNC8, raw_application_parameters_handle);
3985
3986 dissector_add_for_decode_as("btrfcomm.dlci", obex_handle);
3987 dissector_add_for_decode_as("btl2cap.psm", obex_handle);
3988 dissector_add_for_decode_as("btl2cap.cid", obex_handle);
3989
3990 /* PBAP */
3991 dissector_add_string("media_type", "x-bt/phonebook", data_text_lines_handle);
3992 dissector_add_string("media_type", "x-bt/vcard", data_text_lines_handle);
3993 dissector_add_string("media_type", "x-bt/vcard-listing", xml_handle);
3994 /* MAP */
3995 dissector_add_string("media_type", "x-bt/message", data_text_lines_handle);
3996 dissector_add_string("media_type", "x-bt/messageStatus", data_text_lines_handle);
3997 dissector_add_string("media_type", "x-bt/MAP-messageUpdate", data_text_lines_handle);
3998 dissector_add_string("media_type", "x-bt/MAP-NotificationRegistration", data_text_lines_handle);
3999 dissector_add_string("media_type", "x-bt/MASInstanceInformation", data_text_lines_handle);
4000 dissector_add_string("media_type", "x-bt/MAP-msg-listing", xml_handle);
4001 dissector_add_string("media_type", "x-bt/MAP-event-report", xml_handle);
4002 dissector_add_string("media_type", "x-obex/folder-listing", xml_handle);
4003 /* CTN */
4004 dissector_add_string("media_type", "x-bt/CTN-EventReport", xml_handle);
4005 dissector_add_string("media_type", "x-bt/CTN-Listing", xml_handle);
4006 dissector_add_string("media_type", "x-bt/CTN-NotificationRegistration", data_text_lines_handle);
4007 dissector_add_string("media_type", "x-bt/Calendar", data_text_lines_handle);
4008 dissector_add_string("media_type", "x-bt/CalendarStatus", data_text_lines_handle);
4009 dissector_add_string("media_type", "x-bt/CTN-forward", data_text_lines_handle);
4010 dissector_add_string("media_type", "x-bt/InstanceDescription", data_text_lines_handle);
4011 dissector_add_string("media_type", "x-bt/Update", data_text_lines_handle);
4012 /* BPP */
4013 dissector_add_string("media_type", "text/x-ref-simple", data_text_lines_handle);
4014 dissector_add_string("media_type", "text/x-ref-list", data_text_lines_handle);
4015 dissector_add_string("media_type", "x-obex/RUI", data_text_lines_handle);
4016 dissector_add_string("media_type", "x-obex/bt-SOAP", xml_handle);
4017 /* BIP */
4018 dissector_add_string("media_type", "x-bt/img-listing", xml_handle);
4019 dissector_add_string("media_type", "x-bt/img-properties", xml_handle);
4020 dissector_add_string("media_type", "x-bt/img-capabilities", xml_handle);
4021 dissector_add_string("media_type", "x-bt/img-print", data_text_lines_handle);
4022 dissector_add_string("media_type", "x-bt/img-img", data_handle);
4023 dissector_add_string("media_type", "x-bt/img-thm", data_handle);
4024 dissector_add_string("media_type", "x-bt/img-attachment", data_handle);
4025 dissector_add_string("media_type", "x-bt/img-display", data_handle);
4026 dissector_add_string("media_type", "x-bt/img-partial", data_handle);
4027 dissector_add_string("media_type", "x-bt/img-archive", data_handle);
4028 dissector_add_string("media_type", "x-bt/img-status", data_handle);
4029 dissector_add_string("media_type", "x-bt/img-monitoring", data_handle);
4030
4031 media_type_dissector_table = find_dissector_table("media_type");
4032
4033 dissector_add_for_decode_as("usb.product", obex_handle);
4034 dissector_add_for_decode_as("usb.device", obex_handle);
4035 dissector_add_for_decode_as("usb.protocol", obex_handle);
4036 dissector_add_for_decode_as_with_preference("tcp.port", obex_handle);
4037 dissector_add_for_decode_as_with_preference("udp.port", obex_handle);
4038}
4039
4040/*
4041 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4042 *
4043 * Local variables:
4044 * c-basic-offset: 4
4045 * tab-width: 8
4046 * indent-tabs-mode: nil
4047 * End:
4048 *
4049 * vi: set shiftwidth=4 tabstop=8 expandtab:
4050 * :indentSize=4:tabSize=8:noTabs=true:
4051 */