Bug Summary

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

Annotated Source Code

Press '?' to see keyboard shortcuts

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