2016-01-27 12:01:49 +00:00
|
|
|
/* packet-obex.c
|
|
|
|
* Routines for OBEX dissection
|
2010-05-19 12:44:57 +00:00
|
|
|
*
|
2011-01-02 08:13:40 +00:00
|
|
|
* Copyright 2010, Allan M. Madsen
|
2013-02-11 15:04:53 +00:00
|
|
|
* Copyright 2013, Michal Labedzki for Tieto Corporation
|
2010-05-19 12:44:57 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 23:18:38 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2010-05-19 12:44:57 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2010-05-19 12:44:57 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2015-03-24 18:37:05 +00:00
|
|
|
#include <epan/prefs.h>
|
2010-05-19 12:44:57 +00:00
|
|
|
#include <epan/reassemble.h>
|
2013-02-11 15:04:53 +00:00
|
|
|
#include <epan/expert.h>
|
2014-08-25 13:46:54 +00:00
|
|
|
#include <epan/decode_as.h>
|
2016-01-25 01:10:20 +00:00
|
|
|
#include <epan/proto_data.h>
|
2014-12-12 10:24:44 +00:00
|
|
|
#include "packet-bluetooth.h"
|
2013-02-11 15:04:53 +00:00
|
|
|
#include "packet-btrfcomm.h"
|
2010-05-19 12:44:57 +00:00
|
|
|
#include "packet-btl2cap.h"
|
2011-01-02 08:13:40 +00:00
|
|
|
#include "packet-btsdp.h"
|
2010-05-19 12:44:57 +00:00
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
2016-01-27 12:01:49 +00:00
|
|
|
static int proto_obex = -1;
|
2010-05-19 12:44:57 +00:00
|
|
|
static int hf_opcode = -1;
|
|
|
|
static int hf_response_code = -1;
|
|
|
|
static int hf_final_flag = -1;
|
|
|
|
static int hf_length = -1;
|
|
|
|
static int hf_version = -1;
|
|
|
|
static int hf_flags = -1;
|
|
|
|
static int hf_constants = -1;
|
|
|
|
static int hf_max_pkt_len = -1;
|
|
|
|
static int hf_set_path_flags_0 = -1;
|
|
|
|
static int hf_set_path_flags_1 = -1;
|
2013-10-26 02:24:04 +00:00
|
|
|
static int hf_headers = -1;
|
|
|
|
static int hf_header = -1;
|
2010-05-19 12:44:57 +00:00
|
|
|
static int hf_hdr_id = -1;
|
2015-03-20 14:37:59 +00:00
|
|
|
static int hf_hdr_id_encoding = -1;
|
|
|
|
static int hf_hdr_id_meaning = -1;
|
2010-05-19 12:44:57 +00:00
|
|
|
static int hf_hdr_length = -1;
|
|
|
|
static int hf_hdr_val_unicode = -1;
|
|
|
|
static int hf_hdr_val_byte_seq = -1;
|
|
|
|
static int hf_hdr_val_byte = -1;
|
|
|
|
static int hf_hdr_val_long = -1;
|
2015-03-24 18:37:05 +00:00
|
|
|
static int hf_authentication_parameter = -1;
|
|
|
|
static int hf_authentication_parameter_data = -1;
|
2013-11-23 21:41:08 +00:00
|
|
|
static int hf_authentication_challenge_tag = -1;
|
|
|
|
static int hf_authentication_response_tag = -1;
|
|
|
|
static int hf_authentication_key = -1;
|
|
|
|
static int hf_authentication_result_key = -1;
|
|
|
|
static int hf_authentication_user_id = -1;
|
|
|
|
static int hf_authentication_length = -1;
|
|
|
|
static int hf_authentication_info_charset = -1;
|
|
|
|
static int hf_authentication_info = -1;
|
|
|
|
static int hf_authentication_option_reserved = -1;
|
|
|
|
static int hf_authentication_option_user_id = -1;
|
|
|
|
static int hf_authentication_option_read_only = -1;
|
2013-10-26 02:24:04 +00:00
|
|
|
static int hf_application_parameter = -1;
|
2013-02-11 15:04:53 +00:00
|
|
|
static int hf_application_parameter_id = -1;
|
|
|
|
static int hf_application_parameter_length = -1;
|
|
|
|
static int hf_application_parameter_data = -1;
|
|
|
|
static int hf_bpp_application_parameter_id = -1;
|
|
|
|
static int hf_bpp_application_parameter_data_offset = -1;
|
|
|
|
static int hf_bpp_application_parameter_data_count = -1;
|
|
|
|
static int hf_bpp_application_parameter_data_job_id = -1;
|
|
|
|
static int hf_bpp_application_parameter_data_file_size = -1;
|
|
|
|
static int hf_bip_application_parameter_id = -1;
|
|
|
|
static int hf_bip_application_parameter_data_number_of_returned_handles = -1;
|
|
|
|
static int hf_bip_application_parameter_data_list_start_offset = -1;
|
|
|
|
static int hf_bip_application_parameter_data_latest_captured_images = -1;
|
|
|
|
static int hf_bip_application_parameter_data_partial_file_length = -1;
|
|
|
|
static int hf_bip_application_parameter_data_partial_file_start_offset = -1;
|
|
|
|
static int hf_bip_application_parameter_data_total_file_size = -1;
|
|
|
|
static int hf_bip_application_parameter_data_end_flag = -1;
|
|
|
|
static int hf_bip_application_parameter_data_remote_display = -1;
|
|
|
|
static int hf_bip_application_parameter_data_service_id = -1;
|
|
|
|
static int hf_bip_application_parameter_data_store_flag = -1;
|
|
|
|
static int hf_pbap_application_parameter_id = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_order = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_search_value = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_search_attribute = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_max_list_count = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_list_start_offset = -1;
|
2015-03-24 18:37:05 +00:00
|
|
|
static int hf_pbap_application_parameter_data_filter = -1;
|
|
|
|
static int hf_pbap_application_parameter_vcard_selector = -1;
|
2013-02-11 15:04:53 +00:00
|
|
|
static int hf_pbap_application_parameter_data_filter_version = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_fn = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_n = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_photo = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_birthday = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_adr = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_label = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_tel = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_email = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_mailer = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_time_zone = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_geographic_position = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_title = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_role = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_logo = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_agent = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_name_of_organization = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_comments = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_revision = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_pronunciation_of_name = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_url = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_uid = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_key = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_nickname = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_categories = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_product_id = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_class = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_sort_string = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_timestamp = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_reserved_29_31 = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_reserved_32_38 = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_proprietary_filter = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_filter_reserved_for_proprietary_filter_usage = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_format = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_phonebook_size = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_new_missed_calls = -1;
|
2015-03-24 18:37:05 +00:00
|
|
|
static int hf_pbap_application_parameter_data_primary_version_counter = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_secondary_version_counter = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_database_identifier = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_vcard_selector_operator = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_reset_new_missed_calls = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_reserved = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_download = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_browsing = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_database_identifier = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_folder_version_counters = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_vcard_selecting = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_enhanced_missed_calls = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_x_bt_uci_vcard_property = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_x_bt_uid_vcard_property = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_contact_referencing = -1;
|
|
|
|
static int hf_pbap_application_parameter_data_supported_features_default_contact_image_format = -1;
|
2013-02-11 15:04:53 +00:00
|
|
|
static int hf_map_application_parameter_id = -1;
|
|
|
|
static int hf_map_application_parameter_data_max_list_count = -1;
|
|
|
|
static int hf_map_application_parameter_data_start_offset = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_message_type_reserved = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_message_type_mms = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_message_type_email = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_message_type_sms_cdma = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_message_type_sms_gsm = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_period_begin = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_period_end = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_read_status_reserved_6 = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_read_status_get_read = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_read_status_get_unread = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_recipient = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_originator = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_priority_reserved_6 = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_priority_get_high = -1;
|
|
|
|
static int hf_map_application_parameter_data_filter_priority_non_high = -1;
|
|
|
|
static int hf_map_application_parameter_data_reserved_7 = -1;
|
|
|
|
static int hf_map_application_parameter_data_attachment = -1;
|
|
|
|
static int hf_map_application_parameter_data_transparent = -1;
|
|
|
|
static int hf_map_application_parameter_data_retry = -1;
|
|
|
|
static int hf_map_application_parameter_data_new_message = -1;
|
|
|
|
static int hf_map_application_parameter_data_notification_status = -1;
|
|
|
|
static int hf_map_application_parameter_data_mas_instance_id = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_reserved = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_reply_to_addressing = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_protected = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_sent = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_read = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_priority = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_attachment_size = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_text = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_reception_status = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_size = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_type = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_recipient_addressing = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_recipient_name = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_sender_addressing = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_sender_name = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_datetime = -1;
|
|
|
|
static int hf_map_application_parameter_data_parameter_mask_subject = -1;
|
|
|
|
static int hf_map_application_parameter_data_folder_listing_size = -1;
|
|
|
|
static int hf_map_application_parameter_data_messages_listing_size = -1;
|
|
|
|
static int hf_map_application_parameter_data_subject_length = -1;
|
|
|
|
static int hf_map_application_parameter_data_charset = -1;
|
|
|
|
static int hf_map_application_parameter_data_fraction_request = -1;
|
|
|
|
static int hf_map_application_parameter_data_fraction_deliver = -1;
|
|
|
|
static int hf_map_application_parameter_data_status_indicator = -1;
|
|
|
|
static int hf_map_application_parameter_data_status_value = -1;
|
|
|
|
static int hf_map_application_parameter_data_mse_time = -1;
|
2015-03-24 18:37:05 +00:00
|
|
|
static int hf_gpp_application_parameter_id = -1;
|
|
|
|
static int hf_gpp_application_parameter_data_max_list_count = -1;
|
|
|
|
static int hf_gpp_application_parameter_data_list_start_offset = -1;
|
|
|
|
static int hf_gpp_application_parameter_data_reserved_7 = -1;
|
|
|
|
static int hf_gpp_application_parameter_data_notification_status = -1;
|
|
|
|
static int hf_gpp_application_parameter_data_instance_id = -1;
|
|
|
|
static int hf_gpp_application_parameter_data_listing_size = -1;
|
|
|
|
static int hf_ctn_application_parameter_id = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_acoustic_alarm_status = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_attachment = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_send = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_filter_period_begin = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_filter_period_end = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_reserved = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_recurrent = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_send_status = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_alarm_status = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_pstatus = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_priority = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_originator_address = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_originator_name = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_end_time = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_summary = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_parameter_mask_attachment = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_status_indicator = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_status_value = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_postpone_val = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_email_uri = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_cse_time = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_recurrent = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_attach_id = -1;
|
|
|
|
static int hf_ctn_application_parameter_data_last_update = -1;
|
2013-02-11 15:04:53 +00:00
|
|
|
static int hf_profile = -1;
|
2014-10-02 08:37:53 +00:00
|
|
|
static int hf_type = -1;
|
2015-03-24 18:37:05 +00:00
|
|
|
static int hf_object_class = -1;
|
|
|
|
static int hf_time_iso8601 = -1;
|
|
|
|
static int hf_wan_uuid = -1;
|
|
|
|
static int hf_hdr_val_action = -1;
|
|
|
|
static int hf_hdr_val_single_response_mode = -1;
|
|
|
|
static int hf_hdr_val_single_response_mode_parameter = -1;
|
|
|
|
static int hf_session_parameter = -1;
|
|
|
|
static int hf_session_parameter_tag = -1;
|
|
|
|
static int hf_session_parameter_length = -1;
|
|
|
|
static int hf_session_parameter_data = -1;
|
|
|
|
static int hf_session_parameter_nonce = -1;
|
|
|
|
static int hf_session_parameter_session_id = -1;
|
|
|
|
static int hf_session_parameter_next_sequence_number = -1;
|
|
|
|
static int hf_session_parameter_timeout = -1;
|
|
|
|
static int hf_session_parameter_opcode = -1;
|
|
|
|
static int hf_sender_bd_addr = -1;
|
|
|
|
static int hf_count = -1;
|
|
|
|
static int hf_data_length = -1;
|
|
|
|
static int hf_connection_id = -1;
|
|
|
|
static int hf_name = -1;
|
2015-04-05 11:57:53 +00:00
|
|
|
static int hf_current_path = -1;
|
2015-03-21 18:01:07 +00:00
|
|
|
static int hf_request_in_frame = -1;
|
|
|
|
static int hf_response_in_frame = -1;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-03-20 14:37:59 +00:00
|
|
|
static const int *hfx_hdr_id[] = {
|
|
|
|
&hf_hdr_id_encoding,
|
|
|
|
&hf_hdr_id_meaning,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
static const int *hfx_pbap_application_parameter_data_filter_1[] = {
|
|
|
|
&hf_pbap_application_parameter_data_filter_reserved_32_38,
|
|
|
|
&hf_pbap_application_parameter_data_filter_proprietary_filter,
|
|
|
|
&hf_pbap_application_parameter_data_filter_reserved_for_proprietary_filter_usage,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
static const int *hfx_pbap_application_parameter_data_filter_0[] = {
|
|
|
|
&hf_pbap_application_parameter_data_filter_version,
|
|
|
|
&hf_pbap_application_parameter_data_filter_fn,
|
|
|
|
&hf_pbap_application_parameter_data_filter_n,
|
|
|
|
&hf_pbap_application_parameter_data_filter_photo,
|
|
|
|
&hf_pbap_application_parameter_data_filter_birthday,
|
|
|
|
&hf_pbap_application_parameter_data_filter_adr,
|
|
|
|
&hf_pbap_application_parameter_data_filter_label,
|
|
|
|
&hf_pbap_application_parameter_data_filter_tel,
|
|
|
|
&hf_pbap_application_parameter_data_filter_email,
|
|
|
|
&hf_pbap_application_parameter_data_filter_mailer,
|
|
|
|
&hf_pbap_application_parameter_data_filter_time_zone,
|
|
|
|
&hf_pbap_application_parameter_data_filter_geographic_position,
|
|
|
|
&hf_pbap_application_parameter_data_filter_title,
|
|
|
|
&hf_pbap_application_parameter_data_filter_role,
|
|
|
|
&hf_pbap_application_parameter_data_filter_logo,
|
|
|
|
&hf_pbap_application_parameter_data_filter_agent,
|
|
|
|
&hf_pbap_application_parameter_data_filter_name_of_organization,
|
|
|
|
&hf_pbap_application_parameter_data_filter_comments,
|
|
|
|
&hf_pbap_application_parameter_data_filter_revision,
|
|
|
|
&hf_pbap_application_parameter_data_filter_pronunciation_of_name,
|
|
|
|
&hf_pbap_application_parameter_data_filter_url,
|
|
|
|
&hf_pbap_application_parameter_data_filter_uid,
|
|
|
|
&hf_pbap_application_parameter_data_filter_key,
|
|
|
|
&hf_pbap_application_parameter_data_filter_nickname,
|
|
|
|
&hf_pbap_application_parameter_data_filter_categories,
|
|
|
|
&hf_pbap_application_parameter_data_filter_product_id,
|
|
|
|
&hf_pbap_application_parameter_data_filter_class,
|
|
|
|
&hf_pbap_application_parameter_data_filter_sort_string,
|
|
|
|
&hf_pbap_application_parameter_data_filter_timestamp,
|
|
|
|
&hf_pbap_application_parameter_data_filter_reserved_29_31,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
static const int *hfx_pbap_application_parameter_data_supported_features[] = {
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_reserved,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_default_contact_image_format,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_contact_referencing,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_x_bt_uid_vcard_property,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_x_bt_uci_vcard_property,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_enhanced_missed_calls,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_vcard_selecting,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_folder_version_counters,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_database_identifier,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_browsing,
|
|
|
|
&hf_pbap_application_parameter_data_supported_features_download,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
static const int *hfx_ctn_application_parameter_data_parameter_mask[] = {
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_reserved,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_recurrent,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_send_status,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_alarm_status,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_pstatus,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_priority,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_originator_address,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_originator_name,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_end_time,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_summary,
|
|
|
|
&hf_ctn_application_parameter_data_parameter_mask_attachment,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2013-11-23 21:41:08 +00:00
|
|
|
static expert_field ei_unexpected_data = EI_INIT;
|
2014-08-25 13:46:54 +00:00
|
|
|
static expert_field ei_application_parameter_length_bad = EI_INIT;
|
|
|
|
static expert_field ei_decoded_as_profile = EI_INIT;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
static dissector_table_t obex_profile_table;
|
2015-04-19 17:08:13 +00:00
|
|
|
static dissector_table_t media_type_dissector_table;
|
2013-11-23 21:41:08 +00:00
|
|
|
|
2010-05-19 12:44:57 +00:00
|
|
|
|
|
|
|
/* ************************************************************************* */
|
|
|
|
/* Header values for reassembly */
|
|
|
|
/* ************************************************************************* */
|
2016-01-27 12:01:49 +00:00
|
|
|
static int hf_obex_fragments = -1;
|
|
|
|
static int hf_obex_fragment = -1;
|
|
|
|
static int hf_obex_fragment_overlap = -1;
|
|
|
|
static int hf_obex_fragment_overlap_conflict = -1;
|
|
|
|
static int hf_obex_fragment_multiple_tails = -1;
|
|
|
|
static int hf_obex_fragment_too_long_fragment = -1;
|
|
|
|
static int hf_obex_fragment_error = -1;
|
|
|
|
static int hf_obex_fragment_count = -1;
|
|
|
|
static int hf_obex_reassembled_in = -1;
|
|
|
|
static int hf_obex_reassembled_length = -1;
|
|
|
|
|
|
|
|
static gint ett_obex_fragment = -1;
|
|
|
|
static gint ett_obex_fragments = -1;
|
|
|
|
|
|
|
|
static dissector_handle_t obex_handle;
|
2014-08-25 13:46:54 +00:00
|
|
|
static dissector_handle_t raw_application_parameters_handle;
|
2016-01-27 12:01:49 +00:00
|
|
|
static dissector_handle_t bt_bpp_application_parameters_handle;
|
|
|
|
static dissector_handle_t bt_bip_application_parameters_handle;
|
|
|
|
static dissector_handle_t bt_gpp_application_parameters_handle;
|
|
|
|
static dissector_handle_t bt_ctn_application_parameters_handle;
|
|
|
|
static dissector_handle_t bt_map_application_parameters_handle;
|
|
|
|
static dissector_handle_t bt_pbap_application_parameters_handle;
|
|
|
|
|
|
|
|
static reassembly_table obex_reassembly_table;
|
|
|
|
|
|
|
|
static const fragment_items obex_frag_items = {
|
|
|
|
&ett_obex_fragment,
|
|
|
|
&ett_obex_fragments,
|
|
|
|
&hf_obex_fragments,
|
|
|
|
&hf_obex_fragment,
|
|
|
|
&hf_obex_fragment_overlap,
|
|
|
|
&hf_obex_fragment_overlap_conflict,
|
|
|
|
&hf_obex_fragment_multiple_tails,
|
|
|
|
&hf_obex_fragment_too_long_fragment,
|
|
|
|
&hf_obex_fragment_error,
|
|
|
|
&hf_obex_fragment_count,
|
|
|
|
&hf_obex_reassembled_in,
|
|
|
|
&hf_obex_reassembled_length,
|
2012-09-07 02:09:59 +00:00
|
|
|
/* Reassembled data field */
|
|
|
|
NULL,
|
2010-05-19 12:44:57 +00:00
|
|
|
"fragments"
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
2016-01-27 12:01:49 +00:00
|
|
|
static gint ett_obex = -1;
|
|
|
|
static gint ett_obex_hdrs = -1;
|
|
|
|
static gint ett_obex_hdr = -1;
|
|
|
|
static gint ett_obex_hdr_id = -1;
|
|
|
|
static gint ett_obex_filter = -1;
|
|
|
|
static gint ett_obex_parameter = -1;
|
|
|
|
static gint ett_obex_session_parameters = -1;
|
|
|
|
static gint ett_obex_application_parameters = -1;
|
|
|
|
static gint ett_obex_authentication_parameters = -1;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
static wmem_tree_t *obex_path = NULL;
|
2013-06-20 16:31:53 +00:00
|
|
|
static wmem_tree_t *obex_profile = NULL;
|
|
|
|
static wmem_tree_t *obex_last_opcode = NULL;
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
static dissector_handle_t http_handle;
|
2010-05-19 12:44:57 +00:00
|
|
|
static dissector_handle_t xml_handle;
|
|
|
|
static dissector_handle_t data_handle;
|
2015-04-19 17:08:13 +00:00
|
|
|
static dissector_handle_t data_text_lines_handle;
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
static const gchar *path_unknown = "?";
|
|
|
|
static const gchar *path_root = "/";
|
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
typedef struct _obex_proto_data_t {
|
|
|
|
guint32 interface_id;
|
|
|
|
guint32 adapter_id;
|
|
|
|
guint32 chandle;
|
|
|
|
guint32 channel;
|
|
|
|
} obex_proto_data_t;
|
|
|
|
|
2010-05-19 12:44:57 +00:00
|
|
|
typedef struct _ext_value_string {
|
2013-02-11 15:04:53 +00:00
|
|
|
guint8 value[16];
|
|
|
|
gint length;
|
2012-03-12 14:38:59 +00:00
|
|
|
const gchar *strptr;
|
2010-05-19 12:44:57 +00:00
|
|
|
} ext_value_string;
|
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
typedef struct _obex_path_data_t {
|
|
|
|
guint32 interface_id;
|
|
|
|
guint32 adapter_id;
|
2015-09-27 16:22:32 +00:00
|
|
|
guint32 chandle;
|
|
|
|
guint32 channel;
|
2015-04-05 11:57:53 +00:00
|
|
|
/* TODO: add OBEX ConnectionId */
|
|
|
|
|
|
|
|
const gchar *path;
|
|
|
|
} obex_path_data_t;
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
typedef struct _obex_profile_data_t {
|
2015-04-05 11:57:53 +00:00
|
|
|
guint32 interface_id;
|
|
|
|
guint32 adapter_id;
|
2015-09-27 16:22:32 +00:00
|
|
|
guint32 chandle;
|
|
|
|
guint32 channel;
|
2015-04-05 11:57:53 +00:00
|
|
|
/* TODO: add OBEX ConnectionId */
|
|
|
|
|
|
|
|
gint profile;
|
2013-02-11 15:04:53 +00:00
|
|
|
} obex_profile_data_t;
|
|
|
|
|
|
|
|
typedef struct _obex_last_opcode_data_t {
|
|
|
|
guint32 interface_id;
|
|
|
|
guint32 adapter_id;
|
2015-09-27 16:22:32 +00:00
|
|
|
guint32 chandle;
|
|
|
|
guint32 channel;
|
2015-04-05 11:57:53 +00:00
|
|
|
/* TODO: add OBEX ConnectionId */
|
2013-02-11 15:04:53 +00:00
|
|
|
gint code;
|
2015-03-21 18:01:07 +00:00
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
gboolean final_flag;
|
|
|
|
|
2015-03-21 18:01:07 +00:00
|
|
|
guint32 request_in_frame;
|
|
|
|
guint32 response_in_frame;
|
2015-04-05 11:57:53 +00:00
|
|
|
|
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
const gchar *name;
|
|
|
|
gboolean go_up;
|
|
|
|
} set_data;
|
2015-04-19 17:08:13 +00:00
|
|
|
struct {
|
|
|
|
gchar *type;
|
|
|
|
gchar *name;
|
|
|
|
} get_put;
|
2015-04-05 11:57:53 +00:00
|
|
|
} data;
|
2013-02-11 15:04:53 +00:00
|
|
|
} obex_last_opcode_data_t;
|
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
#define PROFILE_UNKNOWN 0
|
|
|
|
#define PROFILE_OPP 1
|
|
|
|
#define PROFILE_FTP 2
|
|
|
|
#define PROFILE_SYNCML 3
|
|
|
|
#define PROFILE_PBAP 4
|
|
|
|
#define PROFILE_MAP 5
|
|
|
|
#define PROFILE_BIP 6
|
|
|
|
#define PROFILE_BPP 7
|
|
|
|
#define PROFILE_SYNC 8
|
2015-03-24 18:37:05 +00:00
|
|
|
#define PROFILE_CTN 9
|
|
|
|
#define PROFILE_GPP 10
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
#define PROTO_DATA_MEDIA_TYPE 0x00
|
2016-01-27 12:01:49 +00:00
|
|
|
#define PROTO_DATA_OBEX_PROFILE 0x01
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
static const value_string profile_vals[] = {
|
|
|
|
{ PROFILE_UNKNOWN, "Unknown" },
|
|
|
|
{ PROFILE_OPP, "OPP" },
|
|
|
|
{ PROFILE_FTP, "FTP" },
|
|
|
|
{ PROFILE_SYNCML, "SyncML" },
|
|
|
|
{ PROFILE_PBAP, "PBAP" },
|
|
|
|
{ PROFILE_MAP, "MAP" },
|
|
|
|
{ PROFILE_BIP, "BIP" },
|
|
|
|
{ PROFILE_BPP, "BPP" },
|
|
|
|
{ PROFILE_SYNC, "SYNC" },
|
2015-03-24 18:37:05 +00:00
|
|
|
{ PROFILE_CTN, "CTN" },
|
|
|
|
{ PROFILE_GPP, "GPP" },
|
2013-02-11 15:04:53 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
static value_string_ext(profile_vals_ext) = VALUE_STRING_EXT_INIT(profile_vals);
|
|
|
|
|
|
|
|
|
2010-05-19 12:44:57 +00:00
|
|
|
static const ext_value_string target_vals[] = {
|
2013-02-11 15:04:53 +00:00
|
|
|
{ { 0xF9, 0xEC, 0x7B, 0xC4, 0x95, 0x3C, 0x11, 0xD2, 0x98, 0x4E, 0x52, 0x54, 0x00, 0xDC, 0x9E, 0x09 }, 16, "Folder Browsing" },
|
|
|
|
{ { 0x79, 0x61, 0x35, 0xf0, 0xf0, 0xc5, 0x11, 0xd8, 0x09, 0x66, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, "Phone Book Access Profile" },
|
|
|
|
{ { 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x02, 0xEE, 0x00, 0x00, 0x02 }, 16, "SyncML" },
|
|
|
|
{ { 0xE3, 0x3D, 0x95, 0x45, 0x83, 0x74, 0x4A, 0xD7, 0x9E, 0xC5, 0xC1, 0x6B, 0xE3, 0x1E, 0xDE, 0x8E }, 16, "Basic Imaging Profile - Push" },
|
|
|
|
{ { 0x8E, 0xE9, 0xB3, 0xD0, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Pull" },
|
|
|
|
{ { 0x92, 0x35, 0x33, 0x50, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Advanced Printing" },
|
|
|
|
{ { 0x94, 0x01, 0x26, 0xC0, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Automativ Archive" },
|
|
|
|
{ { 0x94, 0x7E, 0x74, 0x20, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Remote Camera" },
|
|
|
|
{ { 0x94, 0xC7, 0xCD, 0x20, 0x46, 0x08, 0x11, 0xD5, 0x84, 0x1A, 0x00, 0x02, 0xA5, 0x32, 0x5B, 0x4E }, 16, "Basic Imaging Profile - Remote Display" },
|
|
|
|
{ { 0x8E, 0x61, 0xF9, 0x5D, 0x1A, 0x79, 0x11, 0xD4, 0x8E, 0xA4, 0x00, 0x80, 0x5F, 0x9B, 0x98, 0x34 }, 16, "Basic Imaging Profile- Referenced Objects" },
|
|
|
|
{ { 0x8E, 0x61, 0xF9, 0x5D, 0x1A, 0x79, 0x11, 0xD4, 0x8E, 0xA4, 0x00, 0x80, 0x5F, 0x9B, 0x98, 0x34 }, 16, "Basic Imaging Profile - Archived Objects" },
|
|
|
|
{ { 0xbb, 0x58, 0x2b, 0x40, 0x42, 0x0c, 0x11, 0xdb, 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, "Message Access Profile - Message Access Service" },
|
|
|
|
{ { 0xbb, 0x58, 0x2b, 0x41, 0x42, 0x0c, 0x11, 0xdb, 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }, 16, "Message Access Profile - Message Notification Service" },
|
|
|
|
{ { 0x00, 0x00, 0x11, 0x18, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Direct Printing Service" },
|
|
|
|
{ { 0x00, 0x00, 0x11, 0x19, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Reference Printing Service" },
|
|
|
|
{ { 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" },
|
|
|
|
{ { 0x00, 0x00, 0x11, 0x21, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Reflected UI" },
|
|
|
|
{ { 0x00, 0x00, 0x11, 0x22, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Basic Printing" },
|
|
|
|
{ { 0x00, 0x00, 0x11, 0x23, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }, 16, "Basic Printing Profile - Printing Status" },
|
|
|
|
{ { "IRMC-SYNC" }, 9, "Synchronization Profile" },
|
|
|
|
{ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, 0, NULL },
|
|
|
|
};
|
|
|
|
|
|
|
|
/* This table must map tagets from "target_vals" to profile */
|
|
|
|
static const gint target_to_profile[] = {
|
|
|
|
PROFILE_FTP,
|
|
|
|
PROFILE_PBAP,
|
|
|
|
PROFILE_SYNCML,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_BIP,
|
|
|
|
PROFILE_MAP,
|
|
|
|
PROFILE_MAP,
|
|
|
|
PROFILE_BPP,
|
|
|
|
PROFILE_BPP,
|
|
|
|
PROFILE_BPP,
|
|
|
|
PROFILE_BPP,
|
|
|
|
PROFILE_BPP,
|
|
|
|
PROFILE_BPP,
|
|
|
|
PROFILE_SYNC
|
2010-05-19 12:44:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string version_vals[] = {
|
|
|
|
{ 0x10, "1.0" },
|
|
|
|
{ 0x11, "1.1" },
|
|
|
|
{ 0x12, "1.2" },
|
|
|
|
{ 0x13, "1.3" },
|
|
|
|
{ 0x20, "2.0" },
|
|
|
|
{ 0x21, "2.1" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2015-03-20 14:37:59 +00:00
|
|
|
static const value_string header_id_encoding_vals[] = {
|
|
|
|
{ 0x00, "Null terminated Unicode text, length prefixed with 2 byte Unsigned Integer" },
|
|
|
|
{ 0x01, "Byte sequence, length prefixed with 2 byte Unsigned Integer" },
|
|
|
|
{ 0x02, "1 byte quantity" },
|
|
|
|
{ 0x03, "4 byte quantity (network order)" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
#define OBEX_CODE_VALS_CONNECT 0x00
|
|
|
|
#define OBEX_CODE_VALS_DISCONNECT 0x01
|
|
|
|
#define OBEX_CODE_VALS_PUT 0x02
|
|
|
|
#define OBEX_CODE_VALS_GET 0x03
|
|
|
|
#define OBEX_CODE_VALS_SET_PATH 0x05
|
|
|
|
#define OBEX_CODE_VALS_CONTINUE 0x10
|
|
|
|
#define OBEX_CODE_VALS_SUCCESS 0x20
|
|
|
|
#define OBEX_CODE_VALS_ABORT 0x7F
|
|
|
|
#define OBEX_CODE_VALS_MASK 0x7F
|
2010-05-19 12:44:57 +00:00
|
|
|
|
|
|
|
static const value_string code_vals[] = {
|
2015-03-24 18:37:05 +00:00
|
|
|
{ 0x00, "Connect" },
|
|
|
|
{ 0x01, "Disconnect" },
|
|
|
|
{ 0x02, "Put" },
|
|
|
|
{ 0x03, "Get"},
|
|
|
|
{ 0x05, "Set Path" },
|
|
|
|
{ 0x06, "Action" },
|
|
|
|
{ 0x07, "Session" },
|
|
|
|
{ 0x10, "Continue" },
|
2010-05-19 12:44:57 +00:00
|
|
|
{ 0x20, "Success" },
|
|
|
|
{ 0x21, "Created" },
|
|
|
|
{ 0x22, "Accepted" },
|
|
|
|
{ 0x23, "Non-Authoritative Information" },
|
|
|
|
{ 0x24, "No Content" },
|
|
|
|
{ 0x25, "Reset Content" },
|
|
|
|
{ 0x26, "Partial Content" },
|
|
|
|
{ 0x30, "Multiple Choices" },
|
|
|
|
{ 0x31, "Moved Permanently" },
|
|
|
|
{ 0x32, "Moved Temporarily" },
|
|
|
|
{ 0x33, "See Other" },
|
|
|
|
{ 0x34, "Not Modified" },
|
|
|
|
{ 0x35, "Use Proxy" },
|
|
|
|
{ 0x40, "Bad Request" },
|
|
|
|
{ 0x41, "Unauthorised" },
|
|
|
|
{ 0x42, "Payment Required" },
|
|
|
|
{ 0x43, "Forbidden" },
|
|
|
|
{ 0x44, "Not Found" },
|
|
|
|
{ 0x45, "Method Not Allowed" },
|
|
|
|
{ 0x46, "Not Acceptable" },
|
|
|
|
{ 0x47, "Proxy Authentication Required" },
|
|
|
|
{ 0x48, "Request Timeout" },
|
|
|
|
{ 0x49, "Conflict" },
|
|
|
|
{ 0x4a, "Gone" },
|
|
|
|
{ 0x4b, "Length Required" },
|
|
|
|
{ 0x4c, "Precondition Failed" },
|
|
|
|
{ 0x4d, "Requested Entity Too Large" },
|
|
|
|
{ 0x4e, "Requested URL Too Large" },
|
|
|
|
{ 0x4f, "Unsupported Media Type" },
|
|
|
|
{ 0x50, "Internal Server Error" },
|
|
|
|
{ 0x51, "Not Implemented" },
|
|
|
|
{ 0x52, "Bad Gateway" },
|
|
|
|
{ 0x53, "Service Unavailable" },
|
|
|
|
{ 0x54, "Gateway Timeout" },
|
|
|
|
{ 0x55, "HTTP Version Not Supported" },
|
|
|
|
{ 0x60, "Database Full" },
|
|
|
|
{ 0x61, "Database Locked" },
|
2016-01-27 12:01:49 +00:00
|
|
|
{ OBEX_CODE_VALS_ABORT, "Abort" },
|
2010-05-19 12:44:57 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2012-03-12 14:38:59 +00:00
|
|
|
static value_string_ext(code_vals_ext) = VALUE_STRING_EXT_INIT(code_vals);
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2015-03-20 14:37:59 +00:00
|
|
|
static const value_string header_id_meaning_vals[] = {
|
|
|
|
{ 0x00, "Count" },
|
|
|
|
{ 0x01, "Name" },
|
|
|
|
{ 0x02, "Type" },
|
|
|
|
{ 0x03, "Length" },
|
|
|
|
{ 0x04, "Time" },
|
|
|
|
{ 0x05, "Description" },
|
|
|
|
{ 0x06, "Target" },
|
|
|
|
{ 0x07, "HTTP" },
|
|
|
|
{ 0x08, "Body" },
|
|
|
|
{ 0x09, "End Of Body" },
|
|
|
|
{ 0x0A, "Who" },
|
|
|
|
{ 0x0B, "Connection Id" },
|
|
|
|
{ 0x0C, "Application Parameters" },
|
|
|
|
{ 0x0D, "Authentication Challenge" },
|
|
|
|
{ 0x0E, "Authentication Response" },
|
|
|
|
{ 0x0F, "Creator" },
|
|
|
|
{ 0x10, "WAN UUID" },
|
|
|
|
{ 0x11, "Object Class" },
|
|
|
|
{ 0x12, "Session Parameter" },
|
|
|
|
{ 0x13, "Session Sequence Number" },
|
|
|
|
{ 0x14, "Action" },
|
|
|
|
{ 0x15, "Destination Name" },
|
|
|
|
{ 0x16, "Permissions" },
|
|
|
|
{ 0x17, "Single Response Mode" },
|
|
|
|
{ 0x18, "Single Response Mode Parameter" },
|
|
|
|
{ 0x30, "User Defined" },
|
|
|
|
{ 0x31, "User Defined" },
|
|
|
|
{ 0x32, "User Defined" },
|
|
|
|
{ 0x33, "User Defined" },
|
|
|
|
{ 0x34, "User Defined" },
|
|
|
|
{ 0x35, "User Defined" },
|
|
|
|
{ 0x36, "User Defined" },
|
|
|
|
{ 0x37, "User Defined" },
|
|
|
|
{ 0x38, "User Defined" },
|
|
|
|
{ 0x39, "User Defined" },
|
|
|
|
{ 0x3A, "User Defined" },
|
|
|
|
{ 0x3B, "User Defined" },
|
|
|
|
{ 0x3C, "User Defined" },
|
|
|
|
{ 0x3D, "User Defined" },
|
|
|
|
{ 0x3E, "User Defined" },
|
|
|
|
{ 0x3F, "User Defined" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2010-05-19 12:44:57 +00:00
|
|
|
static const value_string header_id_vals[] = {
|
2015-03-24 18:37:05 +00:00
|
|
|
/* 0x00 - 0x3F - Null terminated Unicode text, length prefixed with 2 byte Unsigned Integer */
|
2010-05-19 12:44:57 +00:00
|
|
|
{ 0x01, "Name" },
|
|
|
|
{ 0x05, "Description" },
|
2015-03-24 18:37:05 +00:00
|
|
|
{ 0x15, "Destination Name" },
|
2010-05-19 12:44:57 +00:00
|
|
|
{ 0x30, "User Defined" },
|
|
|
|
{ 0x31, "User Defined" },
|
|
|
|
{ 0x32, "User Defined" },
|
|
|
|
{ 0x33, "User Defined" },
|
|
|
|
{ 0x34, "User Defined" },
|
|
|
|
{ 0x35, "User Defined" },
|
|
|
|
{ 0x36, "User Defined" },
|
|
|
|
{ 0x37, "User Defined" },
|
|
|
|
{ 0x38, "User Defined" },
|
|
|
|
{ 0x39, "User Defined" },
|
|
|
|
{ 0x3a, "User Defined" },
|
|
|
|
{ 0x3b, "User Defined" },
|
|
|
|
{ 0x3c, "User Defined" },
|
|
|
|
{ 0x3d, "User Defined" },
|
|
|
|
{ 0x3e, "User Defined" },
|
|
|
|
{ 0x3f, "User Defined" },
|
2015-03-24 18:37:05 +00:00
|
|
|
/* 0x40 - 0x07F - Byte sequence, length prefixed with 2 byte Unsigned Integer */
|
2012-05-04 07:34:06 +00:00
|
|
|
{ 0x42, "Type" },
|
|
|
|
{ 0x44, "Time (ISO8601)" },
|
|
|
|
{ 0x46, "Target" },
|
|
|
|
{ 0x47, "HTTP" },
|
|
|
|
{ 0x48, "Body" },
|
|
|
|
{ 0x49, "End Of Body" },
|
|
|
|
{ 0x4a, "Who" },
|
2013-02-11 15:04:53 +00:00
|
|
|
{ 0x4c, "Application Parameters" },
|
2013-11-23 21:41:08 +00:00
|
|
|
{ 0x4d, "Authentication Challenge" },
|
|
|
|
{ 0x4e, "Authentication Response" },
|
2015-03-24 18:37:05 +00:00
|
|
|
{ 0x50, "WAN UUID" },
|
|
|
|
{ 0x51, "Object Class" },
|
|
|
|
{ 0x52, "Session Parameter" },
|
|
|
|
/* 0x80 - 0xBF - 1 byte quantity */
|
|
|
|
{ 0x93, "Session Sequence Number" },
|
|
|
|
{ 0x94, "Action" },
|
|
|
|
{ 0x97, "Single Response Mode" },
|
|
|
|
{ 0x98, "Single Response Mode Parameter" },
|
|
|
|
/* 0xC0 - 0xFF - 4 byte quantity (network order) */
|
2012-05-04 07:34:06 +00:00
|
|
|
{ 0xc0, "Count" },
|
|
|
|
{ 0xc3, "Length" },
|
2015-03-24 18:37:05 +00:00
|
|
|
{ 0xc4, "Time (UNIX)" },
|
2012-05-04 07:34:06 +00:00
|
|
|
{ 0xcb, "Connection Id" },
|
2015-03-24 18:37:05 +00:00
|
|
|
{ 0xcf, "Creator" },
|
|
|
|
{ 0xd6, "Permissions" },
|
2010-05-19 12:44:57 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2012-03-12 14:38:59 +00:00
|
|
|
static value_string_ext header_id_vals_ext = VALUE_STRING_EXT_INIT(header_id_vals);
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
static const value_string map_application_parameters_vals[] = {
|
|
|
|
{ 0x01, "Max List Count" },
|
|
|
|
{ 0x02, "Start Offset" },
|
|
|
|
{ 0x03, "Filter Message Type" },
|
|
|
|
{ 0x04, "Filter Period Begin" },
|
|
|
|
{ 0x05, "End Filter PeriodEnd" },
|
|
|
|
{ 0x06, "Filter Read Status" },
|
|
|
|
{ 0x07, "Filter Recipient" },
|
|
|
|
{ 0x08, "Filter Originator" },
|
|
|
|
{ 0x09, "Filter Priority" },
|
|
|
|
{ 0x0A, "Attachment" },
|
|
|
|
{ 0x0B, "Transparent" },
|
|
|
|
{ 0x0C, "Retry" },
|
|
|
|
{ 0x0D, "New Message" },
|
|
|
|
{ 0x0E, "Notification Status" },
|
|
|
|
{ 0x0F, "MAS Instance ID" },
|
|
|
|
{ 0x10, "Parameter Mask" },
|
|
|
|
{ 0x11, "Folder Listing Size" },
|
|
|
|
{ 0x12, "Messages Listing Size" },
|
|
|
|
{ 0x13, "Subject Length" },
|
|
|
|
{ 0x14, "Charset" },
|
|
|
|
{ 0x15, "Fraction Request" },
|
|
|
|
{ 0x16, "Fraction Deliver" },
|
|
|
|
{ 0x17, "Status Indicator" },
|
|
|
|
{ 0x18, "Status Value" },
|
|
|
|
{ 0x19, "MSE Time" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pbap_application_parameters_vals[] = {
|
|
|
|
{ 0x01, "Order" },
|
|
|
|
{ 0x02, "Search Value" },
|
|
|
|
{ 0x03, "Search Attribute" },
|
|
|
|
{ 0x04, "Max List Count" },
|
|
|
|
{ 0x05, "List Start Offset" },
|
|
|
|
{ 0x06, "Filter" },
|
|
|
|
{ 0x07, "Format" },
|
|
|
|
{ 0x08, "Phonebook Size" },
|
|
|
|
{ 0x09, "New Missed Calls" },
|
2015-03-24 18:37:05 +00:00
|
|
|
{ 0x0A, "Primary Version Counter" },
|
|
|
|
{ 0x0B, "Secondary Version Counter" },
|
|
|
|
{ 0x0C, "vCard Selector" },
|
|
|
|
{ 0x0D, "Database Identifier" },
|
|
|
|
{ 0x0E, "vCard Selector Operator" },
|
|
|
|
{ 0x0F, "Reset New Missed Calls" },
|
|
|
|
{ 0x10, "PBAP Supported Features" },
|
2013-02-11 15:04:53 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string bpp_application_parameters_vals[] = {
|
|
|
|
{ 0x01, "Offset" },
|
|
|
|
{ 0x02, "Count" },
|
|
|
|
{ 0x03, "Job ID" },
|
|
|
|
{ 0x04, "File Size" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string bip_application_parameters_vals[] = {
|
|
|
|
{ 0x01, "Number of Returned Handles" },
|
|
|
|
{ 0x02, "List Start Offset" },
|
|
|
|
{ 0x03, "Latest Captures Images" },
|
|
|
|
{ 0x04, "Partial File Length" },
|
|
|
|
{ 0x05, "Partial File Start Offset" },
|
|
|
|
{ 0x06, "Total File Size" },
|
|
|
|
{ 0x07, "End Flag" },
|
|
|
|
{ 0x08, "Remote Display" },
|
|
|
|
{ 0x09, "Service ID" },
|
|
|
|
{ 0x0A, "Store Flag" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
static const value_string gpp_application_parameters_vals[] = {
|
|
|
|
{ 0x41, "Max List Count" },
|
|
|
|
{ 0x42, "List Start Offset" },
|
|
|
|
{ 0x43, "Notification Status" },
|
|
|
|
{ 0x44, "Instance ID" },
|
|
|
|
{ 0x46, "Listing Size" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string ctn_application_parameters_vals[] = {
|
|
|
|
{ 0x01, "Acoustic Alarm Status" },
|
|
|
|
{ 0x02, "Attachment" },
|
|
|
|
{ 0x03, "Send" },
|
|
|
|
{ 0x04, "Filter Period Begin" },
|
|
|
|
{ 0x05, "Filter Period End" },
|
|
|
|
{ 0x06, "Parameter Mask" },
|
|
|
|
{ 0x07, "Status Indicator" },
|
|
|
|
{ 0x08, "Status Value" },
|
|
|
|
{ 0x09, "Postpone Val" },
|
|
|
|
{ 0x0A, "Email URI" },
|
|
|
|
{ 0x0B, "CSE Time" },
|
|
|
|
{ 0x0C, "Recurrent" },
|
|
|
|
{ 0x0D, "Attach ID" },
|
|
|
|
{ 0x0E, "Last Update" },
|
|
|
|
{ 0x41, "Max List Count" },
|
|
|
|
{ 0x42, "List Start Offset" },
|
|
|
|
{ 0x43, "Notification Status" },
|
|
|
|
{ 0x44, "Instance ID" },
|
|
|
|
{ 0x46, "Listing Size" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
static const value_string bip_remote_display_vals[] = {
|
|
|
|
{ 0x01, "Next Image" },
|
|
|
|
{ 0x02, "Previous Image" },
|
|
|
|
{ 0x03, "Select Image" },
|
|
|
|
{ 0x04, "Current Image" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pbap_order_vals[] = {
|
|
|
|
{ 0x00, "Indexed" },
|
|
|
|
{ 0x01, "Alphanumeric" },
|
|
|
|
{ 0x02, "Phonetic" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pbap_format_vals[] = {
|
|
|
|
{ 0x00, "2.1" },
|
|
|
|
{ 0x01, "3.0" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pbap_search_attribute_vals[] = {
|
|
|
|
{ 0x00, "Name" },
|
|
|
|
{ 0x01, "Number" },
|
|
|
|
{ 0x02, "Sound" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string map_charset_vals[] = {
|
|
|
|
{ 0x00, "Native" },
|
|
|
|
{ 0x01, "UTF-8" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string map_fraction_request_vals[] = {
|
|
|
|
{ 0x00, "First" },
|
|
|
|
{ 0x01, "Next" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string map_fraction_deliver_vals[] = {
|
|
|
|
{ 0x00, "More" },
|
|
|
|
{ 0x01, "Last" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string map_status_indicator_vals[] = {
|
|
|
|
{ 0x00, "Read Status" },
|
|
|
|
{ 0x01, "Deleted Status" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2013-11-23 21:41:08 +00:00
|
|
|
static const value_string authentication_challenge_tag_vals[] = {
|
|
|
|
{ 0x00, "Key" },
|
|
|
|
{ 0x01, "Options" },
|
|
|
|
{ 0x02, "Info" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string authentication_response_tag_vals[] = {
|
|
|
|
{ 0x00, "Result Key" },
|
|
|
|
{ 0x01, "User ID" },
|
|
|
|
{ 0x02, "Key" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string info_charset_vals[] = {
|
|
|
|
{ 0x00, "ASCII" },
|
|
|
|
{ 0xFF, "Unicode" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
static const value_string action_vals[] = {
|
|
|
|
{ 0x00, "Copy" },
|
|
|
|
{ 0x01, "Move" },
|
|
|
|
{ 0x02, "Set Permission" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string single_response_mode_vals[] = {
|
|
|
|
{ 0x00, "Disable" },
|
|
|
|
{ 0x01, "Enable" },
|
|
|
|
{ 0x02, "Indicate" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string single_response_mode_parameter_vals[] = {
|
|
|
|
{ 0x00, "Next" },
|
|
|
|
{ 0x01, "Wait" },
|
|
|
|
{ 0x02, "Next and Wait" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string session_tag_vals[] = {
|
|
|
|
{ 0x00, "Device Address" },
|
|
|
|
{ 0x01, "Nonce" },
|
|
|
|
{ 0x02, "Session ID" },
|
|
|
|
{ 0x03, "Next Sequence Number" },
|
|
|
|
{ 0x04, "Timeout" },
|
|
|
|
{ 0x05, "Session Opcode" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string session_opcode_vals[] = {
|
|
|
|
{ 0x00, "Create Session" },
|
|
|
|
{ 0x01, "Close Session" },
|
|
|
|
{ 0x02, "Suspend Session" },
|
|
|
|
{ 0x03, "Resume Session" },
|
|
|
|
{ 0x04, "Set Timeout" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pbap_application_parameter_data_vcard_selector_operator_vals[] = {
|
|
|
|
{ 0x00, "Or" },
|
|
|
|
{ 0x01, "And" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string pbap_application_parameter_data_reset_new_missed_calls_vals[] = {
|
|
|
|
{ 0x01, "Reset" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string off_on_vals[] = {
|
|
|
|
{ 0x00, "Off" },
|
|
|
|
{ 0x01, "On" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string no_yes_vals[] = {
|
|
|
|
{ 0x00, "No" },
|
|
|
|
{ 0x01, "Yes" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string ctn_application_parameter_data_attachment_vals[] = {
|
|
|
|
{ 0x00, "On" },
|
|
|
|
{ 0x01, "Off" },
|
|
|
|
{ 0x02, "Selected" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string ctn_application_parameter_data_status_indicator_vals[] = {
|
|
|
|
{ 0x00, "pStatus" },
|
|
|
|
{ 0x01, "Alarm Status" },
|
|
|
|
{ 0x02, "Send Status" },
|
|
|
|
{ 0x03, "Deleted Status" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string ctn_application_parameter_data_status_value_vals[] = {
|
|
|
|
{ 0x00, "No" },
|
|
|
|
{ 0x01, "Yes" },
|
|
|
|
{ 0x02, "Postpone" },
|
|
|
|
{ 0x03, "Tentative" },
|
|
|
|
{ 0x04, "Needs-action" },
|
|
|
|
{ 0x05, "Accepted" },
|
|
|
|
{ 0x06, "Declined" },
|
|
|
|
{ 0x07, "Delegated" },
|
|
|
|
{ 0x08, "Completed" },
|
|
|
|
{ 0x09, "In-progress" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
static value_string_ext map_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(map_application_parameters_vals);
|
|
|
|
static value_string_ext pbap_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(pbap_application_parameters_vals);
|
|
|
|
static value_string_ext bpp_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(bpp_application_parameters_vals);
|
|
|
|
static value_string_ext bip_application_parameters_vals_ext = VALUE_STRING_EXT_INIT(bip_application_parameters_vals);
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
void proto_register_obex(void);
|
|
|
|
void proto_reg_handoff_obex(void);
|
2013-03-19 13:51:52 +00:00
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
static void
|
2015-09-27 16:22:32 +00:00
|
|
|
save_path(packet_info *pinfo, const gchar *current_path, const gchar *name,
|
|
|
|
gboolean go_up, obex_proto_data_t *obex_proto_data)
|
2015-04-05 11:57:53 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
/* On Connect response sets "/"
|
|
|
|
On SetPath sets what is needed
|
|
|
|
*/
|
2015-09-27 16:22:32 +00:00
|
|
|
if (!pinfo->fd->flags.visited) {
|
2015-04-05 11:57:53 +00:00
|
|
|
obex_path_data_t *obex_path_data;
|
|
|
|
wmem_tree_key_t key[6];
|
2015-09-27 16:22:32 +00:00
|
|
|
guint32 frame_number;
|
2015-04-05 11:57:53 +00:00
|
|
|
const gchar *path = path_unknown;
|
|
|
|
|
2016-01-24 03:40:51 +00:00
|
|
|
frame_number = pinfo->num;
|
2015-04-05 11:57:53 +00:00
|
|
|
|
|
|
|
key[0].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[0].key = &obex_proto_data->interface_id;
|
2015-04-05 11:57:53 +00:00
|
|
|
key[1].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[1].key = &obex_proto_data->adapter_id;
|
2015-04-05 11:57:53 +00:00
|
|
|
key[2].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[2].key = &obex_proto_data->chandle;
|
2015-04-05 11:57:53 +00:00
|
|
|
key[3].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[3].key = &obex_proto_data->channel;
|
2015-04-05 11:57:53 +00:00
|
|
|
key[4].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[4].key = &frame_number;
|
2015-04-05 11:57:53 +00:00
|
|
|
key[5].length = 0;
|
|
|
|
key[5].key = NULL;
|
|
|
|
|
|
|
|
obex_path_data = wmem_new(wmem_file_scope(), obex_path_data_t);
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_path_data->interface_id = obex_proto_data->interface_id;
|
|
|
|
obex_path_data->adapter_id = obex_proto_data->adapter_id;
|
|
|
|
obex_path_data->chandle = obex_proto_data->chandle;
|
|
|
|
obex_path_data->channel = obex_proto_data->channel;
|
2015-04-05 11:57:53 +00:00
|
|
|
|
|
|
|
if (go_up == TRUE) {
|
|
|
|
if (current_path != path_unknown && current_path != path_root) {
|
|
|
|
gchar *i_path;
|
|
|
|
|
|
|
|
i_path = g_strrstr(current_path, "/");
|
|
|
|
if (!i_path) {
|
|
|
|
current_path = path_unknown;
|
|
|
|
} else {
|
|
|
|
if (i_path == current_path)
|
|
|
|
path = current_path = path_root;
|
|
|
|
else
|
|
|
|
path = current_path = wmem_strndup(wmem_epan_scope(), current_path, i_path - current_path - 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (name && *name == '\0')
|
|
|
|
path = path_root;
|
|
|
|
else if (name && current_path == path_root)
|
|
|
|
path = wmem_strdup_printf(wmem_file_scope(), "/%s", name);
|
|
|
|
else if (name)
|
|
|
|
path = wmem_strdup_printf(wmem_file_scope(), "%s/%s", current_path, name);
|
|
|
|
|
|
|
|
obex_path_data->path = path;
|
|
|
|
|
|
|
|
wmem_tree_insert32_array(obex_path, key, obex_path_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
static void media_type_prompt(packet_info *pinfo, gchar* result)
|
|
|
|
{
|
|
|
|
gchar *value_data;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
value_data = (gchar *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE);
|
2015-04-19 17:08:13 +00:00
|
|
|
if (value_data)
|
|
|
|
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Media Type %s as", (gchar *) value_data);
|
|
|
|
else
|
|
|
|
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Unknown Media Type");
|
|
|
|
}
|
|
|
|
|
|
|
|
static gpointer media_type_value(packet_info *pinfo)
|
|
|
|
{
|
|
|
|
gchar *value_data;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
value_data = (gchar *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE);
|
2015-04-19 17:08:13 +00:00
|
|
|
|
|
|
|
if (value_data)
|
|
|
|
return (gpointer) value_data;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2017-07-27 08:33:17 +00:00
|
|
|
static void obex_profile_prompt(packet_info *pinfo, gchar* result)
|
2014-08-25 13:46:54 +00:00
|
|
|
{
|
2015-08-06 08:59:51 +00:00
|
|
|
guint8 *value_data;
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
value_data = (guint8 *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE);
|
2014-08-25 13:46:54 +00:00
|
|
|
if (value_data)
|
|
|
|
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "OBEX Profile 0x%04x as", (guint) *value_data);
|
|
|
|
else
|
|
|
|
g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Unknown OBEX Profile");
|
|
|
|
}
|
|
|
|
|
2017-07-27 08:33:17 +00:00
|
|
|
static gpointer obex_profile_value(packet_info *pinfo)
|
2014-08-25 13:46:54 +00:00
|
|
|
{
|
2015-08-06 08:59:51 +00:00
|
|
|
guint8 *value_data;
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
value_data = (guint8 *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2015-08-05 16:25:16 +00:00
|
|
|
if (value_data)
|
2015-08-07 17:19:22 +00:00
|
|
|
return GUINT_TO_POINTER((gulong)*value_data);
|
2015-08-05 16:25:16 +00:00
|
|
|
|
|
|
|
return NULL;
|
2014-08-25 13:46:54 +00:00
|
|
|
}
|
|
|
|
|
2011-01-02 08:13:40 +00:00
|
|
|
static int
|
|
|
|
is_ascii_str(const guint8 *str, int length)
|
2010-05-19 12:44:57 +00:00
|
|
|
{
|
2012-03-12 14:38:59 +00:00
|
|
|
int i;
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
if ((length < 1) || (str[length-1] != '\0'))
|
|
|
|
return 0;
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
for(i=0; i<length-1; i++) {
|
|
|
|
if ((str[i] < 0x20) && (str[i] != 0x0a)) /* not strict ascii */
|
|
|
|
break;
|
|
|
|
}
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
if (i < (length-1))
|
|
|
|
return 0;
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
return 1;
|
2010-05-19 12:44:57 +00:00
|
|
|
}
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_raw(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
|
2013-02-11 15:04:53 +00:00
|
|
|
{
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
|
|
|
gint parameter_length;
|
|
|
|
|
|
|
|
parameters_length = tvb_reported_length(tvb);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
2013-10-26 02:24:04 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset,
|
2015-02-26 13:38:57 +00:00
|
|
|
tvb_captured_length_remaining(tvb, offset), "Parameter: 0x%02x", parameter_id);
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_id, tvb, offset,
|
|
|
|
1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset,
|
|
|
|
1, ENC_BIG_ENDIAN);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset);
|
2013-10-26 00:26:41 +00:00
|
|
|
proto_item_set_len(parameter_item, parameter_length + 2);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset,
|
2013-03-18 06:13:09 +00:00
|
|
|
parameter_length, ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_bt_bpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2013-02-11 15:04:53 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
2013-02-11 15:04:53 +00:00
|
|
|
gint parameter_length;
|
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
parameters_length = tvb_reported_length(tvb);
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
2013-10-26 02:24:04 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
|
2013-02-11 15:04:53 +00:00
|
|
|
"Parameter: %s", val_to_str_const(parameter_id,
|
|
|
|
bpp_application_parameters_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
2013-07-09 01:18:52 +00:00
|
|
|
item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
if (parameter_length != 4) {
|
2013-07-09 01:18:52 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
2013-02-11 15:04:53 +00:00
|
|
|
"According to the specification this parameter length should be 4, but there is %i", parameter_length);
|
|
|
|
} else switch (parameter_id) {
|
|
|
|
case 0x01:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_offset, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x02:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_count, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x03:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_job_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x04:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bpp_application_parameter_data_file_size, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
default:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_bt_bip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2013-02-11 15:04:53 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
|
|
|
gint parameter_length;
|
2013-02-11 15:04:53 +00:00
|
|
|
static gint required_length_map[] = {0, 2, 2, 1, 4, 4, 4, 1, 1, 16, 1};
|
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
parameters_length = tvb_reported_length(tvb);
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
2013-10-26 02:24:04 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
|
2013-02-11 15:04:53 +00:00
|
|
|
"Parameter: %s", val_to_str_const(parameter_id,
|
|
|
|
bip_application_parameters_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
2013-07-09 01:18:52 +00:00
|
|
|
item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset += 1;
|
|
|
|
|
2013-02-13 16:01:42 +00:00
|
|
|
if (parameter_id < (sizeof(required_length_map)/sizeof(gint)) &&
|
2013-02-11 15:04:53 +00:00
|
|
|
required_length_map[parameter_id] != parameter_length) {
|
2013-07-09 01:18:52 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
2013-02-11 15:04:53 +00:00
|
|
|
"According to the specification this parameter length should be %i, but there is %i",
|
|
|
|
required_length_map[parameter_id], parameter_length);
|
|
|
|
} else switch (parameter_id) {
|
|
|
|
case 0x01:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_number_of_returned_handles, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x02:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_list_start_offset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x03:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_latest_captured_images, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x04:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_partial_file_length, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x05:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_partial_file_start_offset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x06:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_total_file_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x07:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_end_flag, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x08:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_remote_display, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x09:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_service_id, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0A:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_bip_application_parameter_data_store_flag, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
default:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_bt_pbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2013-02-11 15:04:53 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
|
|
|
gint parameter_length;
|
2015-03-24 18:37:05 +00:00
|
|
|
static gint required_length_map[] = {0, 1, -1, 1, 2, 2, 8, 1, 2, 1, 16, 16, 8, 16, 1, 1};
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
parameters_length = tvb_reported_length(tvb);
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
2013-10-26 02:24:04 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
|
2013-02-11 15:04:53 +00:00
|
|
|
"Parameter: %s", val_to_str_const(parameter_id,
|
|
|
|
pbap_application_parameters_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
2013-07-09 01:18:52 +00:00
|
|
|
item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset += 1;
|
|
|
|
|
2013-02-13 16:01:42 +00:00
|
|
|
if (parameter_id < (sizeof(required_length_map)/sizeof(gint)) &&
|
2013-02-11 15:04:53 +00:00
|
|
|
required_length_map[parameter_id] != -1 &&
|
|
|
|
required_length_map[parameter_id] != parameter_length) {
|
2013-07-09 01:18:52 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
2013-02-11 15:04:53 +00:00
|
|
|
"According to the specification this parameter length should be %i, but there is %i",
|
|
|
|
required_length_map[parameter_id], parameter_length);
|
|
|
|
} else switch (parameter_id) {
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x01: /* Order */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_order, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x02: /* Search Value */
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_search_value, tvb, offset, parameter_length, ENC_ASCII | ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x03: /* Search Attribute */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_search_attribute, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x04: /* Max List Count */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_max_list_count, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x05: /* List Start Offset */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_list_start_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x06: /* Filter */
|
2017-03-07 18:15:57 +00:00
|
|
|
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_ENDIAN);
|
|
|
|
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_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x07: /* Format */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_format, tvb, offset, 1, ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x08: /* Phonebook Size */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_phonebook_size, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x09: /* New Missed Calls */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_new_missed_calls, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0A: /* Primary Version Counter */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_primary_version_counter, tvb, offset, 16, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0B: /* Secondary Version Counter */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_secondary_version_counter, tvb, offset, 16, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0C: /* vCard Selector */
|
2017-03-07 18:15:57 +00:00
|
|
|
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_ENDIAN);
|
|
|
|
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_ENDIAN);
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
case 0x0D: /* Database Identifier */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_database_identifier, tvb, offset, 16, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0E: /* vCard Selector Operator */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_vcard_selector_operator, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0F: /* Reset New Missed Calls */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_pbap_application_parameter_data_reset_new_missed_calls, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x10: /* PBAP Supported Features */
|
2016-01-27 12:01:49 +00:00
|
|
|
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_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
|
|
|
default:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2010-05-19 12:44:57 +00:00
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_bt_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2013-02-11 15:04:53 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
|
|
|
gint parameter_length;
|
2013-02-11 15:04:53 +00:00
|
|
|
static gint 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};
|
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
parameters_length = tvb_reported_length(tvb);
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
2013-10-26 02:24:04 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
|
2013-02-11 15:04:53 +00:00
|
|
|
"Parameter: %s", val_to_str_const(parameter_id,
|
|
|
|
map_application_parameters_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
2013-07-09 01:18:52 +00:00
|
|
|
item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset += 1;
|
|
|
|
|
2013-02-13 16:01:42 +00:00
|
|
|
if (parameter_id < (sizeof(required_length_map)/sizeof(gint)) &&
|
2013-02-11 15:04:53 +00:00
|
|
|
required_length_map[parameter_id] != -1 &&
|
|
|
|
required_length_map[parameter_id] != parameter_length) {
|
2013-07-09 01:18:52 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-09-09 00:44:09 +00:00
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
2013-02-11 15:04:53 +00:00
|
|
|
"According to the specification this parameter length should be %i, but there is %i",
|
|
|
|
required_length_map[parameter_id], parameter_length);
|
|
|
|
} else switch (parameter_id) {
|
|
|
|
case 0x01:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_max_list_count, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x02:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_start_offset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x03:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_reserved, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_mms, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_message_type_email, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
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_ENDIAN);
|
|
|
|
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_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x04:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_period_begin, tvb, offset, parameter_length, ENC_ASCII | ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
|
|
|
case 0x05:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_period_end, tvb, offset, parameter_length, ENC_ASCII | ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
|
|
|
case 0x06:
|
|
|
|
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_ENDIAN);
|
|
|
|
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_ENDIAN);
|
|
|
|
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_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x07:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_recipient, tvb, offset, parameter_length, ENC_ASCII | ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
|
|
|
case 0x08:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_originator, tvb, offset, parameter_length, ENC_ASCII | ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
|
|
|
case 0x09:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_priority_reserved_6, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_priority_get_high, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_filter_priority_non_high, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0A:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_attachment, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0B:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_transparent, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0C:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_retry, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0D:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_new_message, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0E:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_notification_status, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0F:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_mas_instance_id, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x10:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_reserved, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
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_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_protected, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_sent, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_read, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_priority, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_attachment_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_text, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_reception_status, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_type, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_recipient_addressing, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_recipient_name, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_sender_addressing, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_sender_name, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_datetime, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_parameter_mask_subject, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x11:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_folder_listing_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x12:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_messages_listing_size, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x13:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_subject_length, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x14:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_charset, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x15:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_fraction_request, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x16:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_fraction_deliver, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x17:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_status_indicator, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x18:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_reserved_7, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_status_value, tvb, offset, required_length_map[parameter_id], ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x19:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_map_application_parameter_data_mse_time, tvb, offset, parameter_length, ENC_ASCII | ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
|
|
|
default:
|
2013-03-18 06:13:09 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_bt_gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2015-03-24 18:37:05 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
|
|
|
gint parameter_length;
|
2015-03-24 18:37:05 +00:00
|
|
|
static gint required_length_map[] = {2, 2, 1, 1, 0, 2};
|
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
parameters_length = tvb_reported_length(tvb);
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
|
|
|
|
"Parameter: %s", val_to_str_const(parameter_id,
|
|
|
|
gpp_application_parameters_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
if (parameter_id >= 0x41 && (guint8)(parameter_id - 0x41) < (sizeof(required_length_map)/sizeof(gint)) &&
|
|
|
|
required_length_map[parameter_id - 0x41] != -1 &&
|
|
|
|
required_length_map[parameter_id - 0x41] != parameter_length) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
|
|
|
"According to the specification this parameter length should be %i, but there is %i",
|
|
|
|
required_length_map[parameter_id - 0x41], parameter_length);
|
|
|
|
} else switch (parameter_id) {
|
|
|
|
case 0x41: /* Max List Count */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_max_list_count, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x42: /* List Start Offset */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_list_start_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x43: /* Notification Status */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_reserved_7, tvb, offset, 1, ENC_NA);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_notification_status, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x44: /* Instance ID */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_instance_id, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x46: /* Listing Size */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_listing_size, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex_application_parameter_bt_ctn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2015-03-24 18:37:05 +00:00
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
guint8 parameter_id;
|
2014-08-25 13:46:54 +00:00
|
|
|
gint offset = 0;
|
|
|
|
gint parameters_length;
|
|
|
|
gint parameter_length;
|
2015-03-24 18:37:05 +00:00
|
|
|
static gint required_length_map[] = {0, 1, 1, 1, -1, -1, 4, 1, 1, 4, -1, -1, 1, 1, -1};
|
|
|
|
static gint required_length_map_gpp[] = {2, 2, 1, 1, -1, 2};
|
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
parameters_length = tvb_reported_length(tvb);
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
while (parameters_length > 0) {
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
|
|
|
parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
|
|
|
|
"Parameter: %s", val_to_str_const(parameter_id,
|
|
|
|
ctn_application_parameters_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_application_parameters);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
if (parameter_id < 0x41 && parameter_id < (sizeof(required_length_map)/sizeof(gint)) &&
|
|
|
|
required_length_map[parameter_id] != -1 &&
|
|
|
|
required_length_map[parameter_id] != parameter_length) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
|
|
|
"According to the specification this parameter length should be %i, but there is %i",
|
|
|
|
required_length_map[parameter_id], parameter_length);
|
|
|
|
} else if (parameter_id >= 0x41 && (guint8)(parameter_id - 0x41) < (sizeof(required_length_map_gpp)/sizeof(gint)) &&
|
|
|
|
required_length_map[parameter_id - 0x41] != -1 &&
|
|
|
|
required_length_map[parameter_id - 0x41] != parameter_length) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
|
|
|
expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad,
|
|
|
|
"According to the specification this parameter length should be %i, but there is %i",
|
|
|
|
required_length_map_gpp[parameter_id - 0x41], parameter_length);
|
|
|
|
} else switch (parameter_id) {
|
|
|
|
case 0x41: /* Max List Count */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_max_list_count, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x42: /* List Start Offset */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_list_start_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x43: /* Notification Status */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_reserved_7, tvb, offset, 1, ENC_NA);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_notification_status, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x44: /* Instance ID */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_instance_id, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x46: /* Listing Size */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_gpp_application_parameter_data_listing_size, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x01: /* Acoustic Alarm Status */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_acoustic_alarm_status, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x02: /* Attachment */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_attachment, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x03: /* Send */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_send, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x04: /* Filter Period Begin */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_filter_period_begin, tvb, offset, parameter_length, ENC_NA | ENC_ASCII);
|
|
|
|
break;
|
|
|
|
case 0x05: /* Filter Period End */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_filter_period_end, tvb, offset, parameter_length, ENC_NA | ENC_ASCII);
|
|
|
|
break;
|
|
|
|
case 0x06: /* Parameter Mask */
|
2016-01-27 12:01:49 +00:00
|
|
|
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_ENDIAN);
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
case 0x07: /* Status Indicator */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_status_indicator, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x08: /* Status Value */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_status_value, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x09: /* Postpone Val */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_postpone_val, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case 0x0A: /* Email URI */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_email_uri, tvb, offset, parameter_length, ENC_NA | ENC_ASCII);
|
|
|
|
break;
|
|
|
|
case 0x0B: /* CSE Time */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_cse_time, tvb, offset, parameter_length, ENC_NA | ENC_ASCII);
|
|
|
|
break;
|
|
|
|
case 0x0C: /* Recurrent */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_recurrent, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0D: /* Attach ID */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_attach_id, tvb, offset, 1, ENC_NA);
|
|
|
|
break;
|
|
|
|
case 0x0E: /* Last Update */
|
|
|
|
proto_tree_add_item(parameter_tree, hf_ctn_application_parameter_data_last_update, tvb, offset, parameter_length, ENC_NA | ENC_ASCII);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA);
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters_length -= 2 + parameter_length;
|
|
|
|
offset += parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
static int
|
|
|
|
dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2015-09-27 16:22:32 +00:00
|
|
|
gint profile, obex_last_opcode_data_t *obex_last_opcode_data,
|
|
|
|
obex_proto_data_t *obex_proto_data)
|
2010-05-19 12:44:57 +00:00
|
|
|
{
|
2012-03-12 14:38:59 +00:00
|
|
|
proto_tree *hdrs_tree = NULL;
|
|
|
|
proto_tree *hdr_tree = NULL;
|
|
|
|
proto_item *hdr = NULL;
|
|
|
|
proto_item *handle_item;
|
2014-08-25 13:46:54 +00:00
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
gint new_offset;
|
2015-03-24 18:37:05 +00:00
|
|
|
gint item_length = 0;
|
|
|
|
gint value_length = 0;
|
2012-03-12 14:38:59 +00:00
|
|
|
guint8 hdr_id, i;
|
2015-03-24 18:37:05 +00:00
|
|
|
guint32 value;
|
2015-09-27 16:22:32 +00:00
|
|
|
guint32 frame_number;
|
2015-03-24 18:37:05 +00:00
|
|
|
guint8 tag;
|
|
|
|
gchar *str = NULL;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-02-26 13:38:57 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) > 0) {
|
2012-03-12 14:38:59 +00:00
|
|
|
proto_item *hdrs;
|
2015-03-24 18:37:05 +00:00
|
|
|
hdrs = proto_tree_add_item(tree, hf_headers, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
|
2016-01-27 12:01:49 +00:00
|
|
|
hdrs_tree = proto_item_add_subtree(hdrs, ett_obex_hdrs);
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2015-02-26 13:38:57 +00:00
|
|
|
while (tvb_reported_length_remaining(tvb, offset) > 0) {
|
2012-03-12 14:38:59 +00:00
|
|
|
hdr_id = tvb_get_guint8(tvb, offset);
|
|
|
|
|
|
|
|
switch(0xC0 & hdr_id)
|
|
|
|
{
|
|
|
|
case 0x00: /* null terminated unicode */
|
2015-03-24 18:37:05 +00:00
|
|
|
item_length = tvb_get_ntohs(tvb, offset + 1);
|
|
|
|
value_length = item_length - 3;
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
case 0x40: /* byte sequence */
|
2015-03-24 18:37:05 +00:00
|
|
|
item_length = tvb_get_ntohs(tvb, offset + 1);
|
|
|
|
value_length = item_length - 3;
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
case 0x80: /* 1 byte */
|
2015-03-24 18:37:05 +00:00
|
|
|
item_length = 1 + 1;
|
|
|
|
value_length = 1;
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
case 0xc0: /* 4 bytes */
|
2015-03-24 18:37:05 +00:00
|
|
|
item_length = 1 + 4;
|
|
|
|
value_length = 4;
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2013-10-26 02:24:04 +00:00
|
|
|
hdr = proto_tree_add_none_format(hdrs_tree, hf_header, tvb, offset, item_length, "%s",
|
2012-03-12 14:38:59 +00:00
|
|
|
val_to_str_ext_const(hdr_id, &header_id_vals_ext, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
hdr_tree = proto_item_add_subtree(hdr, ett_obex_hdr);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_tree_add_bitmask_with_flags(hdr_tree, tvb, offset, hf_hdr_id, ett_obex_hdr_id, hfx_hdr_id, ENC_NA, BMT_NO_APPEND);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
|
|
|
offset++;
|
|
|
|
|
|
|
|
switch(0xC0 & hdr_id)
|
|
|
|
{
|
|
|
|
case 0x00: /* null terminated unicode */
|
2015-03-24 18:37:05 +00:00
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
offset += 2;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
switch (hdr_id) {
|
|
|
|
case 0x01: /* Name */
|
|
|
|
proto_tree_add_item(hdr_tree, hf_name, tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
|
2015-04-19 17:08:13 +00:00
|
|
|
if (!pinfo->fd->flags.visited && obex_last_opcode_data) {
|
2016-01-27 12:01:49 +00:00
|
|
|
if (obex_last_opcode_data->code == OBEX_CODE_VALS_SET_PATH)
|
2015-04-19 17:08:13 +00:00
|
|
|
obex_last_opcode_data->data.set_data.name = tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
|
2016-01-27 12:01:49 +00:00
|
|
|
else if (obex_last_opcode_data->code == OBEX_CODE_VALS_GET || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT)
|
2015-04-19 17:08:13 +00:00
|
|
|
obex_last_opcode_data->data.get_put.name = tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
|
2015-04-05 11:57:53 +00:00
|
|
|
}
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_unicode, tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_UCS_2 | ENC_BIG_ENDIAN);
|
|
|
|
proto_item_append_text(hdr_tree, ": \"%s\"", str);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", str);
|
|
|
|
offset += value_length;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
case 0x40: /* byte sequence */
|
2015-03-24 18:37:05 +00:00
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
|
|
|
offset += 2;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
switch (hdr_id) {
|
|
|
|
case 0x4c: /* Application Parameters */
|
2014-08-25 13:46:54 +00:00
|
|
|
next_tvb = tvb_new_subset_length(tvb, offset, value_length);
|
2016-01-27 12:01:49 +00:00
|
|
|
if (!(new_offset = dissector_try_uint_new(obex_profile_table, profile, next_tvb, pinfo, hdr_tree, TRUE, NULL))) {
|
2014-08-25 13:46:54 +00:00
|
|
|
new_offset = call_dissector(raw_application_parameters_handle, next_tvb, pinfo, hdr_tree);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
2014-08-25 13:46:54 +00:00
|
|
|
offset += new_offset;
|
|
|
|
|
2013-02-11 15:04:53 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x4d: /* Authentication Challenge */
|
|
|
|
while (value_length) {
|
2013-11-23 21:41:08 +00:00
|
|
|
guint8 parameter_id;
|
|
|
|
guint8 sub_parameter_length;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
sub_parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(hdr_tree, hf_authentication_parameter, tvb, offset,
|
2013-11-23 21:41:08 +00:00
|
|
|
2 + sub_parameter_length, "Tag: %s", val_to_str_const(parameter_id,
|
|
|
|
authentication_challenge_tag_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_authentication_parameters);
|
2013-11-23 21:41:08 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_challenge_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
tag = tvb_get_guint8(tvb, offset);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
switch (tag) {
|
|
|
|
case 0x00:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_key, tvb, offset, 16, ENC_NA);
|
|
|
|
offset += 16;
|
|
|
|
break;
|
|
|
|
case 0x01:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_option_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_option_read_only, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_option_user_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
break;
|
|
|
|
case 0x02:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_info_charset, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
offset += 1;
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_info, tvb, offset, sub_parameter_length - 1, ENC_ASCII|ENC_NA);
|
|
|
|
offset += sub_parameter_length - 1;
|
2014-12-04 09:57:16 +00:00
|
|
|
break;
|
2013-11-23 21:41:08 +00:00
|
|
|
default:
|
2015-03-24 18:37:05 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
2013-11-23 21:41:08 +00:00
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
value_length -= 2 + sub_parameter_length;
|
2013-11-23 21:41:08 +00:00
|
|
|
}
|
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x4e: /* Authentication Response */
|
|
|
|
while (value_length) {
|
2013-11-23 21:41:08 +00:00
|
|
|
guint8 parameter_id;
|
|
|
|
guint8 sub_parameter_length;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
sub_parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
parameter_item = proto_tree_add_none_format(hdr_tree, hf_authentication_parameter, tvb, offset,
|
2013-11-23 21:41:08 +00:00
|
|
|
2 + sub_parameter_length, "Tag: %s", val_to_str_const(parameter_id,
|
|
|
|
authentication_response_tag_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_authentication_parameters);
|
2013-11-23 21:41:08 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_response_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
tag = tvb_get_guint8(tvb, offset);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
sub_parameter_length = tvb_get_guint8(tvb, offset);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
switch (tag) {
|
|
|
|
case 0x00:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_result_key, tvb, offset, 16, ENC_NA);
|
|
|
|
offset += 16;
|
|
|
|
break;
|
|
|
|
case 0x01:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_user_id, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
break;
|
|
|
|
case 0x02:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_key, tvb, offset, 16, ENC_NA);
|
|
|
|
offset += 16;
|
|
|
|
break;
|
|
|
|
default:
|
2015-03-24 18:37:05 +00:00
|
|
|
proto_tree_add_item(parameter_tree, hf_authentication_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
2013-11-23 21:41:08 +00:00
|
|
|
offset += sub_parameter_length;
|
2013-11-24 21:15:22 +00:00
|
|
|
break;
|
2013-11-23 21:41:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
value_length -= 2 + sub_parameter_length;
|
2013-11-23 21:41:08 +00:00
|
|
|
}
|
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0x42: /* Type */
|
2015-04-18 13:55:42 +00:00
|
|
|
proto_tree_add_item(hdr_tree, hf_type, tvb, offset, value_length, ENC_ASCII | ENC_NA);
|
2015-03-24 18:37:05 +00:00
|
|
|
proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_ASCII));
|
2016-01-27 12:01:49 +00:00
|
|
|
if (!pinfo->fd->flags.visited && obex_last_opcode_data && (obex_last_opcode_data->code == OBEX_CODE_VALS_GET || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT)) {
|
2015-04-19 17:08:13 +00:00
|
|
|
obex_last_opcode_data->data.get_put.type = tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_ASCII | ENC_NA);
|
|
|
|
}
|
2016-01-27 12:01:49 +00:00
|
|
|
if (p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE) == NULL) {
|
2015-04-19 17:08:13 +00:00
|
|
|
guint8 *value_data;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
value_data = tvb_get_string_enc(wmem_file_scope(), tvb, offset, value_length, ENC_ASCII | ENC_NA);
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
p_add_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE, value_data);
|
2015-04-19 17:08:13 +00:00
|
|
|
}
|
2015-03-24 18:37:05 +00:00
|
|
|
offset += value_length;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
case 0x44: /* Time (ISO8601) */
|
2016-06-26 14:52:37 +00:00
|
|
|
{
|
|
|
|
const guint8* time_str;
|
|
|
|
proto_tree_add_item_ret_string(hdr_tree, hf_time_iso8601, tvb, offset, value_length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &time_str);
|
|
|
|
proto_item_append_text(hdr_tree, ": \"%s\"", time_str);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
|
|
|
offset += value_length;
|
2016-06-26 14:52:37 +00:00
|
|
|
}
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
case 0x48: /* Body */
|
|
|
|
case 0x49: /* End Of Body */
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA);
|
2015-04-19 17:08:13 +00:00
|
|
|
next_tvb = tvb_new_subset_length(tvb, offset, value_length);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
if (value_length > 0 && obex_last_opcode_data &&
|
2016-01-27 12:01:49 +00:00
|
|
|
(obex_last_opcode_data->code == OBEX_CODE_VALS_GET || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT) &&
|
|
|
|
p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE) == NULL) {
|
2015-04-19 17:08:13 +00:00
|
|
|
guint8 *value_data;
|
2015-03-24 18:37:05 +00:00
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
value_data = obex_last_opcode_data->data.get_put.type;
|
2015-03-24 18:37:05 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
p_add_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_MEDIA_TYPE, value_data);
|
2015-04-19 17:08:13 +00:00
|
|
|
}
|
|
|
|
if (value_length > 0 && obex_last_opcode_data &&
|
2016-01-27 12:01:49 +00:00
|
|
|
(obex_last_opcode_data->code == OBEX_CODE_VALS_GET || obex_last_opcode_data->code == OBEX_CODE_VALS_PUT) &&
|
2015-05-18 10:15:43 +00:00
|
|
|
obex_last_opcode_data->data.get_put.type &&
|
2015-09-27 16:22:32 +00:00
|
|
|
dissector_try_string(media_type_dissector_table, obex_last_opcode_data->data.get_put.type, next_tvb, pinfo, tree, NULL) > 0) {
|
2015-04-19 17:08:13 +00:00
|
|
|
offset += value_length;
|
|
|
|
} else {
|
|
|
|
if (!tvb_strneql(tvb, offset, "<?xml", 5))
|
|
|
|
{
|
|
|
|
call_dissector(xml_handle, next_tvb, pinfo, tree);
|
|
|
|
} else if (is_ascii_str(tvb_get_ptr(tvb, offset, value_length), value_length)) {
|
|
|
|
proto_item_append_text(hdr_tree, ": \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_ASCII));
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, value_length, ENC_ASCII));
|
|
|
|
}
|
|
|
|
offset += value_length;
|
|
|
|
}
|
2015-03-24 18:37:05 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x46: /* Target */
|
|
|
|
case 0x4a: /* Who */
|
|
|
|
handle_item = proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
if (value_length == 16) for (i = 0; target_vals[i].strptr != NULL; i++) {
|
2013-02-11 15:04:53 +00:00
|
|
|
if (tvb_memeql(tvb, offset, target_vals[i].value, target_vals[i].length) == 0) {
|
2012-03-12 14:38:59 +00:00
|
|
|
proto_item_append_text(handle_item, ": %s", target_vals[i].strptr);
|
2015-03-24 18:37:05 +00:00
|
|
|
proto_item_append_text(hdr_tree, ": %s", target_vals[i].strptr);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", target_vals[i].strptr);
|
2013-02-11 15:04:53 +00:00
|
|
|
if (!pinfo->fd->flags.visited) {
|
|
|
|
obex_profile_data_t *obex_profile_data;
|
2015-05-13 15:33:28 +00:00
|
|
|
|
2013-06-20 16:31:53 +00:00
|
|
|
wmem_tree_key_t key[6];
|
2016-01-24 03:40:51 +00:00
|
|
|
frame_number = pinfo->num;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
key[0].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[0].key = &obex_proto_data->interface_id;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[1].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[1].key = &obex_proto_data->adapter_id;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[2].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[2].key = &obex_proto_data->chandle;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[3].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[3].key = &obex_proto_data->channel;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[4].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[4].key = &frame_number;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[5].length = 0;
|
|
|
|
key[5].key = NULL;
|
|
|
|
|
2013-03-19 13:51:52 +00:00
|
|
|
obex_profile_data = wmem_new(wmem_file_scope(), obex_profile_data_t);
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_profile_data->interface_id = obex_proto_data->interface_id;
|
|
|
|
obex_profile_data->adapter_id = obex_proto_data->adapter_id;
|
|
|
|
obex_profile_data->chandle = obex_proto_data->chandle;
|
|
|
|
obex_profile_data->channel = obex_proto_data->channel;
|
|
|
|
obex_profile_data->profile = target_to_profile[i];
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2013-06-20 16:31:53 +00:00
|
|
|
wmem_tree_insert32_array(obex_profile, key, obex_profile_data);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
2015-03-24 18:37:05 +00:00
|
|
|
offset += value_length;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
case 0x47: /* HTTP */ {
|
2014-08-25 13:46:54 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-24 18:37:05 +00:00
|
|
|
call_dissector(http_handle, next_tvb, pinfo, hdr_tree);
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 0x50: /* WAN UUID */
|
|
|
|
if (value_length == 2) {
|
2015-04-18 13:55:42 +00:00
|
|
|
proto_tree_add_item(hdr_tree, hf_wan_uuid, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2015-03-24 18:37:05 +00:00
|
|
|
offset += 2;
|
|
|
|
} else {
|
2015-04-18 13:55:42 +00:00
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA);
|
2015-03-24 18:37:05 +00:00
|
|
|
offset += value_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x51: /* Object Class */
|
2016-06-26 14:52:37 +00:00
|
|
|
{
|
|
|
|
const guint8* obj_str;
|
|
|
|
proto_tree_add_item_ret_string(hdr_tree, hf_object_class, tvb, offset, value_length, ENC_ASCII | ENC_NA, wmem_packet_scope(), &obj_str);
|
|
|
|
proto_item_append_text(hdr_tree, ": \"%s\"", obj_str);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
|
|
|
offset += value_length;
|
2016-06-26 14:52:37 +00:00
|
|
|
}
|
2015-03-24 18:37:05 +00:00
|
|
|
break;
|
|
|
|
case 0x52: /* Session Parameter */
|
|
|
|
while (value_length) {
|
|
|
|
guint8 parameter_id;
|
|
|
|
guint8 sub_parameter_length;
|
|
|
|
proto_item *parameter_item;
|
|
|
|
proto_tree *parameter_tree;
|
|
|
|
|
|
|
|
parameter_id = tvb_get_guint8(tvb, offset);
|
|
|
|
sub_parameter_length = tvb_get_guint8(tvb, offset + 1);
|
|
|
|
|
|
|
|
parameter_item = proto_tree_add_none_format(hdr_tree, hf_session_parameter, tvb, offset,
|
|
|
|
2 + sub_parameter_length, "Tag: %s", val_to_str_const(parameter_id,
|
|
|
|
session_tag_vals, "Unknown"));
|
2016-01-27 12:01:49 +00:00
|
|
|
parameter_tree = proto_item_add_subtree(parameter_item, ett_obex_session_parameters);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_tag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
tag = tvb_get_guint8(tvb, offset);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
sub_parameter_length = tvb_get_guint8(tvb, offset);
|
|
|
|
offset += 1;
|
|
|
|
|
|
|
|
switch (tag) {
|
|
|
|
case 0x00: /* Device Address */
|
|
|
|
if (sub_parameter_length == 6) {
|
2015-09-27 16:22:32 +00:00
|
|
|
offset = dissect_bd_addr(hf_sender_bd_addr, pinfo, parameter_tree, tvb, offset, FALSE, obex_proto_data->interface_id, obex_proto_data->adapter_id, NULL);
|
2015-03-24 18:37:05 +00:00
|
|
|
} else {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x01: /* Nonce */
|
|
|
|
if (sub_parameter_length >= 4 && sub_parameter_length <= 16) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_nonce, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
} else {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x02: /* Session ID */
|
|
|
|
if (sub_parameter_length == 16) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_session_id, tvb, offset, 16, ENC_NA);
|
|
|
|
|
|
|
|
offset += 16;
|
|
|
|
} else {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x03: /* Next Sequence Number */
|
|
|
|
if (sub_parameter_length == 1) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_next_sequence_number, tvb, offset, 1, ENC_NA);
|
|
|
|
|
|
|
|
offset += 1;
|
|
|
|
} else {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x04: /* Timeout */
|
|
|
|
if (sub_parameter_length == 4) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_timeout, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
} else {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x05: /* Session Opcode */
|
|
|
|
if (sub_parameter_length == 1) {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_opcode, tvb, offset, 1, ENC_NA);
|
|
|
|
|
|
|
|
offset += 1;
|
|
|
|
} else {
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);
|
|
|
|
offset += sub_parameter_length;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
value_length -= 2 + sub_parameter_length;
|
|
|
|
}
|
2015-04-26 18:03:30 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
default:
|
2015-04-18 13:55:42 +00:00
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_byte_seq, tvb, offset, value_length, ENC_NA);
|
2015-03-24 18:37:05 +00:00
|
|
|
offset += value_length;
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x80: /* 1 byte */
|
2015-03-24 18:37:05 +00:00
|
|
|
value = tvb_get_guint8(tvb, offset);
|
|
|
|
|
|
|
|
switch (hdr_id) {
|
|
|
|
case 0x94: /* Action */
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_action, tvb, offset, 1, ENC_NA);
|
|
|
|
proto_item_append_text(hdr_tree, ": %s", val_to_str_const(value, action_vals, "Unknown"));
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x97: /* Single Response Mode */
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_single_response_mode, tvb, offset, 1, ENC_NA);
|
|
|
|
proto_item_append_text(hdr_tree, ": %s", val_to_str_const(value, single_response_mode_vals, "Unknown"));
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x98: /* Single Response Mode Parameter */
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_single_response_mode_parameter, tvb, offset, 1, ENC_NA);
|
|
|
|
proto_item_append_text(hdr_tree, ": %s", val_to_str_const(value, single_response_mode_parameter_vals, "Unknown"));
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0x93: /* Session Sequence Number */
|
|
|
|
default:
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_byte, tvb, offset, 1, ENC_NA);
|
|
|
|
proto_item_append_text(hdr_tree, ": %i", value);
|
|
|
|
}
|
|
|
|
|
|
|
|
offset += 1;
|
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
2015-03-24 18:37:05 +00:00
|
|
|
case 0xC0: /* 4 bytes */
|
|
|
|
switch (hdr_id) {
|
|
|
|
case 0xC0: /* Count */
|
|
|
|
proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
|
|
|
|
proto_tree_add_item(hdr_tree, hf_count, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0xC3: /* Length */
|
|
|
|
proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
|
|
|
|
proto_tree_add_item(hdr_tree, hf_data_length, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0xCB: /* Connection Id */
|
|
|
|
proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
|
|
|
|
proto_tree_add_item(hdr_tree, hf_connection_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 0xC4: /* Time */
|
|
|
|
case 0xCF: /* Creator */
|
|
|
|
case 0xD6: /* Permissions */
|
|
|
|
default:
|
|
|
|
proto_item_append_text(hdr_tree, ": %i", tvb_get_ntohl(tvb, offset));
|
|
|
|
proto_tree_add_item(hdr_tree, hf_hdr_val_long, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
}
|
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
offset += 4;
|
2015-03-24 18:37:05 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
2010-05-19 12:44:57 +00:00
|
|
|
}
|
|
|
|
|
2013-11-02 19:20:04 +00:00
|
|
|
static gint
|
2016-01-27 12:01:49 +00:00
|
|
|
dissect_obex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
2010-05-19 12:44:57 +00:00
|
|
|
{
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_item *main_item;
|
|
|
|
proto_tree *main_tree;
|
|
|
|
proto_item *sub_item;
|
2013-07-17 21:12:24 +00:00
|
|
|
fragment_head *frag_msg = NULL;
|
2015-09-27 16:22:32 +00:00
|
|
|
gboolean save_fragmented;
|
|
|
|
gboolean complete;
|
2012-03-12 14:38:59 +00:00
|
|
|
tvbuff_t* new_tvb = NULL;
|
|
|
|
tvbuff_t* next_tvb = NULL;
|
2013-11-02 19:20:04 +00:00
|
|
|
gint offset = 0;
|
2013-02-11 15:04:53 +00:00
|
|
|
gint profile = PROFILE_UNKNOWN;
|
2015-04-05 11:57:53 +00:00
|
|
|
const gchar *path = path_unknown;
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_profile_data_t *obex_profile_data;
|
|
|
|
wmem_tree_key_t key[6];
|
|
|
|
guint32 frame_number;
|
2013-02-11 15:04:53 +00:00
|
|
|
obex_last_opcode_data_t *obex_last_opcode_data;
|
2015-04-05 11:57:53 +00:00
|
|
|
obex_path_data_t *obex_path_data;
|
2013-11-23 21:41:08 +00:00
|
|
|
guint32 length;
|
2014-08-25 13:46:54 +00:00
|
|
|
guint8 *profile_data;
|
|
|
|
dissector_handle_t current_handle;
|
|
|
|
dissector_handle_t default_handle;
|
2015-09-27 16:22:32 +00:00
|
|
|
gint previous_proto;
|
|
|
|
obex_proto_data_t obex_proto_data;
|
2013-12-02 21:34:23 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
previous_proto = (GPOINTER_TO_INT(wmem_list_frame_data(wmem_list_frame_prev(wmem_list_tail(pinfo->layers)))));
|
|
|
|
if (previous_proto == proto_btl2cap) {
|
|
|
|
btl2cap_data_t *l2cap_data;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
l2cap_data = (btl2cap_data_t *) data;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_proto_data.interface_id = l2cap_data->interface_id;
|
|
|
|
obex_proto_data.adapter_id = l2cap_data->adapter_id;
|
|
|
|
obex_proto_data.chandle = l2cap_data->chandle;
|
|
|
|
obex_proto_data.channel = l2cap_data->cid;
|
|
|
|
} else if (previous_proto == proto_btrfcomm) {
|
|
|
|
btrfcomm_data_t *rfcomm_data;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
rfcomm_data = (btrfcomm_data_t *) data;
|
2013-11-02 19:20:04 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_proto_data.interface_id = rfcomm_data->interface_id;
|
|
|
|
obex_proto_data.adapter_id = rfcomm_data->adapter_id;
|
|
|
|
obex_proto_data.chandle = rfcomm_data->chandle;
|
|
|
|
obex_proto_data.channel = rfcomm_data->dlci >> 1;
|
2013-02-11 15:04:53 +00:00
|
|
|
} else {
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_proto_data.interface_id = HCI_INTERFACE_DEFAULT;
|
|
|
|
obex_proto_data.adapter_id = HCI_ADAPTER_DEFAULT;
|
|
|
|
obex_proto_data.chandle = 0;
|
|
|
|
obex_proto_data.channel = 0;
|
|
|
|
}
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OBEX");
|
2013-11-02 19:20:04 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
main_item = proto_tree_add_item(tree, proto_obex, tvb, 0, tvb_captured_length(tvb), ENC_NA);
|
|
|
|
main_tree = proto_item_add_subtree(main_item, ett_obex);
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
save_fragmented = pinfo->fragmented;
|
|
|
|
|
2016-01-24 03:40:51 +00:00
|
|
|
frame_number = pinfo->num;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
key[0].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[0].key = &obex_proto_data.interface_id;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[1].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[1].key = &obex_proto_data.adapter_id;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[2].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[2].key = &obex_proto_data.chandle;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[3].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[3].key = &obex_proto_data.channel;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[4].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[4].key = &frame_number;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[5].length = 0;
|
|
|
|
key[5].key = NULL;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
profile_data = (guint8 *) p_get_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE);
|
2014-08-25 13:46:54 +00:00
|
|
|
if (profile_data == NULL) {
|
|
|
|
obex_profile_data = (obex_profile_data_t *)wmem_tree_lookup32_array_le(obex_profile, key);
|
2015-09-27 16:22:32 +00:00
|
|
|
if (obex_profile_data && obex_profile_data->interface_id == obex_proto_data.interface_id &&
|
|
|
|
obex_profile_data->adapter_id == obex_proto_data.adapter_id &&
|
|
|
|
obex_profile_data->chandle == obex_proto_data.chandle &&
|
|
|
|
obex_profile_data->channel == obex_proto_data.channel) {
|
2014-08-25 13:46:54 +00:00
|
|
|
profile = obex_profile_data->profile;
|
|
|
|
}
|
|
|
|
|
|
|
|
profile_data = wmem_new(wmem_file_scope(), guint8);
|
|
|
|
*profile_data = profile;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
p_add_proto_data(pinfo->pool, pinfo, proto_obex, PROTO_DATA_OBEX_PROFILE, profile_data);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
obex_path_data = (obex_path_data_t *)wmem_tree_lookup32_array_le(obex_path, key);
|
2015-09-27 16:22:32 +00:00
|
|
|
if (obex_path_data && obex_path_data->interface_id == obex_proto_data.interface_id &&
|
|
|
|
obex_path_data->adapter_id == obex_proto_data.adapter_id &&
|
|
|
|
obex_path_data->chandle == obex_proto_data.chandle &&
|
|
|
|
obex_path_data->channel == obex_proto_data.channel) {
|
2015-04-05 11:57:53 +00:00
|
|
|
path = obex_path_data->path;
|
|
|
|
}
|
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
sub_item = proto_tree_add_uint(main_tree, hf_profile, tvb, 0, 0, profile);
|
|
|
|
PROTO_ITEM_SET_GENERATED(sub_item);
|
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
if (path) {
|
|
|
|
sub_item = proto_tree_add_string(main_tree, hf_current_path, tvb, 0, 0, path);
|
|
|
|
PROTO_ITEM_SET_GENERATED(sub_item);
|
|
|
|
}
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
current_handle = dissector_get_uint_handle(obex_profile_table, profile);
|
|
|
|
default_handle = dissector_get_default_uint_handle("obex.profile", profile);
|
2014-08-25 13:46:54 +00:00
|
|
|
if (current_handle != default_handle) {
|
|
|
|
expert_add_info_format(pinfo, main_item, &ei_decoded_as_profile, "Decoded As %s", dissector_handle_get_long_name(current_handle));
|
|
|
|
}
|
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
complete = FALSE;
|
|
|
|
|
2015-02-26 13:38:57 +00:00
|
|
|
if (tvb_captured_length(tvb) == tvb_reported_length(tvb)) {
|
2016-01-27 12:01:49 +00:00
|
|
|
frag_msg = fragment_get_reassembled_id(&obex_reassembly_table, pinfo, pinfo->p2p_dir);
|
2016-01-24 03:40:51 +00:00
|
|
|
if (frag_msg && pinfo->num != frag_msg->reassembled_in) {
|
2015-03-22 17:36:35 +00:00
|
|
|
/* reassembled but not last */
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-02-26 13:38:57 +00:00
|
|
|
new_tvb = process_reassembled_data(tvb, 0, pinfo,
|
2016-01-27 12:01:49 +00:00
|
|
|
"Reassembled Obex packet", frag_msg, &obex_frag_items, NULL, main_tree);
|
2016-01-24 03:40:51 +00:00
|
|
|
} else if (frag_msg && pinfo->num == frag_msg->reassembled_in) {
|
2015-03-22 17:36:35 +00:00
|
|
|
/* reassembled and last, so dissect reassembled packet here */
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
new_tvb = process_reassembled_data(tvb, 0, pinfo,
|
2016-01-27 12:01:49 +00:00
|
|
|
"Reassembled Obex packet", frag_msg, &obex_frag_items, NULL, main_tree);
|
2015-02-26 13:38:57 +00:00
|
|
|
} else {
|
2016-01-27 12:01:49 +00:00
|
|
|
frag_msg = fragment_get(&obex_reassembly_table, pinfo, pinfo->p2p_dir, NULL);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
if (frag_msg) {
|
|
|
|
/* not the first fragment */
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
/* packet stream is guaranted to be sequence of fragments, one by one,
|
|
|
|
so find last fragment for its offset and length */
|
|
|
|
while (frag_msg->next) {
|
|
|
|
frag_msg = frag_msg->next;
|
|
|
|
}
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
frag_msg = fragment_add_check(&obex_reassembly_table,
|
2015-03-22 17:36:35 +00:00
|
|
|
tvb, 0, pinfo, pinfo->p2p_dir, NULL,
|
|
|
|
frag_msg->offset + frag_msg->len, tvb_reported_length(tvb),
|
|
|
|
((frag_msg->offset + frag_msg->len + tvb_reported_length(tvb)) <
|
2016-01-27 12:01:49 +00:00
|
|
|
fragment_get_tot_len(&obex_reassembly_table, pinfo, pinfo->p2p_dir, NULL)) ? TRUE : FALSE);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-02-26 13:38:57 +00:00
|
|
|
new_tvb = process_reassembled_data(tvb, 0, pinfo,
|
2016-01-27 12:01:49 +00:00
|
|
|
"Reassembled Obex packet", frag_msg, &obex_frag_items, NULL, main_tree);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-02-26 13:38:57 +00:00
|
|
|
pinfo->fragmented = TRUE;
|
2015-03-22 17:36:35 +00:00
|
|
|
} else {
|
|
|
|
if (tvb_reported_length(tvb) < 3) {
|
|
|
|
/* Packet length is in the second and the third bye of packet, anything shorter than 3 is bad */
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s OBEX packet too short",
|
|
|
|
(pinfo->p2p_dir==P2P_DIR_SENT) ? "Sent" : "Rcvd");
|
|
|
|
call_dissector(data_handle, tvb, pinfo, main_tree);
|
|
|
|
return tvb_reported_length(tvb);
|
|
|
|
} else if (tvb_reported_length(tvb) >= 3 && tvb_reported_length(tvb) < tvb_get_ntohs(tvb, offset+1)) {
|
|
|
|
/* first fragment in a sequence */
|
2016-01-27 12:01:49 +00:00
|
|
|
frag_msg = fragment_add_check(&obex_reassembly_table,
|
2015-03-22 17:36:35 +00:00
|
|
|
tvb, 0, pinfo, pinfo->p2p_dir, NULL,
|
|
|
|
0, tvb_reported_length(tvb), TRUE);
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
fragment_set_tot_len(&obex_reassembly_table,
|
2015-03-22 17:36:35 +00:00
|
|
|
pinfo, pinfo->p2p_dir, NULL,
|
|
|
|
tvb_get_ntohs(tvb, offset + 1));
|
|
|
|
|
|
|
|
new_tvb = process_reassembled_data(tvb, 0, pinfo,
|
2016-01-27 12:01:49 +00:00
|
|
|
"Reassembled Obex packet", frag_msg, &obex_frag_items, NULL, main_tree);
|
2015-03-22 17:36:35 +00:00
|
|
|
pinfo->fragmented = TRUE;
|
|
|
|
} else if (tvb_reported_length(tvb) == tvb_get_ntohs(tvb, offset+1)) {
|
|
|
|
/* non-fragmented */
|
|
|
|
complete = TRUE;
|
|
|
|
pinfo->fragmented = FALSE;
|
2015-02-26 13:38:57 +00:00
|
|
|
}
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (new_tvb) { /* take it all */
|
|
|
|
next_tvb = new_tvb;
|
|
|
|
complete = TRUE;
|
2013-02-11 15:04:53 +00:00
|
|
|
} else { /* make a new subset */
|
2012-03-12 14:38:59 +00:00
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (complete) {
|
2013-03-18 06:04:09 +00:00
|
|
|
guint8 code;
|
|
|
|
guint8 final_flag;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
|
|
|
/* fully dissectable packet ready */
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
/* op/response code */
|
2016-01-27 12:01:49 +00:00
|
|
|
code = tvb_get_guint8(next_tvb, offset) & OBEX_CODE_VALS_MASK;
|
2012-03-12 14:38:59 +00:00
|
|
|
final_flag = tvb_get_guint8(next_tvb, offset) & 0x80;
|
|
|
|
|
2013-03-30 21:47:27 +00:00
|
|
|
switch (pinfo->p2p_dir) {
|
|
|
|
case P2P_DIR_SENT:
|
2013-10-29 14:09:20 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
|
2013-03-30 21:47:27 +00:00
|
|
|
break;
|
|
|
|
case P2P_DIR_RECV:
|
2013-10-29 14:09:20 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
|
2013-03-30 21:47:27 +00:00
|
|
|
break;
|
|
|
|
default:
|
2015-01-18 09:44:04 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
|
2013-03-30 21:47:27 +00:00
|
|
|
break;
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
|
2013-10-29 14:09:20 +00:00
|
|
|
col_append_str(pinfo->cinfo, COL_INFO,
|
2012-03-12 14:38:59 +00:00
|
|
|
val_to_str_ext_const(code, &code_vals_ext, "Unknown"));
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
if (code < OBEX_CODE_VALS_CONTINUE || code == OBEX_CODE_VALS_ABORT) {
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_opcode, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
if (!pinfo->fd->flags.visited &&
|
|
|
|
(pinfo->p2p_dir == P2P_DIR_SENT ||
|
|
|
|
pinfo->p2p_dir == P2P_DIR_RECV)) {
|
2016-01-24 03:40:51 +00:00
|
|
|
frame_number = pinfo->num;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
|
|
|
key[0].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[0].key = &obex_proto_data.interface_id;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[1].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[1].key = &obex_proto_data.adapter_id;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[2].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[2].key = &obex_proto_data.chandle;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[3].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[3].key = &obex_proto_data.channel;
|
2013-02-11 15:04:53 +00:00
|
|
|
key[4].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[4].key = &frame_number;
|
2015-03-21 18:01:07 +00:00
|
|
|
key[5].length = 0;
|
|
|
|
key[5].key = NULL;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2015-05-18 10:15:43 +00:00
|
|
|
obex_last_opcode_data = wmem_new0(wmem_file_scope(), obex_last_opcode_data_t);
|
2015-09-27 16:22:32 +00:00
|
|
|
obex_last_opcode_data->interface_id = obex_proto_data.interface_id;
|
|
|
|
obex_last_opcode_data->adapter_id = obex_proto_data.adapter_id;
|
|
|
|
obex_last_opcode_data->chandle = obex_proto_data.chandle;
|
|
|
|
obex_last_opcode_data->channel = obex_proto_data.channel;
|
|
|
|
obex_last_opcode_data->code = code;
|
|
|
|
obex_last_opcode_data->final_flag = final_flag;
|
|
|
|
obex_last_opcode_data->request_in_frame = frame_number;
|
2015-03-21 18:01:07 +00:00
|
|
|
obex_last_opcode_data->response_in_frame = 0;
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2013-06-20 16:31:53 +00:00
|
|
|
wmem_tree_insert32_array(obex_last_opcode, key, obex_last_opcode_data);
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
2013-02-11 15:04:53 +00:00
|
|
|
} else {
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_response_code, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
}
|
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_final_flag, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2012-03-12 14:38:59 +00:00
|
|
|
offset++;
|
|
|
|
|
|
|
|
/* length */
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_length, next_tvb, offset, 2, ENC_BIG_ENDIAN);
|
2013-11-23 21:41:08 +00:00
|
|
|
length = tvb_get_ntohs(tvb, offset) - 3;
|
2012-03-12 14:38:59 +00:00
|
|
|
offset += 2;
|
|
|
|
|
2016-01-24 03:40:51 +00:00
|
|
|
frame_number = pinfo->num;
|
2015-03-21 18:01:07 +00:00
|
|
|
|
|
|
|
key[0].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[0].key = &obex_proto_data.interface_id;
|
2015-03-21 18:01:07 +00:00
|
|
|
key[1].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[1].key = &obex_proto_data.adapter_id;
|
2015-03-21 18:01:07 +00:00
|
|
|
key[2].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[2].key = &obex_proto_data.chandle;
|
2015-03-21 18:01:07 +00:00
|
|
|
key[3].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[3].key = &obex_proto_data.channel;
|
2015-03-21 18:01:07 +00:00
|
|
|
key[4].length = 1;
|
2015-09-27 16:22:32 +00:00
|
|
|
key[4].key = &frame_number;
|
2015-03-21 18:01:07 +00:00
|
|
|
key[5].length = 0;
|
|
|
|
key[5].key = NULL;
|
|
|
|
|
|
|
|
obex_last_opcode_data = (obex_last_opcode_data_t *)wmem_tree_lookup32_array_le(obex_last_opcode, key);
|
2015-09-27 16:22:32 +00:00
|
|
|
if (obex_last_opcode_data && obex_last_opcode_data->interface_id == obex_proto_data.interface_id &&
|
|
|
|
obex_last_opcode_data->adapter_id == obex_proto_data.adapter_id &&
|
|
|
|
obex_last_opcode_data->chandle == obex_proto_data.chandle &&
|
|
|
|
obex_last_opcode_data->channel == obex_proto_data.channel) {
|
2016-01-24 03:40:51 +00:00
|
|
|
if (obex_last_opcode_data->request_in_frame > 0 && obex_last_opcode_data->request_in_frame != pinfo->num) {
|
2015-03-22 17:36:35 +00:00
|
|
|
sub_item = proto_tree_add_uint(main_tree, hf_request_in_frame, next_tvb, 0, 0, obex_last_opcode_data->request_in_frame);
|
2015-03-21 18:01:07 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(sub_item);
|
|
|
|
}
|
|
|
|
|
2016-01-24 03:40:51 +00:00
|
|
|
if (!pinfo->fd->flags.visited && obex_last_opcode_data->response_in_frame == 0 && obex_last_opcode_data->request_in_frame < pinfo->num) {
|
|
|
|
obex_last_opcode_data->response_in_frame = pinfo->num;
|
2015-03-21 18:01:07 +00:00
|
|
|
}
|
|
|
|
|
2016-01-24 03:40:51 +00:00
|
|
|
if (obex_last_opcode_data->response_in_frame > 0 && obex_last_opcode_data->response_in_frame != pinfo->num) {
|
2015-03-22 17:36:35 +00:00
|
|
|
sub_item = proto_tree_add_uint(main_tree, hf_response_in_frame, next_tvb, 0, 0, obex_last_opcode_data->response_in_frame);
|
2015-03-21 18:01:07 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(sub_item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
switch(code)
|
|
|
|
{
|
2016-01-27 12:01:49 +00:00
|
|
|
case OBEX_CODE_VALS_CONNECT:
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_version, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2012-03-12 14:38:59 +00:00
|
|
|
offset++;
|
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_flags, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2012-03-12 14:38:59 +00:00
|
|
|
offset++;
|
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_max_pkt_len, next_tvb, offset, 2, ENC_BIG_ENDIAN);
|
2012-03-12 14:38:59 +00:00
|
|
|
offset += 2;
|
|
|
|
break;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
case OBEX_CODE_VALS_PUT:
|
|
|
|
case OBEX_CODE_VALS_GET:
|
2012-03-12 14:38:59 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", (final_flag == 0x80) ? "final" : "continue");
|
|
|
|
break;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
case OBEX_CODE_VALS_SET_PATH:
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_flags, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(main_tree, hf_set_path_flags_0, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(main_tree, hf_set_path_flags_1, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2015-04-05 11:57:53 +00:00
|
|
|
|
|
|
|
if (!pinfo->fd->flags.visited && obex_last_opcode_data) {
|
|
|
|
obex_last_opcode_data->data.set_data.go_up = tvb_get_guint8(tvb, offset) & 0x01;
|
|
|
|
obex_last_opcode_data->data.set_data.name = NULL;
|
|
|
|
}
|
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
offset++;
|
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_constants, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2012-03-12 14:38:59 +00:00
|
|
|
offset++;
|
|
|
|
break;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
case OBEX_CODE_VALS_DISCONNECT:
|
|
|
|
case OBEX_CODE_VALS_ABORT:
|
2012-03-12 14:38:59 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2015-02-26 13:38:57 +00:00
|
|
|
if (length == 0 && tvb_reported_length_remaining(tvb, offset) > 0) {
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_expert(main_tree, pinfo, &ei_unexpected_data, tvb, offset, tvb_reported_length_remaining(tvb, offset));
|
2015-02-26 13:38:57 +00:00
|
|
|
offset += tvb_reported_length_remaining(tvb, offset);
|
2013-11-23 21:41:08 +00:00
|
|
|
break;
|
|
|
|
} else if (length == 0) break;
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
if (obex_last_opcode_data && obex_last_opcode_data->code == OBEX_CODE_VALS_CONNECT) {
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_version, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset++;
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_flags, next_tvb, offset, 1, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset++;
|
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
proto_tree_add_item(main_tree, hf_max_pkt_len, next_tvb, offset, 2, ENC_BIG_ENDIAN);
|
2013-02-11 15:04:53 +00:00
|
|
|
offset += 2;
|
2015-04-05 11:57:53 +00:00
|
|
|
|
|
|
|
if (!pinfo->fd->flags.visited)
|
2015-09-27 16:22:32 +00:00
|
|
|
save_path(pinfo, path, "", FALSE, &obex_proto_data);
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-09-27 16:22:32 +00:00
|
|
|
dissect_headers(main_tree, next_tvb, offset, pinfo, profile, obex_last_opcode_data, &obex_proto_data);
|
2015-04-05 11:57:53 +00:00
|
|
|
if (!pinfo->fd->flags.visited &&
|
|
|
|
obex_last_opcode_data &&
|
2015-05-18 10:15:43 +00:00
|
|
|
obex_last_opcode_data->data.set_data.name &&
|
2016-01-27 12:01:49 +00:00
|
|
|
obex_last_opcode_data->code == OBEX_CODE_VALS_SET_PATH &&
|
|
|
|
code == OBEX_CODE_VALS_SUCCESS) {
|
2015-09-27 16:22:32 +00:00
|
|
|
save_path(pinfo, path, obex_last_opcode_data->data.set_data.name, obex_last_opcode_data->data.set_data.go_up, &obex_proto_data);
|
2015-04-05 11:57:53 +00:00
|
|
|
}
|
2013-02-11 15:04:53 +00:00
|
|
|
} else {
|
2012-03-12 14:38:59 +00:00
|
|
|
/* packet fragment */
|
2015-03-22 17:36:35 +00:00
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s OBEX fragment",
|
2012-03-12 14:38:59 +00:00
|
|
|
(pinfo->p2p_dir==P2P_DIR_SENT) ? "Sent" : "Rcvd");
|
2015-03-22 17:36:35 +00:00
|
|
|
call_dissector(data_handle, next_tvb, pinfo, main_tree);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2015-03-22 17:36:35 +00:00
|
|
|
offset = tvb_reported_length(tvb);
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pinfo->fragmented = save_fragmented;
|
2013-11-02 19:20:04 +00:00
|
|
|
|
|
|
|
return offset;
|
2010-05-19 12:44:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_register_obex(void)
|
2010-05-19 12:44:57 +00:00
|
|
|
{
|
2015-03-24 18:37:05 +00:00
|
|
|
module_t *module;
|
2016-01-27 12:01:49 +00:00
|
|
|
expert_module_t *expert_obex;
|
2014-08-25 13:46:54 +00:00
|
|
|
int proto_raw;
|
|
|
|
int proto_bpp;
|
|
|
|
int proto_bip;
|
|
|
|
int proto_map;
|
2016-01-27 12:01:49 +00:00
|
|
|
int proto_bt_gpp;
|
|
|
|
int proto_bt_ctn;
|
|
|
|
int proto_bt_pbap;
|
2013-10-26 00:26:41 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_opcode,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Opcode", "obex.opcode",
|
|
|
|
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &code_vals_ext, OBEX_CODE_VALS_MASK,
|
2012-03-12 14:38:59 +00:00
|
|
|
"Request Opcode", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_response_code,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Response Code", "obex.resp_code",
|
|
|
|
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &code_vals_ext, OBEX_CODE_VALS_MASK,
|
2012-03-12 14:38:59 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_final_flag,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Final Flag", "obex.final_flag",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x80,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Packet Length", "obex.pkt_len",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_version,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Version", "obex.version",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(version_vals), 0x00,
|
|
|
|
"Obex Protocol Version", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_flags,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Flags", "obex.flags",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_constants,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Constants", "obex.constants",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_max_pkt_len,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Max. Packet Length", "obex.max_pkt_len",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_set_path_flags_0,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Go back one folder (../) first", "obex.set_path_flags_0",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_set_path_flags_1,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Do not create folder, if not existing", "obex.set_path_flags_1",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x02,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2013-10-26 02:24:04 +00:00
|
|
|
{ &hf_headers,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Headers", "obex.headers",
|
2013-10-26 02:24:04 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_header,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Header", "obex.header",
|
2013-10-26 02:24:04 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2012-03-12 14:38:59 +00:00
|
|
|
{ &hf_hdr_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Header Id", "obex.header.id",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &header_id_vals_ext, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2015-03-20 14:37:59 +00:00
|
|
|
{ &hf_hdr_id_encoding,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Encoding", "obex.header.id.encoding",
|
2015-03-20 14:37:59 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(header_id_encoding_vals), 0xC0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_hdr_id_meaning,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Meaning", "obex.header.id.meaning",
|
2015-03-20 14:37:59 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(header_id_meaning_vals), 0x3F,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2012-03-12 14:38:59 +00:00
|
|
|
{ &hf_hdr_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Length", "obex.header.length",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0,
|
|
|
|
"Header Length", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_hdr_val_unicode,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Value", "obex.header.value.unicode",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
"Unicode Value", HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_hdr_val_byte_seq,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Value", "obex.header.value.byte_sequence",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
2015-03-24 18:37:05 +00:00
|
|
|
"Byte Sequence Value", HFILL}
|
2012-03-12 14:38:59 +00:00
|
|
|
},
|
|
|
|
{ &hf_hdr_val_byte,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Value", "obex.header.value.byte",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_DEC_HEX, NULL, 0,
|
|
|
|
"Byte Value", HFILL}
|
2012-03-12 14:38:59 +00:00
|
|
|
},
|
|
|
|
{ &hf_hdr_val_long,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Value", "obex.header.value.long",
|
2012-03-12 14:38:59 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
|
|
|
"4-byte Value", HFILL}
|
|
|
|
},
|
2015-03-24 18:37:05 +00:00
|
|
|
{ &hf_count,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Count", "obex.count",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_data_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Length", "obex.length",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_connection_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Connection ID", "obex.connection_id",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Session Parameter", "obex.session",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_data,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Value", "obex.session.value",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_tag,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Tag", "obex.session.tag",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(session_tag_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Length", "obex.session.length",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_nonce,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Nonce", "obex.session.nonce",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_session_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Session ID", "obex.session.session_id",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_next_sequence_number,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Next Sequence Number", "obex.session.next_sequence_number",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_timeout,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Timeout", "obex.session.timeout",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_session_parameter_opcode,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Opcode", "obex.session.opcode",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(session_opcode_vals), 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_parameter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Authentication Parameter", "obex.authentication",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_parameter_data,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Value", "obex.authentication.value",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2013-11-23 21:41:08 +00:00
|
|
|
{ &hf_authentication_challenge_tag,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Tag", "obex.authentication.challenge_tag",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(authentication_challenge_tag_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_response_tag,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Tag", "obex.authentication.response_tag",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(authentication_response_tag_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Length", "obex.authentication.length",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_key,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Key", "obex.authentication.key",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_result_key,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Result Key", "obex.authentication.result_key",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_user_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "User Id", "obex.authentication.user_id",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_option_reserved,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.authentication.option.reserved",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xFC,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_option_read_only,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Read Only", "obex.authentication.option.read_only",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x02,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_option_user_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "User ID", "obex.authentication.option.user_id",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_info_charset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Charset", "obex.authentication.info.charset",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(info_charset_vals), 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_authentication_info,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Info", "obex.authentication.info",
|
2013-11-23 21:41:08 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2013-10-26 02:24:04 +00:00
|
|
|
{ &hf_application_parameter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter", "obex.parameter",
|
2013-10-26 02:24:04 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2013-02-11 15:04:53 +00:00
|
|
|
{ &hf_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_application_parameter_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Length", "obex.parameter.length",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_application_parameter_data,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Value", "obex.parameter.value",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
/* application parameters for BPP */
|
|
|
|
{ &hf_bpp_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bpp_application_parameters_vals_ext, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_bpp_application_parameter_data_offset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Offset", "obex.parameter.value.offset",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT32, BASE_DEC_HEX, NULL, 0,
|
|
|
|
"The byte offset into the image or file.", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_bpp_application_parameter_data_count,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Count", "obex.parameter.value.count",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_INT32, BASE_DEC, NULL, 0,
|
|
|
|
"The number of bytes of the image or file to be sent.", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_bpp_application_parameter_data_job_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Job ID", "obex.parameter.value.job_id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT32, BASE_DEC_HEX, NULL, 0,
|
|
|
|
"The job identifier of the print job.", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_bpp_application_parameter_data_file_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "File Size", "obex.parameter.value.file_size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_INT32, BASE_DEC, NULL, 0,
|
|
|
|
"The size (in bytes) of object or file.", HFILL}
|
|
|
|
},
|
|
|
|
/* application parameters for BIP */
|
|
|
|
{ &hf_bip_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bip_application_parameters_vals_ext, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_number_of_returned_handles,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Number of Returned Handles", "obex.parameter.value.number_of_returned_handles",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_list_start_offset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "List Start Offset", "obex.parameter.value.list_start_offset",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_latest_captured_images,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Latest Captured Images", "obex.parameter.value.latest_captured_images",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_partial_file_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Partial File Length", "obex.parameter.value.partial_file_length",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT32, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_partial_file_start_offset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Partial File Start Offset", "obex.parameter.value.partial_file_start_offset",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT32, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_total_file_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Total File Size", "obex.parameter.value.total_file_size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT32, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_end_flag,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "End Flag", "obex.parameter.value.end_flag",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_remote_display,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Remote Display", "obex.parameter.value.remote_display",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(bip_remote_display_vals), 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_service_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Service ID", "obex.parameter.value.service_id",
|
2014-12-12 10:24:44 +00:00
|
|
|
FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_uuid_vals_ext, 0x00,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_bip_application_parameter_data_store_flag,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Store Flag", "obex.parameter.value.store_flag",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
/* application parameters for PBAP */
|
|
|
|
{ &hf_pbap_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX | BASE_EXT_STRING, &pbap_application_parameters_vals_ext, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_order,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Max List Count", "obex.parameter.value.order",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(pbap_order_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_search_value,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Search Value", "obex.parameter.value.search_value",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_search_attribute,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Search Attribute", "obex.parameter.value.search_attribute",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(pbap_search_attribute_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_max_list_count,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Max List Count", "obex.parameter.value.max_list_count",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_list_start_offset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "List Start Offset", "obex.parameter.value.list_start_offset",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2015-03-24 18:37:05 +00:00
|
|
|
{ &hf_pbap_application_parameter_data_filter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter", "obex.parameter.value.filter",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_vcard_selector,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "vCard Selector", "obex.parameter.value.filter",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2013-02-11 15:04:53 +00:00
|
|
|
{ &hf_pbap_application_parameter_data_filter_version,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "vCard Version", "obex.parameter.value.filter.version",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000001,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_fn,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Formatted Name", "obex.parameter.value.filter.fn",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000002,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_n,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Structured Presentation of Name", "obex.parameter.value.filter.n",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000004,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_photo,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Associated Image or Photo", "obex.parameter.value.filter.photo",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000008,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_birthday,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Birthday", "obex.parameter.value.filter.birthday",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000010,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_adr,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Delivery Address", "obex.parameter.value.filter.adr",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000020,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_label,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Delivery", "obex.parameter.value.filter.label",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000040,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_tel,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Telephone Number", "obex.parameter.value.filter.tel",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000080,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_email,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Electronic Mail Address", "obex.parameter.value.filter.email",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000100,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_mailer,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Electronic Mail", "obex.parameter.value.filter.mailer",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000200,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_time_zone,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Time Zone", "obex.parameter.value.filter.time_zone",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000400,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_geographic_position,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Geographic Position", "obex.parameter.value.filter.geographic_position",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000800,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_title,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Job", "obex.parameter.value.filter.title",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00001000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_role,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Role within the Organization", "obex.parameter.value.filter.role",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00002000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_logo,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Organization Logo", "obex.parameter.value.filter.logo",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00004000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_agent,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "vCard of Person Representing", "obex.parameter.value.filter.agent",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00008000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_name_of_organization,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Name of Organization", "obex.parameter.value.filter.name_of_organization",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00010000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_comments,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Comments", "obex.parameter.value.filter.comments",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00020000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_revision,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Revision", "obex.parameter.value.filter.revision",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00040000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_pronunciation_of_name,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Pronunciation of Name", "obex.parameter.value.filter.pronunciation_of_name",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00080000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_url,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Uniform Resource Locator", "obex.parameter.value.filter.url",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00100000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_uid,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Unique ID", "obex.parameter.value.filter.uid",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00200000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_key,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Public Encryption Key", "obex.parameter.value.filter.key",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00400000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_nickname,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Nickname", "obex.parameter.value.filter.nickname",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00800000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_categories,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Categories", "obex.parameter.value.filter.categories",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x01000000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_product_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Product ID", "obex.parameter.value.filter.product_id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x02000000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_class,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Class Information", "obex.parameter.value.filter.class",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x04000000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_sort_string,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "String Used For Sorting Operations", "obex.parameter.value.filter.sort_string",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x08000000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_timestamp,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Timestamp", "obex.parameter.value.filter.timestamp",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x10000000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_reserved_29_31,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.value.filter.reserved_29_31",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0xE0000000,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_reserved_32_38,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.value.filter.reserved_32_38",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x0000007F,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_proprietary_filter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Proprietary Filter", "obex.parameter.value.filter.proprietary_filter",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000080,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_filter_reserved_for_proprietary_filter_usage,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved for Proprietary Filter Usage", "obex.parameter.value.filter.reserved_for_proprietary_filter_usage",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0xFFFFFF00,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_format,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Format", "obex.parameter.value.format",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(pbap_format_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_phonebook_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Phonebook Size", "obex.parameter.value.phonebook_size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_new_missed_calls,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "New Missed Calls", "obex.parameter.value.new_missed_calls",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2015-03-24 18:37:05 +00:00
|
|
|
{ &hf_pbap_application_parameter_data_primary_version_counter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Primary Version Counter", "obex.parameter.value.primary_version_counter",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_secondary_version_counter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Secondary Version Counter", "obex.parameter.value.secondary_version_counter",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_database_identifier,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Database Identifier", "obex.parameter.value.database_identifier",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_vcard_selector_operator,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "vCard Selector Operator", "obex.parameter.value.vcard_selector_operator",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(pbap_application_parameter_data_vcard_selector_operator_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_reset_new_missed_calls,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "vCard Selector Operator", "obex.parameter.value.reset_new_missed_calls",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(pbap_application_parameter_data_reset_new_missed_calls_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Supported Features", "obex.parameter.supported_features",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_reserved,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.supported_features.reserved",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0xFFFFFC00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_default_contact_image_format,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Default Contact Image Format", "obex.parameter.supported_features.default_contact_image_format",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000200,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_contact_referencing,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Contact Referencing", "obex.parameter.supported_features.contact_referencing",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000100,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_x_bt_uid_vcard_property,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "X-BT-UID vCard Property", "obex.parameter.supported_features.x_bt_uid_vcard_property",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000080,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_x_bt_uci_vcard_property,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "X-BT-UCI vCard Property", "obex.parameter.supported_features.x_bt_uci_vcard_property",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000040,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_enhanced_missed_calls,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Enhanced Missed Calls", "obex.parameter.supported_features.enhanced_missed_calls",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000020,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_vcard_selecting,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "vCard Selecting", "obex.parameter.supported_features.vcard_selecting",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000010,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_folder_version_counters,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Folder Version Counters", "obex.parameter.supported_features.folder_version_counters",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000008,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_database_identifier,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Database Identifier", "obex.parameter.supported_features.database_identifier",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000004,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_browsing,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Browsing", "obex.parameter.supported_features.browsing",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000002,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_pbap_application_parameter_data_supported_features_download,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Download", "obex.parameter.supported_features.download",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x00000001,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
2013-02-11 15:04:53 +00:00
|
|
|
/* application parameters for MAP */
|
|
|
|
{ &hf_map_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX | BASE_EXT_STRING, &map_application_parameters_vals_ext, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_max_list_count,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Max List Count", "obex.parameter.value.max_list_count",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_start_offset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Start Offset", "obex.parameter.value.start_offset",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_message_type_reserved,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.value.filter_message_type.reserved",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xF0,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_message_type_mms,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "MMS", "obex.parameter.value.filter_message_type.mms",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x08,
|
|
|
|
"True to filter out, False to listing this type", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_message_type_email,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "EMAIL", "obex.parameter.value.filter_message_type.sms_email",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x04,
|
|
|
|
"True to filter out, False to listing this type", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_message_type_sms_cdma,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "SMS_CDMA", "obex.parameter.value.filter_message_type.sms_cdma",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x02,
|
|
|
|
"True to filter out, False to listing this type", HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_message_type_sms_gsm,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "SMS_GSM", "obex.parameter.value.filter_message_type.sms_gsm",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_period_begin,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Period Begin", "obex.parameter.value.filter_period_begin",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_period_end,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Period End", "obex.parameter.value.filter_period_end",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_read_status_reserved_6,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Read Status: Reserved", "obex.parameter.value.filter_read_status.reserved",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xFC,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_read_status_get_read,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Read Status: Get Read", "obex.parameter.value.filter_read_status.get_read",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x02,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_read_status_get_unread,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Read Status: Get Unread", "obex.parameter.value.filter_read_status.get_unread",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_recipient,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Recipient", "obex.parameter.value.filter_recipient",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_originator,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Originator", "obex.parameter.value.filter_originator",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_priority_reserved_6,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Priority: Reserved", "obex.parameter.value.filter_priority.reserved",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xFC,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_priority_get_high,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Priority: Get Read", "obex.parameter.value.filter_priority.get_high",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x02,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_filter_priority_non_high,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Priority: Get Non High", "obex.parameter.value.filter_priority.non_high",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_reserved_7,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.value.reserved",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xFE,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_attachment,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Attachment", "obex.parameter.value.attachment",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_transparent,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Transparent", "obex.parameter.value.transparent",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_retry,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Retry", "obex.parameter.value.retry",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_new_message,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "New Message", "obex.parameter.value.new_message",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_notification_status,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Notification Status", "obex.parameter.value.notification_status",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_mas_instance_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "MAS Instance ID", "obex.parameter.value.mas_instance_id",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_DEC_HEX, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_reserved,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Reserved", "obex.parameter.value.parameter_mask.reserved",
|
2013-10-26 00:31:42 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0xFFFF0000,
|
2013-02-11 15:04:53 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_reply_to_addressing,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Reply to Addressing", "obex.parameter.value.parameter_mask.reply_to_addressing",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x8000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_protected,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Protected", "obex.parameter.value.parameter_mask.protected",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x4000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_sent,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Sent", "obex.parameter.value.parameter_mask.sent",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x2000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_read,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Read", "obex.parameter.value.parameter_mask.read",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x1000,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_priority,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Priority", "obex.parameter.value.parameter_mask.priority",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0800,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_attachment_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Attachment Size", "obex.parameter.value.parameter_mask.attachment_size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0400,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_text,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Text", "obex.parameter.value.parameter_mask.text",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0200,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_reception_status,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Reception Status", "obex.parameter.value.parameter_mask.reception_status",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0100,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Size", "obex.parameter.value.parameter_mask.size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0080,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_type,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Type", "obex.parameter.value.parameter_mask.type",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0040,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_recipient_addressing,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Recipient Addressing", "obex.parameter.value.parameter_mask.recipient_addressing",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0020,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_recipient_name,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Recipient Name", "obex.parameter.value.parameter_mask.recipient_name",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0010,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_sender_addressing,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Sender Addressing", "obex.parameter.value.parameter_mask.sender_addressing",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0008,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_sender_name,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Sender Name", "obex.parameter.value.parameter_mask.sender_name",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0004,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_datetime,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Datetime", "obex.parameter.value.parameter_mask.datetime",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0002,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_parameter_mask_subject,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask: Subject", "obex.parameter.value.parameter_mask.subject",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 32, NULL, 0x0001,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_folder_listing_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Folder Listing Size", "obex.parameter.value.folder_listing_size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_messages_listing_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Messages Listing Size", "obex.parameter.value.messages_listing_size",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_subject_length,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Subject Length", "obex.parameter.value.subject_length",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_DEC_HEX, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_charset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Charset", "obex.parameter.value.charset",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(map_charset_vals), 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_fraction_request,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Fraction Request", "obex.parameter.value.fraction_request",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(map_fraction_request_vals), 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_fraction_deliver,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Fraction Deliver", "obex.parameter.value.fraction_deliver",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(map_fraction_deliver_vals), 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_status_indicator,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Status Indicator", "obex.parameter.value.status_indicator",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(map_status_indicator_vals), 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_status_value,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Status Value", "obex.parameter.value.status_value",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_map_application_parameter_data_mse_time,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "MSE Time", "obex.parameter.value.mse_time",
|
2013-02-11 15:04:53 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2015-03-24 18:37:05 +00:00
|
|
|
/* application parameters for GPP */
|
|
|
|
{ &hf_gpp_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.gpp.id",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(gpp_application_parameters_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_gpp_application_parameter_data_max_list_count,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Max List Count", "obex.parameter.gpp.value.max_list_count",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_gpp_application_parameter_data_list_start_offset,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "List Start Offset", "obex.parameter.gpp.value.list_start_offset",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_gpp_application_parameter_data_reserved_7,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.gpp.value.reserved",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, NULL, 0xFE,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_gpp_application_parameter_data_notification_status,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Notification Status", "obex.parameter.gpp.value.notification_status",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 0x01,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_gpp_application_parameter_data_instance_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Instance ID", "obex.parameter.gpp.value.instance_id",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_DEC_HEX, NULL, 0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_gpp_application_parameter_data_listing_size,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Listing Size", "obex.parameter.gpp.value.listing_size",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT16, BASE_DEC_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
/* application parameters for CTN */
|
|
|
|
{ &hf_ctn_application_parameter_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Id", "obex.parameter.ctn.id",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(ctn_application_parameters_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_acoustic_alarm_status,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Acoustic Alarm Status", "obex.parameter.ctn.acoustic_alarm_status",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(off_on_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_attachment,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Attachment", "obex.parameter.ctn.attachment",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(ctn_application_parameter_data_attachment_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_send,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Attachment", "obex.parameter.ctn.attachment",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(no_yes_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_filter_period_begin,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Period Begin", "obex.parameter.ctn.filter_period_begin",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_STRING, STR_ASCII, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_filter_period_end,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Filter Period End", "obex.parameter.ctn.filter_period_end",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_STRING, STR_ASCII, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Parameter Mask", "obex.parameter.ctn.parameter_mask",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_reserved,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Reserved", "obex.parameter.ctn.parameter_mask.reserved",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0xFFFFFC00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_recurrent,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Recurrent", "obex.parameter.ctn.parameter_mask.recurrent",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000200,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_send_status,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Send Status", "obex.parameter.ctn.parameter_mask.send_status",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000100,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_alarm_status,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Alarm Status", "obex.parameter.ctn.parameter_mask.",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000080,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_pstatus,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "pStatus", "obex.parameter.ctn.parameter_mask.pstatus",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000040,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_priority,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Priority", "obex.parameter.ctn.parameter_mask.priority",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000020,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_originator_address,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Originator Address", "obex.parameter.ctn.parameter_mask.originator_address",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000010,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_originator_name,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Originator Name", "obex.parameter.ctn.parameter_mask.originator_name",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000008,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_end_time,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "End Time", "obex.parameter.ctn.parameter_mask.end_time",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000004,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_summary,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Summary", "obex.parameter.ctn.parameter_mask.summary",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000002,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_parameter_mask_attachment,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Attachment", "obex.parameter.ctn.parameter_mask.attachment",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_HEX, NULL, 0x00000001,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_status_indicator,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Status Indicator", "obex.parameter.ctn.status_indicator",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(ctn_application_parameter_data_status_indicator_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_status_value,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Status Value", "obex.parameter.ctn.status_value",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(ctn_application_parameter_data_status_value_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_postpone_val,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Postpone Val", "obex.parameter.ctn.postpone_val",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_email_uri,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Email URI", "obex.parameter.ctn.email_uri",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_STRING, STR_ASCII, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_cse_time,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "CSE Time", "obex.parameter.ctn.cse_time",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_STRING, STR_ASCII, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_recurrent,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Recurrent", "obex.parameter.ctn.recurrent",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(no_yes_vals), 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_attach_id,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Attach ID", "obex.parameter.ctn.attach_id",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_ctn_application_parameter_data_last_update,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Last Update", "obex.parameter.ctn.last_update",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_STRING, STR_ASCII, NULL, 0x00,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2012-03-12 14:38:59 +00:00
|
|
|
/* for fragmentation */
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment_overlap,
|
|
|
|
{ "Fragment overlap", "obex.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"Fragment overlaps with other fragments", HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment_overlap_conflict,
|
|
|
|
{ "Conflicting data in fragment overlap", "obex.fragment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"Overlapping fragments contained conflicting data", HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment_multiple_tails,
|
|
|
|
{ "Multiple tail fragments found", "obex.fragment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"Several tails were found when defragmenting the packet", HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment_too_long_fragment,
|
|
|
|
{ "Fragment too long", "obex.fragment.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"Fragment contained data past end of packet", HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment_error,
|
|
|
|
{ "Defragmentation error", "obex.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"Defragmentation error due to illegal fragments", HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment_count,
|
|
|
|
{ "Fragment count", "obex.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragment,
|
|
|
|
{ "OBEX Fragment", "obex.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL }
|
2012-03-12 14:38:59 +00:00
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_fragments,
|
|
|
|
{ "OBEX Fragments", "obex.fragments", FT_NONE, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL }
|
2012-03-12 14:38:59 +00:00
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_reassembled_in,
|
|
|
|
{ "Reassembled OBEX in frame", "obex.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"This OBEX frame is reassembled in this frame", HFILL }
|
|
|
|
},
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &hf_obex_reassembled_length,
|
|
|
|
{ "Reassembled OBEX length", "obex.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0,
|
2012-03-12 14:38:59 +00:00
|
|
|
"The total length of the reassembled payload", HFILL }
|
2013-02-11 15:04:53 +00:00
|
|
|
},
|
|
|
|
{ &hf_profile,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Profile", "obex.profile", FT_UINT32, BASE_DEC | BASE_EXT_STRING, &profile_vals_ext, 0x0,
|
2013-02-11 15:04:53 +00:00
|
|
|
"Blutooth Profile used in this OBEX session", HFILL }
|
2014-10-02 08:37:53 +00:00
|
|
|
},
|
|
|
|
{ &hf_type,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Type", "obex.type", FT_STRINGZ, STR_ASCII, NULL, 0x0,
|
2014-10-02 08:37:53 +00:00
|
|
|
NULL, HFILL }
|
2015-03-21 18:01:07 +00:00
|
|
|
},
|
2015-03-24 18:37:05 +00:00
|
|
|
{ &hf_object_class,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Object Class", "obex.object_class", FT_STRINGZ, STR_ASCII, NULL, 0x0,
|
2015-03-24 18:37:05 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_time_iso8601,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Time", "obex.time", FT_STRINGZ, STR_ASCII, NULL, 0x0,
|
2015-03-24 18:37:05 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_hdr_val_action,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Action", "obex.action", FT_UINT8, BASE_DEC, VALS(action_vals), 0x0,
|
2015-03-24 18:37:05 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_hdr_val_single_response_mode,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Single Response Mode", "obex.single_response_mode", FT_UINT8, BASE_DEC, VALS(single_response_mode_vals), 0x0,
|
2015-03-24 18:37:05 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_hdr_val_single_response_mode_parameter,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Single Response Mode Parameter", "obex.single_response_mode_parameter", FT_UINT8, BASE_DEC, VALS(single_response_mode_parameter_vals), 0x0,
|
2015-03-24 18:37:05 +00:00
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_wan_uuid,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "WAN UUID", "obex.wan_uuid",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_UINT16, BASE_HEX, NULL, 0x00,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_sender_bd_addr,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Sender Address", "obex.sender_bd_addr",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_ETHER, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
|
|
|
{ &hf_name,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Name", "obex.name",
|
2015-03-24 18:37:05 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
2015-04-05 11:57:53 +00:00
|
|
|
{ &hf_current_path,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Current Path", "obex.current_path",
|
2015-04-05 11:57:53 +00:00
|
|
|
FT_STRINGZ, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }
|
|
|
|
},
|
2015-03-21 18:01:07 +00:00
|
|
|
{ &hf_request_in_frame,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Request in Frame", "obex.request_in_frame", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
|
2015-03-21 18:01:07 +00:00
|
|
|
NULL, HFILL}
|
|
|
|
},
|
|
|
|
{ &hf_response_in_frame,
|
2016-01-27 12:01:49 +00:00
|
|
|
{ "Response in Frame", "obex.response_in_frame", FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0,
|
2015-03-21 18:01:07 +00:00
|
|
|
NULL, HFILL}
|
2012-03-12 14:38:59 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup protocol subtree array */
|
|
|
|
static gint *ett[] = {
|
2016-01-27 12:01:49 +00:00
|
|
|
&ett_obex,
|
|
|
|
&ett_obex_hdrs,
|
|
|
|
&ett_obex_hdr,
|
|
|
|
&ett_obex_hdr_id,
|
|
|
|
&ett_obex_filter,
|
|
|
|
&ett_obex_parameter,
|
|
|
|
&ett_obex_fragment,
|
|
|
|
&ett_obex_fragments,
|
|
|
|
&ett_obex_session_parameters,
|
|
|
|
&ett_obex_application_parameters,
|
|
|
|
&ett_obex_authentication_parameters
|
2012-03-12 14:38:59 +00:00
|
|
|
};
|
|
|
|
|
2013-07-09 01:18:52 +00:00
|
|
|
static ei_register_info ei[] = {
|
2016-01-27 12:01:49 +00:00
|
|
|
{ &ei_application_parameter_length_bad, { "obex.parameter.length.bad", PI_PROTOCOL, PI_WARN, "Parameter length bad", EXPFILL }},
|
|
|
|
{ &ei_unexpected_data, { "obex.expert.unexpected_data", PI_PROTOCOL, PI_WARN, "Unexpected data", EXPFILL }},
|
|
|
|
{ &ei_decoded_as_profile, { "obex.expert.decoded_as.profile", PI_PROTOCOL, PI_NOTE, "Decoded As", EXPFILL }},
|
2013-07-09 01:18:52 +00:00
|
|
|
};
|
|
|
|
|
2014-08-25 13:46:54 +00:00
|
|
|
/* Decode As handling */
|
2016-01-27 12:01:49 +00:00
|
|
|
static build_valid_func obex_profile_da_build_value[1] = {obex_profile_value};
|
|
|
|
static decode_as_value_t obex_profile_da_values = {obex_profile_prompt, 1, obex_profile_da_build_value};
|
|
|
|
static decode_as_t obex_profile_da = {"obex", "OBEX Profile", "obex.profile", 1, 0, &obex_profile_da_values, NULL, NULL,
|
2014-08-25 13:46:54 +00:00
|
|
|
decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};
|
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
static build_valid_func media_type_da_build_value[1] = {media_type_value};
|
|
|
|
static decode_as_value_t media_type_da_values = {media_type_prompt, 1, media_type_da_build_value};
|
2016-01-27 12:01:49 +00:00
|
|
|
static decode_as_t media_type_da = {"obex", "Media Type", "media_type",
|
2015-04-19 17:08:13 +00:00
|
|
|
1, 0, &media_type_da_values, NULL, NULL,
|
|
|
|
decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};
|
|
|
|
|
|
|
|
|
2015-04-05 11:57:53 +00:00
|
|
|
obex_path = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
|
2013-06-20 16:31:53 +00:00
|
|
|
obex_profile = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
|
|
|
|
obex_last_opcode = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
|
2013-02-11 15:04:53 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_obex = proto_register_protocol("OBEX Protocol", "OBEX", "obex");
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
obex_handle = register_dissector("obex", dissect_obex, proto_obex);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2016-08-30 22:51:54 +00:00
|
|
|
obex_profile_table = register_dissector_table("obex.profile", "OBEX Profile", proto_obex, FT_UINT8, BASE_DEC);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2012-03-12 14:38:59 +00:00
|
|
|
/* Required function calls to register the header fields and subtrees used */
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_register_field_array(proto_obex, hf, array_length(hf));
|
2012-03-12 14:38:59 +00:00
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2016-01-27 12:01:49 +00:00
|
|
|
expert_obex = expert_register_protocol(proto_obex);
|
|
|
|
expert_register_field_array(expert_obex, ei, array_length(ei));
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2017-01-29 00:53:36 +00:00
|
|
|
reassembly_table_register(&obex_reassembly_table,
|
|
|
|
&addresses_reassembly_table_functions);
|
2015-03-24 18:37:05 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
register_decode_as(&obex_profile_da);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_raw = proto_register_protocol("OBEX Raw Application Parameters", "Raw Application Parameters", "obex.parameter.raw");
|
|
|
|
raw_application_parameters_handle = register_dissector("obex.parameter.raw", dissect_obex_application_parameter_raw, proto_raw);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_bpp = proto_register_protocol("Bluetooth OBEX BPP Application Parameters", "BT BPP Application Parameters", "obex.parameter.bt.bpp");
|
|
|
|
bt_bpp_application_parameters_handle = register_dissector("obex.parameter.bt.bpp", dissect_obex_application_parameter_bt_bpp, proto_bpp);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_bip = proto_register_protocol("Bluetooth OBEX BIP Application Parameters", "BT BIP Application Parameters", "obex.parameter.bt.bip");
|
|
|
|
bt_bip_application_parameters_handle = register_dissector("obex.parameter.bt.bip", dissect_obex_application_parameter_bt_bip, proto_bip);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_map = proto_register_protocol("Bluetooth OBEX MAP Application Parameters", "BT MAP Application Parameters", "obex.parameter.bt.map");
|
|
|
|
bt_map_application_parameters_handle = register_dissector("obex.parameter.bt.map", dissect_obex_application_parameter_bt_map, proto_map);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_bt_gpp = proto_register_protocol("Bluetooth OBEX GPP Application Parameters", "BT GPP Application Parameters", "obex.parameter.bt.gpp");
|
|
|
|
bt_gpp_application_parameters_handle = register_dissector("obex.parameter.bt.gpp", dissect_obex_application_parameter_bt_gpp, proto_bt_gpp);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_bt_ctn = proto_register_protocol("Bluetooth OBEX CTN Application Parameters", "BT CTN Application Parameters", "obex.parameter.bt.ctn");
|
|
|
|
bt_ctn_application_parameters_handle = register_dissector("obex.parameter.bt.ctn", dissect_obex_application_parameter_bt_ctn, proto_bt_ctn);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_bt_pbap = proto_register_protocol("Bluetooth OBEX PBAP Application Parameters", "BT PBAP Application Parameters", "obex.parameter.bt.pbap");
|
|
|
|
bt_pbap_application_parameters_handle = register_dissector("obex.parameter.bt.pbap", dissect_obex_application_parameter_bt_pbap, proto_bt_pbap);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2015-04-19 17:08:13 +00:00
|
|
|
register_decode_as(&media_type_da);
|
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
module = prefs_register_protocol(proto_obex, NULL);
|
|
|
|
prefs_register_static_text_preference(module, "supported_bluetooth_profiles",
|
|
|
|
"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",
|
|
|
|
"Versions of Bluetooth profiles supported by this dissector.");
|
2010-05-19 12:44:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2016-01-27 12:01:49 +00:00
|
|
|
proto_reg_handoff_obex(void)
|
2010-05-19 12:44:57 +00:00
|
|
|
{
|
2016-01-27 12:01:49 +00:00
|
|
|
dissector_add_string("bluetooth.uuid", "1104", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1105", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1106", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1107", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1118", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1119", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "111a", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "111b", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "111c", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "111d", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1120", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1121", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1122", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1123", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "112e", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "112f", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1130", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1132", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1133", obex_handle);
|
|
|
|
dissector_add_string("bluetooth.uuid", "1134", obex_handle);
|
2012-03-12 14:38:59 +00:00
|
|
|
|
2016-03-16 13:02:52 +00:00
|
|
|
http_handle = find_dissector_add_dependency("http", proto_obex);
|
|
|
|
xml_handle = find_dissector_add_dependency("xml", proto_obex);
|
2012-03-12 14:38:59 +00:00
|
|
|
data_handle = find_dissector("data");
|
2015-04-19 17:08:13 +00:00
|
|
|
data_text_lines_handle = find_dissector("data-text-lines");
|
2012-11-05 08:39:51 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
dissector_add_uint("obex.profile", PROFILE_UNKNOWN, raw_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_BPP, bt_bpp_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_BIP, bt_bip_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_CTN, bt_ctn_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_GPP, bt_gpp_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_MAP, bt_map_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_PBAP, bt_pbap_application_parameters_handle);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
dissector_add_uint("obex.profile", PROFILE_OPP, raw_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_FTP, raw_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_SYNCML, raw_application_parameters_handle);
|
|
|
|
dissector_add_uint("obex.profile", PROFILE_SYNC, raw_application_parameters_handle);
|
2014-08-25 13:46:54 +00:00
|
|
|
|
2016-01-27 12:01:49 +00:00
|
|
|
dissector_add_for_decode_as("btrfcomm.dlci", obex_handle);
|
|
|
|
dissector_add_for_decode_as("btl2cap.psm", obex_handle);
|
|
|
|
dissector_add_for_decode_as("btl2cap.cid", obex_handle);
|
2015-04-19 17:08:13 +00:00
|
|
|
|
|
|
|
/* PBAP */
|
|
|
|
dissector_add_string("media_type", "x-bt/phonebook", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/vcard", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/vcard-listing", xml_handle);
|
|
|
|
/* MAP */
|
|
|
|
dissector_add_string("media_type", "x-bt/message", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/messageStatus", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/MAP-messageUpdate", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/MAP-NotificationRegistration", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/MASInstanceInformation", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/MAP-msg-listing", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/MAP-event-report", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-obex/folder-listing", xml_handle);
|
|
|
|
/* CTN */
|
|
|
|
dissector_add_string("media_type", "x-bt/CTN-EventReport", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/CTN-Listing", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/CTN-NotificationRegistration", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/Calendar", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/CalendarStatus", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/CTN-forward", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/InstanceDescription", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/Update", data_text_lines_handle);
|
|
|
|
/* BPP */
|
|
|
|
dissector_add_string("media_type", "text/x-ref-simple", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "text/x-ref-list", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-obex/RUI", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-obex/bt-SOAP", xml_handle);
|
|
|
|
/* BIP */
|
|
|
|
dissector_add_string("media_type", "x-bt/img-listing", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-properties", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-capabilities", xml_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-print", data_text_lines_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-img", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-thm", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-attachment", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-display", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-partial", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-archive", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-status", data_handle);
|
|
|
|
dissector_add_string("media_type", "x-bt/img-monitoring", data_handle);
|
|
|
|
|
|
|
|
media_type_dissector_table = find_dissector_table("media_type");
|
2016-01-27 12:01:49 +00:00
|
|
|
|
|
|
|
dissector_add_for_decode_as("usb.product", obex_handle);
|
|
|
|
dissector_add_for_decode_as("usb.device", obex_handle);
|
|
|
|
dissector_add_for_decode_as("usb.protocol", obex_handle);
|
2016-10-07 20:25:01 +00:00
|
|
|
dissector_add_for_decode_as_with_preference("tcp.port", obex_handle);
|
2016-10-05 20:33:54 +00:00
|
|
|
dissector_add_for_decode_as_with_preference("udp.port", obex_handle);
|
2010-05-19 12:44:57 +00:00
|
|
|
}
|
|
|
|
|
2012-10-09 10:36:04 +00:00
|
|
|
/*
|
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|