### Bug Summary

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