Bug Summary

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