### Bug Summary

File: | builds/wireshark/wireshark/epan/dissectors/packet-obex.c
Warning: | line 1096, column 100 Subtraction of a non-null pointer (from variable 'i_path') and a null pointer (from variable 'current_path') results in undefined behavior

### Annotated Source Code

Press '?' to see keyboard shortcuts

Show analyzer invocation
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-08-26-100403-3659-1 -x c /builds/wireshark/wireshark/epan/dissectors/packet-obex.c

Keyboard shortcuts:

- Use 'j/k' keys for keyboard navigation
- Use 'Shift+S' to show/hide relevant lines
- Use '?' to toggle this window

Close
Show only relevant lines Show control flow arrows

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