aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-26 02:24:04 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-26 02:24:04 +0000
commit3cc6957fa87021d1427a8c31fdfccaeb90188ebe (patch)
tree6a412b50715ec56b2a41c38dfe644c895e3ba5f6 /epan
parent6dd42b581a599a31b8ac5ffc5c696969bfc1e2d4 (diff)
Bluetooth: Use items for logical block objects. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
Bluetooth protocols use items, so dissect it to improve filtering and better user experience - text object cannot be filterable or comparable. From Michal Labedzki svn path=/trunk/; revision=52863
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-btatt.c19
-rw-r--r--epan/dissectors/packet-btavdtp.c69
-rw-r--r--epan/dissectors/packet-btavrcp.c90
-rw-r--r--epan/dissectors/packet-bthci_cmd.c34
-rw-r--r--epan/dissectors/packet-bthci_evt.c59
-rw-r--r--epan/dissectors/packet-bthfp.c8
-rw-r--r--epan/dissectors/packet-btobex.c44
-rw-r--r--epan/dissectors/packet-btrfcomm.c68
-rw-r--r--epan/dissectors/packet-btsap.c10
-rw-r--r--epan/dissectors/packet-btsdp.c377
-rw-r--r--epan/dissectors/packet-btsmp.c24
-rw-r--r--epan/dissectors/packet-hci_usb.c24
12 files changed, 663 insertions, 163 deletions
diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c
index 3e196ecd46..f05e42dd6a 100644
--- a/epan/dissectors/packet-btatt.c
+++ b/epan/dissectors/packet-btatt.c
@@ -57,6 +57,8 @@ static int hf_btatt_offset = -1;
static int hf_btatt_flags = -1;
static int hf_btatt_sign_counter = -1;
static int hf_btatt_signature = -1;
+static int hf_btatt_attribute_data = -1;
+static int hf_btatt_handles_info = -1;
/* Initialize the subtree pointers */
static gint ett_btatt = -1;
@@ -370,7 +372,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
case 0x07: /* Find By Type Value Response */
while( tvb_length_remaining(tvb, offset) > 0 ) {
- item = proto_tree_add_text(st, tvb, offset, 4,
+ item = proto_tree_add_none_format(st, hf_btatt_handles_info, tvb, offset, 4,
"Handles Info, Handle: 0x%04x, Group End Handle: 0x%04x",
tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
@@ -419,7 +421,8 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
while (tvb_length_remaining(tvb, offset) >= length)
{
- item = proto_tree_add_text(st, tvb, offset, length, "Attribute Data, Handle: 0x%04x",
+ item = proto_tree_add_none_format(st, hf_btatt_attribute_data, tvb,
+ offset, length, "Attribute Data, Handle: 0x%04x",
tvb_get_letohs(tvb, offset));
ltree = proto_item_add_subtree(item, ett_btatt_list);
@@ -479,7 +482,7 @@ dissect_btatt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
col_append_fstr(pinfo->cinfo, COL_INFO, ", Attribute List Length: %u", tvb_length_remaining(tvb, offset)/length);
while (tvb_length_remaining(tvb, offset) >= length) {
- item = proto_tree_add_text(st, tvb, offset, length,
+ item = proto_tree_add_none_format(st, hf_btatt_attribute_data, tvb, offset, length,
"Attribute Data, Handle: 0x%04x, Group End Handle: 0x%04x",
tvb_get_letohs(tvb, offset), tvb_get_letohs(tvb, offset+2));
@@ -560,6 +563,16 @@ proto_register_btatt(void)
FT_UINT8, BASE_HEX, VALS(opcode_vals), 0x0,
NULL, HFILL}
},
+ {&hf_btatt_handles_info,
+ {"Handles Info", "btatt.handles_info",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}
+ },
+ {&hf_btatt_attribute_data,
+ {"Attribute Data", "btatt.attribute_data",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}
+ },
{&hf_btatt_handle,
{"Handle", "btatt.handle",
FT_UINT16, BASE_HEX, NULL, 0x0,
diff --git a/epan/dissectors/packet-btavdtp.c b/epan/dissectors/packet-btavdtp.c
index f92478db9a..424e383f61 100644
--- a/epan/dissectors/packet-btavdtp.c
+++ b/epan/dissectors/packet-btavdtp.c
@@ -105,6 +105,7 @@ static int hf_btavdtp_data = -1;
static int hf_btavdtp_message_type = -1;
static int hf_btavdtp_packet_type = -1;
static int hf_btavdtp_transaction = -1;
+static int hf_btavdtp_signal = -1;
static int hf_btavdtp_signal_id = -1;
static int hf_btavdtp_rfa0 = -1;
static int hf_btavdtp_number_of_signal_packets = -1;
@@ -115,6 +116,9 @@ static int hf_btavdtp_sep_media_type = -1;
static int hf_btavdtp_sep_type = -1;
static int hf_btavdtp_sep_rfa1 = -1;
static int hf_btavdtp_error_code = -1;
+static int hf_btavdtp_acp_sep = -1;
+static int hf_btavdtp_acp_seid_item = -1;
+static int hf_btavdtp_int_seid_item = -1;
static int hf_btavdtp_acp_seid = -1;
static int hf_btavdtp_int_seid = -1;
static int hf_btavdtp_service_category = -1;
@@ -221,6 +225,9 @@ static int hf_btavdtp_mpeg4_level_rfa = -1;
static int hf_btavdtp_vendor_id = -1;
static int hf_btavdtp_vendor_specific_codec_id = -1;
static int hf_btavdtp_vendor_specific_value = -1;
+static int hf_btavdtp_capabilities = -1;
+static int hf_btavdtp_service = -1;
+static int hf_btavdtp_service_multiplexing_entry = -1;
static gint ett_btavdtp = -1;
static gint ett_btavdtp_sep = -1;
@@ -490,7 +497,7 @@ dissect_sep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)
seid = seid >> 2;
media_type = tvb_get_guint8(tvb, offset + 1) >> 4;
type = (tvb_get_guint8(tvb, offset + 1) & 0x08) >> 3;
- sep_item = proto_tree_add_text(tree, tvb, offset, 2, "ACP SEP [%u - %s %s] item %u/%u",
+ sep_item = proto_tree_add_none_format(tree, hf_btavdtp_acp_sep, tvb, offset, 2, "ACP SEP [%u - %s %s] item %u/%u",
seid, val_to_str_const(media_type, media_type_vals, "unknown"),
val_to_str_const(type, sep_type_vals, "unknown"), i_sep, items);
sep_tree = proto_item_add_subtree(sep_item, ett_btavdtp_sep);
@@ -709,7 +716,7 @@ dissect_capabilities(tvbuff_t *tvb, packet_info *pinfo,
gint media_type = 0;
gint media_codec_type = 0;
- capabilities_item = proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset, "Capabilities");
+ capabilities_item = proto_tree_add_item(tree, hf_btavdtp_capabilities, tvb, offset, tvb_length(tvb) - offset, ENC_NA);
capabilities_tree = proto_item_add_subtree(capabilities_item, ett_btavdtp_capabilities);
if (codec) {
@@ -719,7 +726,7 @@ dissect_capabilities(tvbuff_t *tvb, packet_info *pinfo,
while (tvb_length_remaining(tvb, offset) > 0) {
service_category = tvb_get_guint8(tvb, offset);
losc = tvb_get_guint8(tvb, offset + 1);
- service_item = proto_tree_add_text(capabilities_tree, tvb, offset, 2 + losc, "Service: %s", val_to_str_const(service_category, service_category_vals, "RFD"));
+ service_item = proto_tree_add_none_format(capabilities_tree, hf_btavdtp_service, tvb, offset, 2 + losc, "Service: %s", val_to_str_const(service_category, service_category_vals, "RFD"));
service_tree = proto_item_add_subtree(service_item, ett_btavdtp_service);
proto_tree_add_item(service_tree, hf_btavdtp_service_category, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -821,7 +828,7 @@ dissect_capabilities(tvbuff_t *tvb, packet_info *pinfo,
losc -= 1;
if (losc >= 2) {
- pitem = proto_tree_add_text(service_tree, tvb, offset, 1 + losc, "Entry: Media Transport Session");
+ pitem = proto_tree_add_none_format(service_tree, hf_btavdtp_service_multiplexing_entry, tvb, offset, 1 + losc, "Entry: Media Transport Session");
ptree = proto_item_add_subtree(pitem, ett_btavdtp_service);
proto_tree_add_item(ptree, hf_btavdtp_multiplexing_tsid, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -835,7 +842,7 @@ dissect_capabilities(tvbuff_t *tvb, packet_info *pinfo,
}
if (losc >= 2) {
- pitem = proto_tree_add_text(service_tree, tvb, offset, 1 + losc, "Entry: Reporting Transport Session");
+ pitem = proto_tree_add_none_format(service_tree, hf_btavdtp_service_multiplexing_entry, tvb, offset, 1 + losc, "Entry: Reporting Transport Session");
ptree = proto_item_add_subtree(pitem, ett_btavdtp_service);
proto_tree_add_item(ptree, hf_btavdtp_multiplexing_tsid, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -849,7 +856,7 @@ dissect_capabilities(tvbuff_t *tvb, packet_info *pinfo,
}
if (losc >= 2) {
- pitem = proto_tree_add_text(service_tree, tvb, offset, 1 + losc, "Entry: Recovery Transport Session");
+ pitem = proto_tree_add_none_format(service_tree, hf_btavdtp_service_multiplexing_entry, tvb, offset, 1 + losc, "Entry: Recovery Transport Session");
ptree = proto_item_add_subtree(pitem, ett_btavdtp_service);
proto_tree_add_item(ptree, hf_btavdtp_multiplexing_tsid, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -894,7 +901,7 @@ dissect_seid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset,
}
if (seid_side == SEID_ACP) {
- seid_item = proto_tree_add_text(tree, tvb, offset, 1,
+ seid_item = proto_tree_add_none_format(tree, hf_btavdtp_acp_seid_item, tvb, offset, 1,
"ACP SEID [%u - %s %s]", seid, get_sep_media_type(pinfo->fd->num, seid), get_sep_type(pinfo->fd->num, seid));
seid_tree = proto_item_add_subtree(seid_item, ett_btavdtp_sep);
proto_tree_add_item(seid_tree, hf_btavdtp_acp_seid, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -903,7 +910,7 @@ dissect_seid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset,
col_append_fstr(pinfo->cinfo, COL_INFO, " - ACP SEID [%u - %s %s]",
seid, get_sep_media_type(pinfo->fd->num, seid), get_sep_type(pinfo->fd->num, seid));
} else {
- seid_item = proto_tree_add_text(tree, tvb, offset, 1,
+ seid_item = proto_tree_add_none_format(tree, hf_btavdtp_int_seid_item, tvb, offset, 1,
"INT SEID [%u - %s %s]", seid, get_sep_media_type(pinfo->fd->num, seid), get_sep_type(pinfo->fd->num, seid));
seid_tree = proto_item_add_subtree(seid_item, ett_btavdtp_sep);
proto_tree_add_item(seid_tree, hf_btavdtp_int_seid, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -912,6 +919,7 @@ dissect_seid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset,
col_append_fstr(pinfo->cinfo, COL_INFO, " - INT SEID [%u - %s %s]",
seid, get_sep_media_type(pinfo->fd->num, seid), get_sep_type(pinfo->fd->num, seid));
}
+
proto_tree_add_item(seid_tree, hf_btavdtp_rfa_seid, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1072,7 +1080,8 @@ dissect_btavdtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_type = (tvb_get_guint8(tvb, offset) & AVDTP_MESSAGE_TYPE_MASK);
packet_type = (tvb_get_guint8(tvb, offset) & AVDTP_PACKET_TYPE_MASK) >> 2;
- signal_item = proto_tree_add_text(btavdtp_tree, tvb, offset, (packet_type == PACKET_TYPE_START) ? 3 : 2, "Signal: ");
+ signal_item = proto_tree_add_item(btavdtp_tree, hf_btavdtp_signal, tvb, offset,
+ (packet_type == PACKET_TYPE_START) ? 3 : 2, ENC_NA);
signal_tree = proto_item_add_subtree(signal_item, ett_btavdtp_sep);
proto_tree_add_item(signal_tree, hf_btavdtp_transaction, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1091,7 +1100,7 @@ dissect_btavdtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(signal_tree, hf_btavdtp_signal_id, tvb, offset, 1, ENC_BIG_ENDIAN);
signal_id = tvb_get_guint8(tvb, offset) & AVDTP_SIGNAL_ID_MASK;
- proto_item_append_text(signal_item, "%s (%s)",
+ proto_item_append_text(signal_item, ": %s (%s)",
val_to_str_const(signal_id, signal_id_vals, "Unknown signal"),
val_to_str_const(message_type, message_type_vals, "Unknown message type"));
@@ -1317,6 +1326,11 @@ proto_register_btavdtp(void)
module_t *module;
static hf_register_info hf[] = {
+ { &hf_btavdtp_signal,
+ { "Signal", "btavdtp.signal",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_btavdtp_message_type,
{ "Message Type", "btavdtp.message_type",
FT_UINT8, BASE_HEX, VALS(message_type_vals), AVDTP_MESSAGE_TYPE_MASK,
@@ -1333,7 +1347,7 @@ proto_register_btavdtp(void)
NULL, HFILL }
},
{ &hf_btavdtp_signal_id,
- { "Signal", "btavdtp.sinal_id",
+ { "Signal", "btavdtp.signal_id",
FT_UINT8, BASE_HEX, VALS(signal_id_vals), AVDTP_SIGNAL_ID_MASK,
NULL, HFILL }
},
@@ -1382,7 +1396,21 @@ proto_register_btavdtp(void)
FT_UINT8, BASE_HEX, NULL, 0x07,
NULL, HFILL }
},
-
+ { &hf_btavdtp_acp_sep,
+ { "ACP SEP", "btavdtp.acp_sep",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavdtp_acp_seid_item,
+ { "ACP SEID", "btavdtp.acp_seid_item",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavdtp_int_seid_item,
+ { "INT SEID", "btavdtp.int_seid_item",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_btavdtp_acp_seid,
{ "ACP SEID", "btavdtp.acp_seid",
FT_UINT8, BASE_DEC, NULL, 0xFC,
@@ -1913,11 +1941,26 @@ proto_register_btavdtp(void)
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
+ { &hf_btavdtp_capabilities,
+ { "Capabilities", "btavdtp.capabilities",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_btavdtp_service,
+ { "Service", "btavdtp.service",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_btavdtp_service_multiplexing_entry,
+ { "Entry", "btavdtp.service_multiplexing_entry",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_btavdtp_data,
{ "Data", "btavdtp.data",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
- },
+ }
};
static gint *ett[] = {
diff --git a/epan/dissectors/packet-btavrcp.c b/epan/dissectors/packet-btavrcp.c
index 5a2d25a289..2436d4b5e1 100644
--- a/epan/dissectors/packet-btavrcp.c
+++ b/epan/dissectors/packet-btavrcp.c
@@ -62,6 +62,8 @@ static int hf_btavrcp_unit_type = -1;
static int hf_btavrcp_unit_id = -1;
static int hf_btavrcp_subunit_page = -1;
static int hf_btavrcp_subunit_extention_code = -1;
+static int hf_btavrcp_item = -1;
+static int hf_btavrcp_folder = -1;
static int hf_btavrcp_player_id = -1;
static int hf_btavrcp_status = -1;
static int hf_btavrcp_uid_counter = -1;
@@ -74,9 +76,6 @@ static int hf_btavrcp_folder_name = -1;
static int hf_btavrcp_search = -1;
static int hf_btavrcp_search_length = -1;
static int hf_btavrcp_number_of_attributes = -1;
-static int hf_btavrcp_attribute_count = -1;
-static int hf_btavrcp_attribute_value = -1;
-static int hf_btavrcp_attribute_value_length = -1;
static int hf_btavrcp_uid = -1;
static int hf_btavrcp_scope = -1;
static int hf_btavrcp_start_item = -1;
@@ -100,7 +99,6 @@ static int hf_btavrcp_system_status = -1;
static int hf_btavrcp_number_of_settings = -1;
static int hf_btavrcp_settings_attribute = -1;
static int hf_btavrcp_settings_value = -1;
-static int hf_btavrcp_attribute = -1;
static int hf_btavrcp_displayable_name = -1;
static int hf_btavrcp_displayable_name_length = -1;
static int hf_btavrcp_media_type = -1;
@@ -108,10 +106,20 @@ static int hf_btavrcp_folder_type = -1;
static int hf_btavrcp_folder_playable = -1;
static int hf_btavrcp_major_player_type = -1;
static int hf_btavrcp_player_subtype = -1;
+static int hf_btavrcp_player_item = -1;
+static int hf_btavrcp_attribute = -1;
+static int hf_btavrcp_attribute_count = -1;
+static int hf_btavrcp_attribute_value = -1;
+static int hf_btavrcp_attribute_value_length = -1;
+static int hf_btavrcp_attribute_item = -1;
+static int hf_btavrcp_attribute_list = -1;
+static int hf_btavrcp_attribute_entries = -1;
static int hf_btavrcp_attribute_name_length = -1;
static int hf_btavrcp_attribute_name = -1;
static int hf_btavrcp_setting_value_length = -1;
static int hf_btavrcp_setting_value = -1;
+static int hf_btavrcp_features = -1;
+static int hf_btavrcp_not_used_features = -1;
static int hf_btavrcp_feature_reserved_0 = -1;
static int hf_btavrcp_feature_reserved_1 = -1;
static int hf_btavrcp_feature_reserved_2 = -1;
@@ -187,7 +195,8 @@ static int hf_btavrcp_feature_only_browsable_when_addressed = -1;
static int hf_btavrcp_feature_only_searchable_when_addressed = -1;
static int hf_btavrcp_feature_nowplaying = -1;
static int hf_btavrcp_feature_uid_persistency = -1;
-
+static int hf_btavrcp_reassembled = -1;
+static int hf_btavrcp_currect_path = -1;
static int hf_btavrcp_response_time = -1;
static int hf_btavrcp_data = -1;
@@ -588,7 +597,7 @@ dissect_attribute_id_list(tvbuff_t *tvb, proto_tree *tree, gint offset,
proto_item *pitem;
proto_tree *ptree;
- pitem = proto_tree_add_text(tree, tvb, offset, count * 4, "Attribute List");
+ pitem = proto_tree_add_item(tree, hf_btavrcp_attribute_list, tvb, offset, count * 4, ENC_NA);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_attribute_list);
for (i_attribute = 0; i_attribute < count; ++i_attribute) {
@@ -619,7 +628,7 @@ dissect_attribute_entries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
length += 4 + 2 + 2 + tvb_get_ntohs(tvb, offset + length + 4 + 2);
}
- pitem = proto_tree_add_text(tree, tvb, offset, length, "Attribute Entries");
+ pitem = proto_tree_add_item(tree, hf_btavrcp_attribute_entries, tvb, offset, length, ENC_NA);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_attribute_entries);
for (i_entry = 0; i_entry < count; ++i_entry) {
@@ -629,7 +638,7 @@ dissect_attribute_entries(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (attribute_id == 0x01) col_append_fstr(pinfo->cinfo, COL_INFO, " - Title: \"%s\"", value);
- entry_item = proto_tree_add_text(ptree, tvb, offset, 4 + 2 + 2 + value_length, "Attribute [%21s]: %s", val_to_str_const(attribute_id, attribute_id_vals, "Unknown"), value);
+ entry_item = proto_tree_add_none_format(ptree, hf_btavrcp_attribute_item, tvb, offset, 4 + 2 + 2 + value_length, "Attribute [%21s]: %s", val_to_str_const(attribute_id, attribute_id_vals, "Unknown"), value);
entry_tree = proto_item_add_subtree(entry_item, ett_btavrcp_attribute_entry);
proto_tree_add_item(entry_tree, hf_btavrcp_attribute, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -665,7 +674,7 @@ dissect_item_mediaplayer(tvbuff_t *tvb, proto_tree *tree, gint offset)
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2);
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length);
- pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Player: %s", displayable_name);
+ pitem = proto_tree_add_none_format(tree, hf_btavrcp_player_item, tvb, offset, 1 + 2 + item_length, "Player: %s", displayable_name);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_player);
proto_tree_add_item(ptree, hf_btavrcp_item_type, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -683,10 +692,10 @@ dissect_item_mediaplayer(tvbuff_t *tvb, proto_tree *tree, gint offset)
offset += 4;
/* feature bit mask */
- features_item = proto_tree_add_text(ptree, tvb, offset, 16, "Features");
+ features_item = proto_tree_add_item(ptree, hf_btavrcp_features, tvb, offset, 16, ENC_NA);
features_tree = proto_item_add_subtree(features_item, ett_btavrcp_features);
- features_not_set_item = proto_tree_add_text(features_tree, tvb, offset, 16, "Not Used Features");
+ features_not_set_item = proto_tree_add_item(features_tree, hf_btavrcp_not_used_features, tvb, offset, 16, ENC_NA);
features_not_set_tree = proto_item_add_subtree(features_not_set_item, ett_btavrcp_features_not_used);
feature_octet = tvb_get_guint8(tvb, offset + 0);
@@ -827,7 +836,7 @@ dissect_item_media_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 2);
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length);
- pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Element: %s", displayable_name);
+ pitem = proto_tree_add_none_format(tree, hf_btavrcp_item , tvb, offset, 1 + 2 + item_length, "Element: %s", displayable_name);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_element);
proto_tree_add_item(ptree, hf_btavrcp_item_type, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -879,7 +888,7 @@ dissect_item_folder(tvbuff_t *tvb, proto_tree *tree, gint offset)
displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2);
displayable_name = tvb_get_string(NULL, tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length);
- pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Folder : %s", displayable_name);
+ pitem = proto_tree_add_none_format(tree, hf_btavrcp_folder, tvb, offset, 1 + 2 + item_length, "Folder : %s", displayable_name);
ptree = proto_item_add_subtree(pitem, ett_btavrcp_folder);
proto_tree_add_item(ptree, hf_btavrcp_item_type, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1232,7 +1241,7 @@ dissect_vendor_dependant(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tvb = next_tvb;
offset = 0;
- pitem = proto_tree_add_text(tree, tvb, offset, 0, "Reassembled");
+ pitem = proto_tree_add_item(tree, hf_btavrcp_reassembled, tvb, offset, 0, ENC_NA);
PROTO_ITEM_SET_GENERATED(pitem);
}
}
@@ -1894,7 +1903,7 @@ dissect_browsing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
folder_depth = tvb_get_guint8(tvb, offset);
offset += 1;
- pitem = proto_tree_add_text(tree, tvb, offset, -1, "Current Path: /");
+ pitem = proto_tree_add_none_format(tree, hf_btavrcp_currect_path, tvb, offset, -1, "Current Path: /");
col_append_fstr(pinfo->cinfo, COL_INFO, "Current Path: /");
ptree = proto_item_add_subtree(pitem, ett_btavrcp_path);
@@ -2611,6 +2620,46 @@ proto_register_btavrcp(void)
FT_UINT8, BASE_HEX, VALS(system_status_vals), 0x00,
NULL, HFILL }
},
+ { &hf_btavrcp_player_item,
+ { "Player", "btavrcp.player_item",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_folder,
+ { "Folder", "btavrcp.folder",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_item,
+ { "Item", "btavrcp.item",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_features,
+ { "Features", "btavrcp.features",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_not_used_features,
+ { "Not Used Features", "btavrcp.not_used_features",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_attribute_list,
+ { "Attribute List", "btavrcp.attribute_list",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_attribute_item,
+ { "Attribute", "btavrcp.attribute_item",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_attribute_entries,
+ { "Attribute Entries", "btavrcp.attribute_entries",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_btavrcp_attribute,
{ "Attribute ID", "btavrcp.attribute",
FT_UINT32, BASE_HEX, VALS(attribute_id_vals), 0x00,
@@ -3058,12 +3107,21 @@ proto_register_btavrcp(void)
NULL, HFILL }
},
/* end of features */
+ { &hf_btavrcp_currect_path,
+ { "Currect Path", "btavrcp.currect_path",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btavrcp_reassembled,
+ { "Reassembled", "btavrcp.reassembled",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_btavrcp_response_time,
{ "Response Time", "btavrcp.response_time",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
-
{ &hf_btavrcp_data,
{ "Data", "btavrcp.data",
FT_NONE, BASE_NONE, NULL, 0x0,
diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c
index eac2357432..4561f3410a 100644
--- a/epan/dissectors/packet-bthci_cmd.c
+++ b/epan/dissectors/packet-bthci_cmd.c
@@ -371,6 +371,9 @@ static int hf_bthci_cmd_flags_le_oob_address_type = -1;
static int hf_bthci_cmd_eir_ad_advertising_interval = -1;
static int hf_bthci_cmd_eir_ad_ssp_oob_length = -1;
static int hf_bthci_cmd_eir_ad_company_id = -1;
+static int hf_eir_ad_item = -1;
+static int hf_extended_inquiry_response_data = -1;
+static int hf_advertising_data = -1;
static int hf_3ds_association_notification = -1;
static int hf_3ds_battery_level_reporting = -1;
static int hf_3ds_send_battery_level_report_on_startup = -1;
@@ -1584,8 +1587,9 @@ dissect_bthci_eir_ad_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
proto_item *sub_item;
if (tree) {
- ti_data=proto_tree_add_text(tree, tvb, offset, data_size, (size==240)?"Extended Inquiry Response Data":"Advertising Data");
- ti_data_subtree=proto_item_add_subtree(ti_data, ett_eir_subtree);
+ ti_data = proto_tree_add_item(tree, (size == 240) ? hf_extended_inquiry_response_data : hf_advertising_data,
+ tvb, offset, data_size, ENC_NA);
+ ti_data_subtree = proto_item_add_subtree(ti_data, ett_eir_subtree);
}
i=0;
@@ -1596,15 +1600,14 @@ dissect_bthci_eir_ad_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_t
proto_item *ti_data_struct;
proto_tree *ti_data_struct_subtree;
- ti_data_struct = proto_tree_add_text(ti_data_subtree, tvb, offset + i, length + 1, "%s", "");
- ti_data_struct_subtree = proto_item_add_subtree(ti_data_struct, ett_eir_struct_subtree);
-
type = tvb_get_guint8(tvb, offset + i + 1);
- proto_item_append_text(ti_data_struct, "%s", val_to_str_const(type, bthci_cmd_eir_data_type_vals, "Unknown"));
+ ti_data_struct = proto_tree_add_none_format(ti_data_subtree, hf_eir_ad_item, tvb, offset + i, length + 1, "%s",
+ val_to_str_const(type, bthci_cmd_eir_data_type_vals, "Unknown"));
+ ti_data_struct_subtree = proto_item_add_subtree(ti_data_struct, ett_eir_struct_subtree);
- proto_tree_add_item(ti_data_struct_subtree,hf_bthci_cmd_eir_struct_length, tvb, offset + i, 1, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ti_data_struct_subtree,hf_bthci_cmd_eir_struct_type, tvb, offset + i + 1, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ti_data_struct_subtree, hf_bthci_cmd_eir_struct_length, tvb, offset + i, 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ti_data_struct_subtree, hf_bthci_cmd_eir_struct_type, tvb, offset + i + 1, 1, ENC_LITTLE_ENDIAN);
switch (type) {
case 0x01: /* flags */
@@ -4972,6 +4975,21 @@ proto_register_bthci_cmd(void)
FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_evt_comp_id_ext, 0x0,
NULL, HFILL }
},
+ { &hf_eir_ad_item,
+ { "Item", "bthci_cmd.eir_ad",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_extended_inquiry_response_data,
+ { "Extended Inquiry Response Data", "bthci_cmd.extended_inquiry_response_data",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_advertising_data,
+ { "Advertising Data", "bthci_cmd.advertising_data",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_3ds_association_notification,
{ "3DS Association Notification", "bthci_cmd.eir_ad.3ds.association_notification",
FT_BOOLEAN, 8, NULL, 0x01,
diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c
index be6f3ee894..49f3afee83 100644
--- a/epan/dissectors/packet-bthci_evt.c
+++ b/epan/dissectors/packet-bthci_evt.c
@@ -332,6 +332,7 @@ static int hf_bthci_evt_le_supported_host = -1;
static int hf_bthci_evt_le_simultaneous_host = -1;
static int hf_bthci_evt_le_acl_data_pkt_len = -1;
static int hf_bthci_evt_total_num_le_acl_data_pkts = -1;
+static int hf_bthci_evt_le_features = -1;
static int hf_bthci_evt_le_feature_00 = -1;
static int hf_bthci_evt_white_list_size = -1;
static int hf_bthci_evt_le_channel_map = -1;
@@ -358,6 +359,7 @@ static int hf_bthci_evt_oob_flags_oob_data_present = -1;
static int hf_bthci_evt_oob_flags_le_supported_host = -1;
static int hf_bthci_evt_oob_flags_simultaneous_le_and_br_edr_host = -1;
static int hf_bthci_evt_oob_flags_address_type = -1;
+static int hf_bthci_evt_le_states = -1;
static int hf_bthci_evt_le_states_00 = -1;
static int hf_bthci_evt_le_states_01 = -1;
static int hf_bthci_evt_le_states_02 = -1;
@@ -390,6 +392,10 @@ static int hf_bthci_evt_le_states_34 = -1;
static int hf_bthci_evt_eir_ad_ssp_oob_length = -1;
static int hf_bthci_evt_eir_ad_advertising_interval = -1;
static int hf_bthci_evt_eir_ad_company_id = -1;
+static int hf_eir_ad_item = -1;
+static int hf_extended_inquiry_response_data = -1;
+static int hf_advertising_data = -1;
+static int hf_usable_packet_types = -1;
static int hf_3ds_association_notification = -1;
static int hf_3ds_battery_level_reporting = -1;
static int hf_3ds_send_battery_level_report_on_startup = -1;
@@ -1583,7 +1589,7 @@ dissect_bthci_evt_conn_packet_type_changed(tvbuff_t *tvb, int offset, packet_inf
proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset+=2;
- handle_tree = proto_tree_add_text(tree, tvb, offset, 2, "Usable packet types: ");
+ handle_tree = proto_tree_add_item(tree, hf_usable_packet_types, tvb, offset, 2, ENC_NA);
ti_ptype_subtree = proto_item_add_subtree(handle_tree, ett_ptype_subtree);
if (flags & 0x0008)
@@ -1760,12 +1766,8 @@ dissect_bthci_evt_eir_ad_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
hci_data_t *hci_data = (hci_data_t *) pinfo->private_data;
if(tree){
- if(size == 240 ) { /* EIR data */
- ti_eir=proto_tree_add_text(tree, tvb, offset, 240, "Extended Inquiry Response Data");
- }
- else { /* Advertising data */
- ti_eir=proto_tree_add_text(tree, tvb, offset, size, "Advertising Data");
- }
+ ti_eir = proto_tree_add_item(tree, (size == 240) ? hf_extended_inquiry_response_data : hf_advertising_data,
+ tvb, offset, size, ENC_NA);
ti_eir_subtree=proto_item_add_subtree(ti_eir, ett_eir_subtree);
}
@@ -1777,11 +1779,12 @@ dissect_bthci_evt_eir_ad_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item *ti_eir_struct;
proto_tree *ti_eir_struct_subtree;
- ti_eir_struct = proto_tree_add_text(ti_eir_subtree, tvb, offset + i, length + 1, "%s", "");
- ti_eir_struct_subtree = proto_item_add_subtree(ti_eir_struct, ett_eir_struct_subtree);
-
type = tvb_get_guint8(tvb, offset + i + 1);
+ ti_eir_struct = proto_tree_add_none_format(ti_eir_subtree, hf_eir_ad_item, tvb, offset + i, length + 1, "%s",
+ val_to_str_ext_const(type, &bthci_cmd_eir_data_type_vals_ext, "Unknown"));
+ ti_eir_struct_subtree = proto_item_add_subtree(ti_eir_struct, ett_eir_struct_subtree);
+
proto_item_append_text(ti_eir_struct,"%s", val_to_str_ext_const(type, &bthci_cmd_eir_data_type_vals_ext, "Unknown"));
proto_tree_add_item(ti_eir_struct_subtree,hf_bthci_evt_eir_struct_length, tvb, offset + i, 1, ENC_LITTLE_ENDIAN);
@@ -3223,7 +3226,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo
proto_item *ti_le_features;
proto_item *ti_le_subtree;
- ti_le_features = proto_tree_add_text(tree, tvb, offset, 8, "LE Features");
+ ti_le_features = proto_tree_add_item(tree, hf_bthci_evt_le_features, tvb, offset, 8, ENC_NA);
ti_le_subtree = proto_item_add_subtree(ti_le_features, ett_lmp_subtree);
proto_tree_add_item(ti_le_subtree,hf_bthci_evt_le_feature_00, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -3285,7 +3288,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo
proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset++;
- ti_le_states=proto_tree_add_text(tree, tvb, offset, 8, "Supported LE States");
+ ti_le_states=proto_tree_add_item(tree, hf_bthci_evt_le_states, tvb, offset, 8, ENC_NA);
ti_le_states_subtree=proto_item_add_subtree(ti_le_states, ett_le_state_subtree);
proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_00, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -5399,8 +5402,13 @@ proto_register_bthci_evt(void)
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_bthci_evt_le_features,
+ { "Supported LE Features", "bthci_evt.le_features",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_bthci_evt_le_feature_00,
- { "LE Encryption", "bthci_evt.le_feature",
+ { "LE Encryption", "bthci_evt.le_features.encryption",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL }
},
@@ -5529,6 +5537,11 @@ proto_register_bthci_evt(void)
FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x08,
NULL, HFILL }
},
+ { &hf_bthci_evt_le_states,
+ { "Supported LE States", "bthci_evt.le_states",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_bthci_evt_le_states_00,
{ "Non-connectable Advertising State", "bthci_evt.le_states_00",
FT_BOOLEAN, 8, NULL, 0x01,
@@ -5689,6 +5702,26 @@ proto_register_bthci_evt(void)
FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_evt_comp_id_ext, 0x0,
NULL, HFILL }
},
+ { &hf_eir_ad_item,
+ { "Item", "bthci_evt.eir_ad",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_extended_inquiry_response_data,
+ { "Extended Inquiry Response Data", "bthci_evt.extended_inquiry_response_data",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_advertising_data,
+ { "Advertising Data", "bthci_evt.advertising_data",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_usable_packet_types,
+ { "Usable Packet Types", "bthci_evt.usable_packet_types",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_3ds_association_notification,
{ "3DS Association Notification", "bthci_evt.eir_ad.3ds.association_notification",
FT_BOOLEAN, 8, NULL, 0x01,
diff --git a/epan/dissectors/packet-bthfp.c b/epan/dissectors/packet-bthfp.c
index b98f74ede3..3a19bcfd54 100644
--- a/epan/dissectors/packet-bthfp.c
+++ b/epan/dissectors/packet-bthfp.c
@@ -44,6 +44,7 @@
static int proto_bthfp = -1;
+static int hf_command = -1;
static int hf_role = -1;
static int hf_at_cmd = -1;
static int hf_at_cmd_type = -1;
@@ -909,7 +910,7 @@ dissect_at_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
i_char += 1;
}
- command_item = proto_tree_add_text(tree, tvb,
+ command_item = proto_tree_add_none_format(tree, hf_command, tvb,
offset, 0, "Command %u", command_number);
command_tree = proto_item_add_subtree(command_item, ett_bthfp_command);
@@ -1541,6 +1542,11 @@ proto_register_bthfp(void)
expert_module_t *expert_bthfp;
static hf_register_info hf[] = {
+ { &hf_command,
+ { "Command", "bthfp.command",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL}
+ },
{ &hf_data,
{ "AT Stream", "bthfp.data",
FT_STRING, BASE_NONE, NULL, 0,
diff --git a/epan/dissectors/packet-btobex.c b/epan/dissectors/packet-btobex.c
index 751f5fe9dc..85d4b6d965 100644
--- a/epan/dissectors/packet-btobex.c
+++ b/epan/dissectors/packet-btobex.c
@@ -49,12 +49,15 @@ 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;
+static int hf_headers = -1;
+static int hf_header = -1;
static int hf_hdr_id = -1;
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;
+static int hf_application_parameter = -1;
static int hf_application_parameter_id = -1;
static int hf_application_parameter_length = -1;
static int hf_application_parameter_data = -1;
@@ -632,7 +635,7 @@ dissect_raw_application_parameters(tvbuff_t *tvb, proto_tree *tree, gint offset,
while (parameters_length > 0) {
parameter_id = tvb_get_guint8(tvb, offset);
- parameter_item = proto_tree_add_text(tree, tvb, offset,
+ parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset,
-1, "Parameter: 0x%02x", parameter_id);
parameter_tree = proto_item_add_subtree(parameter_item, ett_btobex_application_parameters);
@@ -670,7 +673,7 @@ dissect_bpp_application_parameters(tvbuff_t *tvb, packet_info *pinfo,
parameter_id = tvb_get_guint8(tvb, offset);
parameter_length = tvb_get_guint8(tvb, offset + 1);
- parameter_item = proto_tree_add_text(tree, tvb, offset, parameter_length + 2,
+ parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
"Parameter: %s", val_to_str_const(parameter_id,
bpp_application_parameters_vals, "Unknown"));
parameter_tree = proto_item_add_subtree(parameter_item, ett_btobex_application_parameters);
@@ -724,7 +727,7 @@ dissect_bip_application_parameters(tvbuff_t *tvb, packet_info *pinfo,
parameter_id = tvb_get_guint8(tvb, offset);
parameter_length = tvb_get_guint8(tvb, offset + 1);
- parameter_item = proto_tree_add_text(tree, tvb, offset, parameter_length + 2,
+ parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
"Parameter: %s", val_to_str_const(parameter_id,
bip_application_parameters_vals, "Unknown"));
parameter_tree = proto_item_add_subtree(parameter_item, ett_btobex_application_parameters);
@@ -798,7 +801,7 @@ dissect_pbap_application_parameters(tvbuff_t *tvb, packet_info *pinfo,
parameter_id = tvb_get_guint8(tvb, offset);
parameter_length = tvb_get_guint8(tvb, offset + 1);
- parameter_item = proto_tree_add_text(tree, tvb, offset, parameter_length + 2,
+ parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
"Parameter: %s", val_to_str_const(parameter_id,
pbap_application_parameters_vals, "Unknown"));
parameter_tree = proto_item_add_subtree(parameter_item, ett_btobex_application_parameters);
@@ -903,7 +906,7 @@ dissect_map_application_parameters(tvbuff_t *tvb, packet_info *pinfo,
parameter_id = tvb_get_guint8(tvb, offset);
parameter_length = tvb_get_guint8(tvb, offset + 1);
- parameter_item = proto_tree_add_text(tree, tvb, offset, parameter_length + 2,
+ parameter_item = proto_tree_add_none_format(tree, hf_application_parameter, tvb, offset, parameter_length + 2,
"Parameter: %s", val_to_str_const(parameter_id,
map_application_parameters_vals, "Unknown"));
parameter_tree = proto_item_add_subtree(parameter_item, ett_btobex_application_parameters);
@@ -1057,7 +1060,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
if (tvb_length_remaining(tvb, offset) > 0) {
proto_item *hdrs;
- hdrs = proto_tree_add_text(tree, tvb, offset, item_length, "Headers");
+ hdrs = proto_tree_add_item(tree, hf_headers, tvb, offset, item_length, ENC_NA);
hdrs_tree = proto_item_add_subtree(hdrs, ett_btobex_hdrs);
}
else {
@@ -1083,7 +1086,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
break;
}
- hdr = proto_tree_add_text(hdrs_tree, tvb, offset, item_length, "%s",
+ hdr = proto_tree_add_none_format(hdrs_tree, hf_header, tvb, offset, item_length, "%s",
val_to_str_ext_const(hdr_id, &header_id_vals_ext, "Unknown"));
hdr_tree = proto_item_add_subtree(hdr, ett_btobex_hdr);
@@ -1639,36 +1642,51 @@ proto_register_btobex(void)
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL}
},
+ { &hf_headers,
+ { "Headers", "btobex.headers",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
+ { &hf_header,
+ { "Header", "btobex.header",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
{ &hf_hdr_id,
- { "Header Id", "btobex.hdr_id",
+ { "Header Id", "btobex.header.id",
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &header_id_vals_ext, 0x00,
NULL, HFILL}
},
{ &hf_hdr_length,
- { "Length", "btobex.pkt_hdr_len",
+ { "Length", "btobex.header.length",
FT_UINT16, BASE_DEC, NULL, 0,
"Header Length", HFILL}
},
{ &hf_hdr_val_unicode,
- { "Value", "btobex.pkt_hdr_val_uc",
+ { "Value", "btobex.header.value.unicode",
FT_STRING, BASE_NONE, NULL, 0,
"Unicode Value", HFILL }
},
{ &hf_hdr_val_byte_seq,
- { "Value", "btobex.hdr_val_byte_seq",
+ { "Value", "btobex.header.value.byte_sequence",
FT_BYTES, BASE_NONE, NULL, 0,
"Byte Value", HFILL}
},
{ &hf_hdr_val_byte,
- { "Value", "btobex.hdr_val_byte",
+ { "Value", "btobex.header.value.byte",
FT_UINT8, BASE_HEX, NULL, 0,
"Byte Sequence Value", HFILL}
},
{ &hf_hdr_val_long,
- { "Value", "btobex.hdr_val_long",
+ { "Value", "btobex.header.value.long",
FT_UINT32, BASE_DEC, NULL, 0,
"4-byte Value", HFILL}
},
+ { &hf_application_parameter,
+ { "Parameter", "btobex.parameter",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
{ &hf_application_parameter_id,
{ "Parameter Id", "btobex.parameter.id",
FT_UINT8, BASE_HEX, NULL, 0x00,
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index a020afc7cd..d31443ebcf 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -57,20 +57,25 @@ static int hf_max_frame_size = -1;
static int hf_max_retrans = -1;
static int hf_fc_credits = -1;
+static int hf_mcc_pn_parameters = -1;
static int hf_pn_i14 = -1;
static int hf_pn_c14 = -1;
+static int hf_mcc = -1;
+static int hf_mcc_types = -1;
static int hf_mcc_len = -1;
static int hf_mcc_ea = -1;
static int hf_mcc_cr = -1;
static int hf_mcc_cmd = -1;
+static int hf_msc_parameters = -1;
static int hf_msc_fc = -1;
static int hf_msc_rtc = -1;
static int hf_msc_rtr = -1;
static int hf_msc_ic = -1;
static int hf_msc_dv = -1;
static int hf_msc_l = -1;
+static int hf_msc_break_bits = -1;
static int hf_fcs = -1;
@@ -82,11 +87,16 @@ static int hf_mcc_dlci = -1;
static int hf_mcc_channel = -1;
static int hf_mcc_direction = -1;
static int hf_mcc_const_1 = -1;
+
static int hf_mcc_pn_dlci = -1;
static int hf_mcc_pn_channel = -1;
static int hf_mcc_pn_direction = -1;
static int hf_mcc_pn_zeros_padding = -1;
+static int hf_acknowledgement_timer_t1 = -1;
+static int hf_address = -1;
+static int hf_control = -1;
+
/* Initialize the protocol and registered fields */
static int proto_btrfcomm = -1;
static int proto_btdun = -1;
@@ -286,6 +296,7 @@ dissect_ctrl_pn(proto_tree *t, tvbuff_t *tvb, int offset, guint8 *mcc_channel)
proto_item *ti;
proto_tree *dlci_tree;
proto_item *dlci_item;
+ proto_item *item;
int mcc_dlci;
guint8 flags;
@@ -305,7 +316,7 @@ dissect_ctrl_pn(proto_tree *t, tvbuff_t *tvb, int offset, guint8 *mcc_channel)
flags = tvb_get_guint8(tvb, offset);
- ti = proto_tree_add_text(t, tvb, offset, 1, "I1-I4: 0x%x, C1-C4: 0x%x", flags & 0xf, (flags >> 4) & 0xf);
+ ti = proto_tree_add_none_format(t, hf_mcc_pn_parameters, tvb, offset, 1, "I1-I4: 0x%x, C1-C4: 0x%x", flags & 0xf, (flags >> 4) & 0xf);
st = proto_item_add_subtree(ti, ett_ctrl_pn_ci);
proto_tree_add_item(st, hf_pn_c14, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -317,7 +328,8 @@ dissect_ctrl_pn(proto_tree *t, tvbuff_t *tvb, int offset, guint8 *mcc_channel)
offset += 1;
/* Ack timer */
- proto_tree_add_text(t, tvb, offset, 1, "Acknowledgement timer (T1): %d ms", (guint32)tvb_get_guint8(tvb, offset) * 100);
+ item = proto_tree_add_item(t, hf_acknowledgement_timer_t1, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ proto_item_append_text(item, "(%d ms)", (guint32)tvb_get_guint8(tvb, offset) * 100);
offset += 1;
/* max frame size */
@@ -364,7 +376,7 @@ dissect_ctrl_msc(proto_tree *t, tvbuff_t *tvb, int offset, int length, guint8 *m
start_offset = offset;
status = tvb_get_guint8(tvb, offset);
- it = proto_tree_add_text(t, tvb, offset, 1, "V.24 Signals: FC = %d, RTC = %d, RTR = %d, IC = %d, DV = %d", (status >> 1) & 1,
+ it = proto_tree_add_none_format(t, hf_msc_parameters, tvb, offset, 1, "V.24 Signals: FC = %d, RTC = %d, RTR = %d, IC = %d, DV = %d", (status >> 1) & 1,
(status >> 2) & 1, (status >> 3) & 1,
(status >> 6) & 1, (status >> 7) & 1);
st = proto_item_add_subtree(it, ett_ctrl_pn_v24);
@@ -377,7 +389,7 @@ dissect_ctrl_msc(proto_tree *t, tvbuff_t *tvb, int offset, int length, guint8 *m
offset += 1;
if (length == 3) {
- proto_tree_add_text(t, tvb, offset, 1, "Break bits B1-B3: 0x%x", (tvb_get_guint8(tvb, offset) & 0xf) >> 1);
+ proto_tree_add_item(t, hf_msc_break_bits, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(t, hf_msc_l, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
}
@@ -413,7 +425,7 @@ dissect_btrfcomm_address(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 *ea
*dlcip = dlci;
}
- ti = proto_tree_add_text(tree, tvb, offset, 1, "Address: E/A flag: %d, C/R flag: %d, Direction: %d, Channel: %u", ea_flag, cr_flag, dlci & 0x01, dlci >> 1);
+ ti = proto_tree_add_none_format(tree, hf_address, tvb, offset, 1, "Address: E/A flag: %d, C/R flag: %d, Direction: %d, Channel: %u", ea_flag, cr_flag, dlci & 0x01, dlci >> 1);
addr_tree = proto_item_add_subtree(ti, ett_addr);
dlci_item = proto_tree_add_item(addr_tree, hf_dlci, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -449,7 +461,7 @@ dissect_btrfcomm_control(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 *pf
*frame_typep = frame_type;
}
- ti = proto_tree_add_text(tree, tvb, offset, 1, "Control: Frame type: %s (0x%x), P/F flag: %d",
+ ti = proto_tree_add_none_format(tree, hf_control, tvb, offset, 1, "Control: Frame type: %s (0x%x), P/F flag: %d",
val_to_str_const(frame_type, vs_frame_type, "Unknown"), frame_type, pf_flag);
hctl_tree = proto_item_add_subtree(ti, ett_control);
@@ -515,7 +527,7 @@ dissect_btrfcomm_MccType(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 *mc
*mcc_typep = mcc_type;
}
- ti = proto_tree_add_text(tree, tvb, start_offset, offset - start_offset,
+ ti = proto_tree_add_none_format(tree, hf_mcc_types, tvb, start_offset, offset - start_offset,
"Type: %s (0x%x), C/R flag = %d, E/A flag = %d",
val_to_str_const(mcc_type, vs_ctl, "Unknown"),
mcc_type, mcc_cr_flag, mcc_ea_flag);
@@ -671,7 +683,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 mcc_dlci;
int start_offset = offset;
- mcc_ti = proto_tree_add_text(rfcomm_tree, tvb, offset, 1, "Multiplexer Control Command");
+ mcc_ti = proto_tree_add_item(rfcomm_tree, hf_mcc, tvb, offset, 1, ENC_NA);
ctrl_tree = proto_item_add_subtree(mcc_ti, ett_btrfcomm_ctrl);
/* mcc type */
@@ -816,6 +828,21 @@ proto_register_btrfcomm(void)
FT_UINT8, BASE_HEX, VALS(vs_cr), 0x02,
"Command/Response flag", HFILL}
},
+ { &hf_mcc,
+ { "Multiplexer Control Command", "btrfcomm.mcc",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
+ { &hf_mcc_pn_parameters,
+ { "Parameters", "btrfcomm.mcc.pn_parameters",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
+ { &hf_mcc_types,
+ { "Types", "btrfcomm.mcc.types",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
{ &hf_mcc_ea,
{ "EA Flag", "btrfcomm.mcc.ea",
FT_UINT8, BASE_HEX, VALS(vs_ea), 0x01,
@@ -876,6 +903,11 @@ proto_register_btrfcomm(void)
FT_UINT8, BASE_HEX, VALS(vs_frame_type), 0xEF,
"Command/Response flag", HFILL}
},
+ { &hf_acknowledgement_timer_t1,
+ { "Acknowledgement Timer T1", "btrfcomm.acknowledgement_timer_t1",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ NULL, HFILL}
+ },
{ &hf_pf,
{ "P/F flag", "btrfcomm.pf",
FT_UINT8, BASE_HEX, NULL, 0x10,
@@ -907,6 +939,11 @@ proto_register_btrfcomm(void)
FT_UINT8, BASE_HEX, NULL, 0,
"Checksum over frame", HFILL}
},
+ { &hf_msc_parameters,
+ { "Parameters", "btrfcomm.mcc.msc_parameters",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
{ &hf_msc_fc,
{ "Flow Control (FC)", "btrfcomm.msc.fc",
FT_UINT8, BASE_HEX, NULL, 0x02,
@@ -937,6 +974,21 @@ proto_register_btrfcomm(void)
FT_UINT8, BASE_DEC, NULL, 0xF0,
NULL, HFILL}
},
+ { &hf_msc_break_bits,
+ { "Break Bits", "btrfcomm.msc.break_bits",
+ FT_UINT8, BASE_DEC, NULL, 0xE0,
+ NULL, HFILL}
+ },
+ { &hf_address,
+ { "Address", "btrfcomm.address",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
+ { &hf_control,
+ { "Control", "btrfcomm.control",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
{ &hf_fc_credits,
{ "Credits", "btrfcomm.credits",
FT_UINT8, BASE_DEC, NULL, 0,
diff --git a/epan/dissectors/packet-btsap.c b/epan/dissectors/packet-btsap.c
index 0347972336..a3e45fc7e8 100644
--- a/epan/dissectors/packet-btsap.c
+++ b/epan/dissectors/packet-btsap.c
@@ -58,6 +58,7 @@ static int proto_btsap = -1;
static int hf_btsap_header_msg_id = -1;
static int hf_btsap_header_number_of_parameters = -1;
static int hf_btsap_header_reserved = -1;
+static int hf_btsap_parameter = -1;
static int hf_btsap_parameter_id = -1;
static int hf_btsap_parameter_reserved = -1;
static int hf_btsap_parameter_length = -1;
@@ -201,7 +202,9 @@ dissect_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
if (parameter_padding_length > 0)
parameter_padding_length = 4 - parameter_padding_length;
- parameter_item = proto_tree_add_text(tree, tvb, offset, 2 + 2 + parameter_length + parameter_padding_length, "Parameter: %s: ", val_to_str_const(parameter_id, parameter_id_vals, "Unknown ParameterID"));
+ parameter_item = proto_tree_add_none_format(tree, hf_btsap_parameter, tvb, offset,
+ 2 + 2 + parameter_length + parameter_padding_length, "Parameter: %s: ",
+ val_to_str_const(parameter_id, parameter_id_vals, "Unknown ParameterID"));
ptree = proto_item_add_subtree(parameter_item, ett_btsap_parameter);
proto_tree_add_item(ptree, hf_btsap_parameter_id, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -605,6 +608,11 @@ proto_register_btsap(void)
FT_UINT16, BASE_HEX, NULL, 0x00,
NULL, HFILL }
},
+ { &hf_btsap_parameter,
+ { "Parameter", "btsap.parameter",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_btsap_parameter_id,
{ "Parameter ID", "btsap.parameter_id",
FT_UINT8, BASE_HEX, VALS(parameter_id_vals), 0x00,
diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c
index 736c88b5f4..75fb1384fe 100644
--- a/epan/dissectors/packet-btsdp.c
+++ b/epan/dissectors/packet-btsdp.c
@@ -52,16 +52,43 @@ static gint hf_parameter_length = -1;
static gint hf_ssr_total_count = -1;
static gint hf_ssr_current_count = -1;
static gint hf_error_code = -1;
+static gint hf_attribute_id_list = -1;
+static gint hf_attribute_id_range_lower = -1;
+static gint hf_attribute_id_range_higher = -1;
static gint hf_attribute_list_byte_count = -1;
static gint hf_maximum_service_record_count = -1;
static gint hf_maximum_attribute_byte_count = -1;
+static gint hf_continuation_state = -1;
static gint hf_continuation_state_length = -1;
static gint hf_continuation_state_value = -1;
static gint hf_fragment = -1;
+static gint hf_partial_record_handle_list = -1;
+static gint hf_reassembled_record_handle_list = -1;
+static gint hf_partial_attribute_list = -1;
+static gint hf_reassembled_attribute_list = -1;
+static gint hf_data_element = -1;
static gint hf_data_element_size = -1;
static gint hf_data_element_type = -1;
static gint hf_data_element_var_size = -1;
static gint hf_data_element_value = -1;
+static gint hf_data_element_value_nil = -1;
+static gint hf_data_element_value_boolean = -1;
+static gint hf_data_element_value_signed_int = -1;
+static gint hf_data_element_value_unsigned_int = -1;
+static gint hf_data_element_value_uuid = -1;
+static gint hf_data_element_value_long_uuid = -1;
+static gint hf_data_element_value_string = -1;
+static gint hf_data_element_value_url = -1;
+static gint hf_data_element_value_alternative = -1;
+static gint hf_data_element_value_sequence = -1;
+static gint hf_profile_descriptor_list = -1;
+static gint hf_attribute_list = -1;
+static gint hf_attribute_lists = -1;
+static gint hf_service_search_pattern = -1;
+static gint hf_service_record_handle_list = -1;
+static gint hf_service_attribute = -1;
+static gint hf_service_attribute_id = -1;
+static gint hf_service_attribute_value = -1;
static gint hf_service_attribute_id_generic = -1;
static gint hf_service_attribute_id_a2dp = -1;
static gint hf_service_attribute_id_avrcp = -1;
@@ -156,6 +183,11 @@ static gint hf_hdp_support_procedure_clock_synchronization_protocol = -1;
static gint hf_hdp_support_procedure_reconnect_acceptance = -1;
static gint hf_hdp_support_procedure_reconnect_initiation = -1;
static gint hf_hdp_support_procedure_reserved = -1;
+static gint hf_hdp_supported_features_data = -1;
+static gint hf_hdp_supported_features_data_mdep_id = -1;
+static gint hf_hdp_supported_features_data_mdep_data_type = -1;
+static gint hf_hdp_supported_features_data_mdep_role = -1;
+static gint hf_hdp_supported_features_data_mdep_description = -1;
static gint hf_hdp_supported_features_mdep_id = -1;
static gint hf_hdp_supported_features_mdep_data_type = -1;
static gint hf_hdp_supported_features_mdep_role = -1;
@@ -186,6 +218,8 @@ static gint hf_hfp_gw_supported_features_ec_and_or_nr_function = -1;
static gint hf_hfp_gw_supported_features_three_way_calling = -1;
static gint hf_sdp_service_uuid = -1;
static gint hf_sdp_service_long_uuid = -1;
+static gint hf_sdp_protocol_item = -1;
+static gint hf_sdp_protocol = -1;
static gint hf_sdp_protocol_psm = -1;
static gint hf_sdp_protocol_channel = -1;
static gint hf_sdp_protocol_gatt_handle_start = -1;
@@ -202,10 +236,13 @@ static gint hf_sdp_service_icon_url = -1;
static gint hf_sdp_service_name = -1;
static gint hf_sdp_service_description = -1;
static gint hf_sdp_service_provider_name = -1;
+static gint hf_sdp_lang = -1;
static gint hf_sdp_lang_id = -1;
static gint hf_sdp_lang_code = -1;
static gint hf_sdp_lang_encoding = -1;
static gint hf_sdp_lang_attribute_base = -1;
+static gint hf_hid_descriptor_list_descriptor_data = -1;
+static gint hf_hid_lang = -1;
static gint hf_hid_device_release_number = -1;
static gint hf_hid_parser_version = -1;
static gint hf_hid_device_subclass_type = -1;
@@ -1071,7 +1108,8 @@ dissect_continuation_state(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
} else if (length > 17) {
proto_tree_add_expert(tree, pinfo, &ei_btsdp_continuation_state_large, tvb, offset, -1);
} else if (length == 1 && tvb_get_guint8(tvb, offset) == 0x00) {
- proto_tree_add_text(tree, tvb, offset, -1, "Continuation State: no (0x00)");
+ cont_item = proto_tree_add_none_format(tree, hf_continuation_state, tvb,
+ offset, -1, "Continuation State: no (00)");
} else {
proto_item *cont_tree;
guint data;
@@ -1079,8 +1117,8 @@ dissect_continuation_state(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint8 continuation_state_length;
continuation_state_length = tvb_get_guint8(tvb, offset);
- cont_item = proto_tree_add_text(tree, tvb, offset,
- 1 + continuation_state_length, "Continuation State: ");
+ cont_item = proto_tree_add_none_format(tree, hf_continuation_state, tvb, offset,
+ 1 + continuation_state_length, "Continuation State: yes (");
cont_tree = proto_item_add_subtree(cont_item, ett_btsdp_continuation_state);
proto_tree_add_item(cont_tree, hf_continuation_state_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1088,7 +1126,6 @@ dissect_continuation_state(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
proto_tree_add_item(cont_tree, hf_continuation_state_value, tvb, offset,
continuation_state_length, ENC_NA);
- proto_item_append_text(cont_item, "yes (");
for (i_data = 0; i_data < continuation_state_length - 1; ++i_data) {
data = tvb_get_guint8(tvb, offset);
proto_item_append_text(cont_item, "%02X ", data);
@@ -1537,8 +1574,7 @@ dissect_data_element(proto_tree *tree, proto_tree **next_tree,
type = type >> 3;
- pitem = proto_tree_add_text(tree, tvb, offset, 0,
- "Data Element: %s %s",
+ pitem = proto_tree_add_none_format(tree, hf_data_element, tvb, offset, 0, "Data Element: %s %s",
val_to_str_const(type, vs_data_element_type, "Unknown Type"),
val_to_str_const(size, vs_data_element_size, "Unknown Size"));
ptree = proto_item_add_subtree(pitem, ett_btsdp_data_element);
@@ -1585,7 +1621,7 @@ dissect_attribute_id_list(proto_tree *tree, tvbuff_t *tvb, gint offset, packet_i
const gchar *att_name;
start_offset = offset;
- list_item = proto_tree_add_text(tree, tvb, offset, 2, "Attribute ID List");
+ list_item = proto_tree_add_item(tree, hf_attribute_id_list, tvb, offset, 0, ENC_NA);
list_tree = proto_item_add_subtree(list_item, ett_btsdp_attribute_idlist);
dissect_data_element(list_tree, &next_tree, pinfo, tvb, offset);
@@ -1602,24 +1638,26 @@ dissect_attribute_id_list(proto_tree *tree, tvbuff_t *tvb, gint offset, packet_i
if (byte0 == 0x09) { /* 16 bit attribute id */
id = tvb_get_ntohs(tvb, offset);
- /* Attribute id can be profile/service specific (not unique),
- the list can be requested for various profiles/services,
- so solve only generic attribute ids */
- att_name = val_to_str_const(id, vs_general_attribute_id, "Unknown");
- proto_tree_add_text(next_tree, tvb, offset, 2, "%s (0x%04x)", att_name, id);
+ proto_tree_add_item(next_tree, hf_service_attribute_id_generic, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
bytes_to_go -= 2;
+ att_name = val_to_str_const(id, vs_general_attribute_id, "Unknown");
col_append_fstr(pinfo->cinfo, COL_INFO, " 0x%04x (%s) ", id, att_name);
+ proto_item_append_text(list_item, ": 0x%04x (%s) ", id, att_name);
} else if (byte0 == 0x0a) { /* 32 bit attribute range */
col_append_fstr(pinfo->cinfo, COL_INFO, " (0x%04x - 0x%04x) ",
tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset + 2));
+ proto_item_append_text(list_item, ": (0x%04x - 0x%04x) ",
+ tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset + 2));
+
+ proto_tree_add_item(next_tree, hf_attribute_id_range_lower, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ bytes_to_go -= 2;
- proto_tree_add_text(next_tree, tvb, offset, 4, "0x%04x - 0x%04x",
- tvb_get_ntohs(tvb, offset),
- tvb_get_ntohs(tvb, offset + 2));
- offset += 4;
- bytes_to_go -= 4;
+ proto_tree_add_item(next_tree, hf_attribute_id_range_higher, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ bytes_to_go -= 2;
} else {
break;
}
@@ -1660,14 +1698,14 @@ dissect_protocol_descriptor_list(proto_tree *next_tree, tvbuff_t *tvb,
list_offset = offset;
i_protocol = 1;
while (list_offset - offset < size) {
- feature_item = proto_tree_add_text(next_tree, tvb, list_offset, 0, "Protocol #%u", i_protocol);
+ feature_item = proto_tree_add_none_format(next_tree, hf_sdp_protocol_item, tvb, list_offset, 0, "Protocol #%u", i_protocol);
feature_tree = proto_item_add_subtree(feature_item, ett_btsdp_protocol);
entry_offset = get_type_length(tvb, list_offset, &entry_length);
proto_item_set_len(feature_item, entry_length + (entry_offset - list_offset));
dissect_data_element(feature_tree, &sub_tree, pinfo, tvb, list_offset);
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, entry_length, "Protocol Entry");
+ entry_item = proto_tree_add_item(sub_tree, hf_sdp_protocol, tvb, entry_offset, entry_length, ENC_NA);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_supported_features_mdep_id);
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, entry_offset);
new_offset = get_type_length(tvb, entry_offset, &length);
@@ -2183,12 +2221,12 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
list_offset = offset;
while (list_offset - offset < size) {
entry_offset = get_type_length(tvb, list_offset, &entry_length);
- feature_item = proto_tree_add_text(next_tree, tvb, entry_offset, entry_length, "Supported Feature #%u", i_feature);
+ feature_item = proto_tree_add_none_format(next_tree, hf_hdp_supported_features_data, tvb, entry_offset, entry_length, "Supported Feature #%u", i_feature);
feature_tree = proto_item_add_subtree(feature_item, ett_btsdp_supported_features);
dissect_data_element(feature_tree, &sub_tree, pinfo, tvb, list_offset);
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, 0, "MDEP ID");
+ entry_item = proto_tree_add_item(sub_tree, hf_hdp_supported_features_data_mdep_id, tvb, entry_offset, 0, ENC_NA);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_supported_features_mdep_id);
dissect_data_element(entry_tree, &next_tree, pinfo, tvb, entry_offset);
new_offset = get_type_length(tvb, entry_offset, &length);
@@ -2200,7 +2238,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
proto_item_append_text(entry_item, ": %u (0x%02x)", mdep_id, mdep_id);
entry_offset += length;
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, 0, "MDEP Data Type");
+ entry_item = proto_tree_add_item(sub_tree, hf_hdp_supported_features_data_mdep_data_type, tvb, entry_offset, 0, ENC_NA);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_supported_features_mdep_data_type);
dissect_data_element(entry_tree, &next_tree, pinfo, tvb, entry_offset);
@@ -2212,7 +2250,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
proto_item_append_text(entry_item, ": %u (0x%04x)", value, value);
entry_offset += length;
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, 0, "MDEP Role");
+ entry_item = proto_tree_add_item(sub_tree, hf_hdp_supported_features_data_mdep_role, tvb, entry_offset, 0, ENC_NA);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_supported_features_mdep_role);
dissect_data_element(entry_tree, &next_tree, pinfo, tvb, entry_offset);
@@ -2226,7 +2264,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
entry_offset += length;
if (entry_length - (entry_offset - list_offset) > 0) {
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, entry_length, "MDEP Description");
+ entry_item = proto_tree_add_item(sub_tree, hf_hdp_supported_features_data_mdep_description, tvb, entry_offset, entry_length, ENC_NA);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_supported_features_mdep_description);
dissect_data_element(entry_tree, &next_tree, pinfo, tvb, entry_offset);
@@ -2465,7 +2503,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
list_offset = offset;
i_feature = 1;
while (list_offset - offset < size) {
- entry_item = proto_tree_add_text(next_tree, tvb, list_offset, size, "Descriptor #%u", i_feature);
+ entry_item = proto_tree_add_none_format(next_tree, hf_hid_descriptor_list_descriptor_data, tvb, list_offset, size, "Descriptor #%u", i_feature);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_data_element);
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, list_offset);
@@ -2495,7 +2533,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
i_feature = 1;
while (list_offset - offset < size) {
wmem_strbuf_append(info_buf, "[");
- entry_item = proto_tree_add_text(next_tree, tvb, list_offset, size, "Language #%u", i_feature);
+ entry_item = proto_tree_add_none_format(next_tree, hf_hid_lang, tvb, list_offset, size, "Language #%u", i_feature);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_data_element);
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, list_offset);
@@ -2921,7 +2959,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
i_feature = 1;
while (list_offset - offset < size) {
wmem_strbuf_append(info_buf, "(");
- entry_item = proto_tree_add_text(next_tree, tvb, list_offset, size, "Language #%u", i_feature);
+ entry_item = proto_tree_add_none_format(next_tree, hf_sdp_lang, tvb, list_offset, size, "Language #%u", i_feature);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_data_element);
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, list_offset);
@@ -2971,7 +3009,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
while (list_offset - offset < size) {
entry_offset = get_type_length(tvb, list_offset, &entry_length);
dissect_data_element(next_tree, &sub_tree, pinfo, tvb, list_offset);
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, entry_length, "Profile Descriptor List #%u", i_protocol);
+ entry_item = proto_tree_add_none_format(sub_tree, hf_profile_descriptor_list, tvb, entry_offset, entry_length, "Profile Descriptor List #%u", i_protocol);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_data_element);
dissect_data_element(entry_tree, &sub_tree, pinfo, tvb, entry_offset);
@@ -3029,7 +3067,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
while (list_offset - offset < size) {
entry_offset = get_type_length(tvb, list_offset, &entry_length);
dissect_data_element(next_tree, &sub_tree, pinfo, tvb, list_offset);
- entry_item = proto_tree_add_text(sub_tree, tvb, entry_offset, entry_length, "Protocol Descriptor List #%u", i_protocol);
+ entry_item = proto_tree_add_none_format(sub_tree, hf_profile_descriptor_list, tvb, entry_offset, entry_length, "Protocol Descriptor List #%u", i_protocol);
entry_tree = proto_item_add_subtree(entry_item, ett_btsdp_data_element);
list_offset = get_type_length(tvb, list_offset, &list_length);
@@ -3067,54 +3105,45 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
if (!found) switch (type) {
case 0:
- proto_tree_add_text(next_tree, tvb, offset, size, "Nil ");
+ proto_tree_add_item(next_tree, hf_data_element_value_nil, tvb, offset, size, ENC_NA);
wmem_strbuf_append(info_buf, "Nil ");
break;
case 1: {
guint32 val = get_uint_by_size(tvb, offset, size_index);
- proto_tree_add_text(next_tree, tvb, offset, size,
- "unsigned int %d ", val);
+ proto_tree_add_item(next_tree, hf_data_element_value_unsigned_int, tvb, offset, size, ENC_BIG_ENDIAN);
wmem_strbuf_append_printf(info_buf, "%u ", val);
break;
}
case 2: {
guint32 val = get_int_by_size(tvb, offset, size_index);
- proto_tree_add_text(next_tree, tvb, offset, size,
- "signed int %d ", val);
+ proto_tree_add_item(next_tree, hf_data_element_value_signed_int, tvb, offset, size, ENC_BIG_ENDIAN);
wmem_strbuf_append_printf(info_buf, "%d ", val);
break;
}
case 3: {
guint32 id;
- const gchar *uuid_name;
- gchar *ptr = tvb_bytes_to_str(tvb, offset, size);
- if (size == 2) {
- id = tvb_get_ntohs(tvb, offset);
- } else {
- id = tvb_get_ntohl(tvb, offset);
- }
- uuid_name = val_to_str_ext_const(id, &vs_service_classes_ext, "Unknown service");
-
- proto_tree_add_text(next_tree, tvb, offset, size, "%s (0x%s) ", uuid_name, ptr);
+ id = tvb_get_ntohs(tvb, offset);
+ if (size == 2)
+ proto_tree_add_item(next_tree, hf_data_element_value_uuid, tvb, offset, size, ENC_BIG_ENDIAN);
+ else
+ proto_tree_add_item(next_tree, hf_data_element_value_long_uuid, tvb, offset, size, ENC_NA);
- wmem_strbuf_append_printf(info_buf, ": %s", uuid_name);
+ wmem_strbuf_append_printf(info_buf, ": %s", val_to_str_ext_const(id, &vs_service_classes_ext, "Unknown service"));
break;
}
case 8: /* fall through */
case 4: {
gchar *ptr = (gchar*)tvb_get_string(wmem_packet_scope(), tvb, offset, size);
- proto_tree_add_text(next_tree, tvb, offset, size, "%s \"%s\"",
- type == 8 ? "URL" : "String", ptr);
+ proto_tree_add_item(next_tree, (type == 8) ? hf_data_element_value_url : hf_data_element_value_string, tvb, offset, size, ENC_NA | ENC_ASCII);
wmem_strbuf_append_printf(info_buf, "%s ", ptr);
break;
}
case 5: {
guint8 var = tvb_get_guint8(tvb, offset);
- proto_tree_add_text(next_tree, tvb, offset, size, "%s",
- var ? "true" : "false");
+ proto_tree_add_item(next_tree, hf_data_element_value_boolean, tvb, offset, size, ENC_BIG_ENDIAN);
wmem_strbuf_append_printf(info_buf, "%s ", var ? "true" : "false");
break;
}
@@ -3126,9 +3155,8 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
gint first = 1;
wmem_strbuf_t *substr;
- ti = proto_tree_add_text(next_tree, tvb, offset, size, "%s",
- type == 6 ? "Data Element sequence" :
- "Data Element alternative");
+ ti = proto_tree_add_item(next_tree, (type == 6) ? hf_data_element_value_sequence : hf_data_element_value_alternative,
+ tvb, offset, size, ENC_NA);
st = proto_item_add_subtree(ti, ett_btsdp_des);
wmem_strbuf_append(info_buf, "{ ");
@@ -3413,18 +3441,18 @@ dissect_sdp_service_attribute(proto_tree *tree, tvbuff_t *tvb, gint offset,
hfx_attribute_id = hf_service_attribute_id_generic;
}
- attribute_item = proto_tree_add_text(tree, tvb, offset, -1,
+ attribute_item = proto_tree_add_none_format(tree, hf_service_attribute, tvb, offset, -1,
"Service Attribute: %s%s (0x%x)", profile_speficic, attribute_name, id);
attribute_tree = proto_item_add_subtree(attribute_item, ett_btsdp_attribute);
- attribute_id_item = proto_tree_add_text(attribute_tree, tvb, offset, 3, "Attribute ID: %s", attribute_name);
+ attribute_id_item = proto_tree_add_none_format(attribute_tree, hf_service_attribute_id, tvb, offset, 3, "Attribute ID: %s", attribute_name);
attribute_id_tree = proto_item_add_subtree(attribute_id_item, ett_btsdp_attribute_id);
new_offset = dissect_data_element(attribute_id_tree, &next_tree, pinfo, tvb, offset);
proto_tree_add_item(next_tree, hfx_attribute_id, tvb, offset + 1, 2, ENC_BIG_ENDIAN);
offset = new_offset;
- attribute_value_item = proto_tree_add_text(attribute_tree, tvb, offset, -1, "Attribute Value");
+ attribute_value_item = proto_tree_add_item(attribute_tree, hf_service_attribute_value, tvb, offset, -1, ENC_NA);
attribute_value_tree = proto_item_add_subtree(attribute_value_item, ett_btsdp_attribute_value);
dissect_sdp_type(attribute_value_tree, pinfo, tvb, offset, id, service_uuid,
@@ -3472,8 +3500,8 @@ dissect_sdp_service_attribute_list(proto_tree *tree, tvbuff_t *tvb, gint offset,
offset = get_type_length(tvb, offset, &len);
- list_item = proto_tree_add_text(tree, tvb,
- start_offset, len + (offset - start_offset), "Attribute List");
+ list_item = proto_tree_add_item(tree, hf_attribute_list, tvb,
+ start_offset, len + (offset - start_offset), ENC_NA);
list_tree = proto_item_add_subtree(list_item, ett_btsdp_attribute);
dissect_data_element(list_tree, &next_tree, pinfo, tvb, start_offset);
@@ -3594,8 +3622,8 @@ dissect_sdp_service_attribute_list_array(proto_tree *tree, tvbuff_t *tvb,
offset = get_type_length(tvb, offset, &len);
- lists_item = proto_tree_add_text(tree, tvb, start_offset,
- attribute_list_byte_count, "Attribute Lists");
+ lists_item = proto_tree_add_item(tree, hf_attribute_lists, tvb, start_offset,
+ attribute_list_byte_count, ENC_NA);
lists_tree = proto_item_add_subtree(lists_item, ett_btsdp_attribute);
dissect_data_element(lists_tree, &next_tree, pinfo, tvb, start_offset);
@@ -3655,8 +3683,9 @@ dissect_sdp_service_search_attribute_response(proto_tree *tree, tvbuff_t *tvb,
add_new_data_source(pinfo, new_tvb, (is_continued) ? "Partial Reassembled SDP" : "Reassembled SDP");
- reassembled_item = proto_tree_add_text(tree, new_tvb, 0, tvb_length(new_tvb),
- (is_continued) ? "Partial Attribute List" : "Reassembled Attribute List");
+ reassembled_item = proto_tree_add_item(tree,
+ (is_continued) ? hf_partial_attribute_list : hf_reassembled_attribute_list,
+ new_tvb, 0, tvb_length(new_tvb), ENC_NA);
reassembled_tree = proto_item_add_subtree(reassembled_item, ett_btsdp_reassembled);
PROTO_ITEM_SET_GENERATED(reassembled_item);
@@ -3682,7 +3711,7 @@ dissect_sdp_service_search_attribute_request(proto_tree *tree, tvbuff_t *tvb,
wmem_strbuf_t *info_buf = NULL;
start_offset = offset;
- pitem = proto_tree_add_text(tree, tvb, offset, 2, "Service Search Pattern");
+ pitem = proto_tree_add_item(tree, hf_service_search_pattern, tvb, offset, 0, ENC_NA);
ptree = proto_item_add_subtree(pitem, ett_btsdp_attribute);
dissect_data_element(ptree, &next_tree, pinfo, tvb, offset);
@@ -3751,8 +3780,9 @@ dissect_sdp_service_attribute_response(proto_tree *tree, tvbuff_t *tvb,
add_new_data_source(pinfo, new_tvb, (is_continued) ? "Partial Reassembled SDP" : "Reassembled SDP");
- reassembled_item = proto_tree_add_text(tree, new_tvb, 0, tvb_length(new_tvb),
- (is_continued) ? "Partial Attribute List" : "Reassembled Attribute List");
+ reassembled_item = proto_tree_add_item(tree,
+ (is_continued) ? hf_partial_attribute_list : hf_reassembled_attribute_list,
+ new_tvb, 0, tvb_length(new_tvb), ENC_NA);
reassembled_tree = proto_item_add_subtree(reassembled_item, ett_btsdp_reassembled);
PROTO_ITEM_SET_GENERATED(reassembled_item);
@@ -3801,7 +3831,7 @@ dissect_sdp_service_search_request(proto_tree *tree, tvbuff_t *tvb, gint offset,
start_offset = offset;
- ti = proto_tree_add_text(tree, tvb, offset, 2, "Service Search Pattern");
+ ti = proto_tree_add_item(tree, hf_service_search_pattern, tvb, offset, 0, ENC_NA);
st = proto_item_add_subtree(ti, ett_btsdp_service_search_pattern);
dissect_data_element(st, NULL, pinfo, tvb, offset);
@@ -3853,7 +3883,7 @@ dissect_sdp_service_search_response(proto_tree *tree, tvbuff_t *tvb,
proto_tree_add_item(tree, hf_ssr_current_count, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- ti = proto_tree_add_text(tree, tvb, offset,
+ ti = proto_tree_add_none_format(tree, hf_service_record_handle_list, tvb, offset,
current_count * 4, "Service Record Handle List [count = %u]", current_count);
st = proto_item_add_subtree(ti, ett_btsdp_ssr);
@@ -3877,8 +3907,7 @@ dissect_sdp_service_search_response(proto_tree *tree, tvbuff_t *tvb,
new_length = tvb_length(new_tvb);
- reassembled_item = proto_tree_add_text(tree, new_tvb, 0, new_length,
- (is_continued) ? "Partial Record Handle List" : "Reassembled Record Handle List");
+ reassembled_item = proto_tree_add_item(tree, (is_continued) ? hf_partial_record_handle_list : hf_reassembled_record_handle_list,new_tvb, 0, new_length, ENC_NA);
proto_item_append_text(reassembled_item, " [count = %u]", new_length / 4);
reassembled_tree = proto_item_add_subtree(reassembled_item, ett_btsdp_reassembled);
PROTO_ITEM_SET_GENERATED(reassembled_item);
@@ -4002,6 +4031,21 @@ proto_register_btsdp(void)
FT_UINT16, BASE_DEC, NULL, 0,
"Count of service records in this message", HFILL}
},
+ { &hf_attribute_id_list,
+ { "Attribute ID List", "btsdp.attribute_id_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_attribute_id_range_lower,
+ { "Attribute Range Lower", "btsdp.attribute_range_lower",
+ FT_UINT16, BASE_HEX, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_attribute_id_range_higher,
+ { "Attribute Range Higher", "btsdp.attribute_range_higher",
+ FT_UINT16, BASE_HEX, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_attribute_list_byte_count,
{ "Attribute List Byte Count", "btsdp.attribute_list_byte_count",
FT_UINT16, BASE_DEC, NULL, 0,
@@ -4017,14 +4061,64 @@ proto_register_btsdp(void)
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL}
},
+ { &hf_service_attribute,
+ { "Service Attribute", "btsdp.service_attribute",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_service_attribute_id,
+ { "Attribute", "btsdp.service_attribute.attribute",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_service_attribute_value,
+ { "Value", "btsdp.service_attribute.value",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_profile_descriptor_list,
+ { "Profile Descriptor List", "btsdp.profile_descriptor_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_attribute_list,
+ { "Attribute List", "btsdp.attribute_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_attribute_lists,
+ { "Attribute Lists", "btsdp.attribute_lists",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_service_search_pattern,
+ { "Service Search Pattern", "btsdp.service_search_pattern",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_service_record_handle_list,
+ { "Service Record Handle List", "btsdp.service_record_handle_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_continuation_state,
+ { "Continuation State", "btsdp.continuation_state",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_continuation_state_length,
- { "Continuation State Length", "btsdp.continuation_state_length",
+ { "Continuation State Length", "btsdp.continuation_state.length",
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_continuation_state_value,
- { "Continuation State Value", "btsdp.continuation_state_value",
- FT_BYTES, BASE_NONE, NULL, 0,
+ { "Continuation State Value", "btsdp.continuation_state.value",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element,
+ { "Data Element", "btsdp.data_element",
+ FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }
},
{ &hf_data_element_type,
@@ -4047,11 +4141,82 @@ proto_register_btsdp(void)
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }
},
+ { &hf_data_element_value_nil,
+ { "Value: Nil", "btsdp.data_element.value.nil",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_signed_int,
+ { "Value: Signed Int", "btsdp.data_element.value.signed_int",
+ FT_INT64, BASE_DEC, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_unsigned_int,
+ { "Value: Unsigned Int", "btsdp.data_element.value.unsigned_int",
+ FT_UINT64, BASE_DEC_HEX, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_boolean,
+ { "Value: Boolean", "btsdp.data_element.value.boolean",
+ FT_BOOLEAN, 8, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_string,
+ { "Value: String", "btsdp.data_element.value.string",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_url,
+ { "Value: URL", "btsdp.data_element.value.url",
+ FT_STRING, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_uuid,
+ { "Value: UUID", "btsdp.data_element.value.uuid",
+ FT_UINT16, BASE_HEX, VALS(vs_service_classes), 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_long_uuid,
+ { "Value: UUID", "btsdp.data_element.value.long_uuid",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_sequence,
+ { "Value: Sequence", "btsdp.data_element.value.sequence",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_data_element_value_alternative,
+ { "Value: Alternative", "btsdp.data_element.value.alternative",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_fragment,
{ "Data Fragment", "btsdp.fragment",
FT_NONE, BASE_NONE, NULL, 0,
NULL, HFILL }
},
+ { &hf_partial_attribute_list,
+ { "Partial Attribute List", "btsdp.partial_attribute_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_reassembled_attribute_list,
+ { "Reassembled Attribute List", "btsdp.reassembled_attribute_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+
+ { &hf_partial_record_handle_list,
+ { "Partial Record Handle List", "btsdp.partial_record_handle_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_reassembled_record_handle_list,
+ { "Reassembled Record Handle List", "btsdp.reassembled_attribute_list",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_service_attribute_id_generic,
{ "Attribute ID", "btsdp.service.attribute",
FT_UINT16, BASE_HEX, VALS(vs_general_attribute_id), 0,
@@ -4498,12 +4663,12 @@ proto_register_btsdp(void)
NULL, HFILL }
},
{ &hf_hdp_support_procedure_reserved_5_7,
- { "Support: Reserved", "btsdp.hdp.support.reserved",
+ { "Support: Reserved", "btsdp.hdp.support.reserved",
FT_UINT8, BASE_HEX, NULL, 0xE0,
NULL, HFILL }
},
{ &hf_hdp_support_procedure_sync_master_role,
- { "Support: SyncMaster Role", "btsdp.hdp.support.sync_master_role",
+ { "Support: SyncMaster Role", "btsdp.hdp.support.sync_master_role",
FT_BOOLEAN, 8, NULL, 0x10,
NULL, HFILL }
},
@@ -4513,25 +4678,50 @@ proto_register_btsdp(void)
NULL, HFILL }
},
{ &hf_hdp_support_procedure_reconnect_acceptance,
- { "Support: Reconnect Acceptance", "btsdp.hdp.support.reconnect_acceptance",
+ { "Support: Reconnect Acceptance", "btsdp.hdp.support.reconnect_acceptance",
FT_BOOLEAN, 8, NULL, 0x04,
NULL, HFILL }
},
{ &hf_hdp_support_procedure_reconnect_initiation,
- { "Support: Reconnect Initiation", "btsdp.hdp.support.reconnect_initiation",
+ { "Support: Reconnect Initiation", "btsdp.hdp.support.reconnect_initiation",
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL }
},
{ &hf_hdp_support_procedure_reserved,
- { "Support: Reserved", "btsdp.hdp.support.reserved",
+ { "Support: Reserved", "btsdp.hdp.support.reserved",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL }
},
{ &hf_hdp_data_exchange,
- { "Data Exchange Specification", "btsdp.hdp.data_exchange_specification",
+ { "Data Exchange Specification", "btsdp.hdp.data_exchange_specification",
FT_UINT8, BASE_HEX, VALS(hdp_data_exchange_specification_vals), 0,
NULL, HFILL }
},
+ { &hf_hdp_supported_features_data,
+ { "Supported Features", "btsdp.hdp.supported_features_data",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_hdp_supported_features_data_mdep_id,
+ { "MDEP ID", "btsdp.hdp.supported_features_data.mdep_id",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_hdp_supported_features_data_mdep_data_type,
+ { "MDEP Data Type", "btsdp.hdp.supported_features_data.mdep_data_type",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_hdp_supported_features_data_mdep_role,
+ { "MDEP Role", "btsdp.hdp.supported_features_data.mdep_role",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_hdp_supported_features_data_mdep_description,
+ { "MDEP Description", "btsdp.hdp.supported_features_data.mdep_description",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_hdp_supported_features_mdep_id,
{ "MDEP ID", "btsdp.hdp.supported_features.mdep_id",
FT_UINT8, BASE_DEC_HEX|BASE_RANGE_STRING, RVALS(hdp_mdep_id_rvals), 0,
@@ -4672,9 +4862,19 @@ proto_register_btsdp(void)
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }
},
+ { &hf_sdp_protocol_item,
+ { "Protocol", "btsdp.protocol_item",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_sdp_protocol,
+ { "Protocol Entry", "btsdp.protocol",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_sdp_protocol_psm,
{ "L2CAP PSM", "btsdp.protocol.psm",
- FT_UINT16, BASE_DEC_HEX, &ext_psm_vals, 0,
+ FT_UINT16, BASE_DEC_HEX | BASE_EXT_STRING, &ext_psm_vals, 0,
NULL, HFILL }
},
{ &hf_sdp_protocol_channel,
@@ -4753,6 +4953,11 @@ proto_register_btsdp(void)
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }
},
+ { &hf_sdp_lang,
+ { "Language", "btsdp.lang",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_sdp_lang_code,
{ "Language Code", "btsdp.lang.code",
FT_STRING, BASE_NONE, NULL, 0,
@@ -4863,6 +5068,16 @@ proto_register_btsdp(void)
FT_UINT8, BASE_HEX, VALS(descriptor_list_type_vals), 0,
NULL, HFILL }
},
+ { &hf_hid_lang,
+ { "Language", "btsdp.service.hid.lang",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
+ { &hf_hid_descriptor_list_descriptor_data,
+ { "Descriptor", "btsdp.service.hid.descriptor_list.descriptor_data",
+ FT_NONE, BASE_NONE, NULL, 0,
+ NULL, HFILL }
+ },
{ &hf_hid_descriptor_list_descriptor,
{ "Descriptor", "btsdp.service.hid.descriptor_list.descriptor",
FT_BYTES, BASE_NONE, NULL, 0,
@@ -5187,9 +5402,9 @@ proto_register_btsdp(void)
};
static ei_register_info ei[] = {
- { &ei_btsdp_continuation_state_none, { "btsdp.continuation_state_none", PI_MALFORMED, PI_WARN, "There is no Continuation State", EXPFILL }},
- { &ei_btsdp_continuation_state_large, { "btsdp.continuation_state_large", PI_MALFORMED, PI_WARN, "Continuation State data is longer then 16", EXPFILL }},
- { &ei_data_element_value_large, { "btavctp.data_element.value.large", PI_MALFORMED, PI_WARN, "Data size exceeds the length of payload", EXPFILL }},
+ { &ei_btsdp_continuation_state_none, { "btsdp.expert.continuation_state_none", PI_MALFORMED, PI_WARN, "There is no Continuation State", EXPFILL }},
+ { &ei_btsdp_continuation_state_large, { "btsdp.expert.continuation_state_large", PI_MALFORMED, PI_WARN, "Continuation State data is longer then 16", EXPFILL }},
+ { &ei_data_element_value_large, { "btsdp.expert.data_element.value.large", PI_MALFORMED, PI_WARN, "Data size exceeds the length of payload", EXPFILL }},
};
proto_btsdp = proto_register_protocol("Bluetooth SDP Protocol", "BT SDP", "btsdp");
diff --git a/epan/dissectors/packet-btsmp.c b/epan/dissectors/packet-btsmp.c
index c20cd13c6d..8f6de831a0 100644
--- a/epan/dissectors/packet-btsmp.c
+++ b/epan/dissectors/packet-btsmp.c
@@ -52,6 +52,9 @@ static int hf_btsmp_key_dist_enc = -1;
static int hf_btsmp_key_dist_id = -1;
static int hf_btsmp_key_dist_sign = -1;
static int hf_btsmp_ediv = -1;
+static int hf_btsmp_authreq = -1;
+static int hf_btsmp_initiator_key_distribution = -1;
+static int hf_btsmp_responder_key_distribution = -1;
/* Initialize the subtree pointers */
static gint ett_btsmp = -1;
@@ -124,7 +127,7 @@ dissect_btsmp_auth_req(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
guint8 param;
param = tvb_get_guint8(tvb, offset);
- ti_param = proto_tree_add_text(tree, tvb, offset, 1, "AuthReq: ");
+ ti_param = proto_tree_add_item(tree, hf_btsmp_authreq, tvb, offset, 1, ENC_NA);
st_param = proto_item_add_subtree(ti_param, ett_btsmp_auth_req);
proto_tree_add_item(st_param, hf_btsmp_bonding_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_item_append_text(ti_param, "%s, ", val_to_str_const(param & 0x03, bonding_flag_vals, "<unknown>"));
@@ -146,11 +149,11 @@ dissect_btsmp_key_dist(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
param = tvb_get_guint8(tvb, offset);
if (initiator) {
col_append_fstr(pinfo->cinfo, COL_INFO, ", Initiator Key(s): ");
- ti_param = proto_tree_add_text(tree, tvb, offset, 1, "Initiator Key Distribution: ");
+ ti_param = proto_tree_add_item(tree, hf_btsmp_initiator_key_distribution, tvb, offset, 1, ENC_NA);
}
else {
col_append_fstr(pinfo->cinfo, COL_INFO, ", Responder Key(s): ");
- ti_param = proto_tree_add_text(tree, tvb, offset, 1, "Responder Key Distribution: ");
+ ti_param = proto_tree_add_item(tree, hf_btsmp_responder_key_distribution, tvb, offset, 1, ENC_NA);
}
st_param = proto_item_add_subtree(ti_param, ett_btsmp_key_dist);
@@ -362,6 +365,21 @@ proto_register_btsmp(void)
{"Encrypted Diversifier (EDIV)", "btsmp.ediv",
FT_UINT16, BASE_HEX, NULL, 0x00,
NULL, HFILL}
+ },
+ {&hf_btsmp_authreq,
+ {"AuthReq", "btsmp.authreq",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
+ {&hf_btsmp_initiator_key_distribution,
+ {"Initiator Key Distribution", "btsmp.initiator_key_distribution",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
+ },
+ {&hf_btsmp_responder_key_distribution,
+ {"Responder Key Distribution", "btsmp.responder_key_distribution",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL}
}
};
diff --git a/epan/dissectors/packet-hci_usb.c b/epan/dissectors/packet-hci_usb.c
index 725b50c7e8..8141b4f23b 100644
--- a/epan/dissectors/packet-hci_usb.c
+++ b/epan/dissectors/packet-hci_usb.c
@@ -36,6 +36,9 @@
static int proto_hci_usb = -1;
static int hf_bthci_usb_data = -1;
+static int hf_bthci_usb_packet_fragment = -1;
+static int hf_bthci_usb_packet_complete = -1;
+static int hf_bthci_usb_packet_unknown_fragment = -1;
static gint ett_hci_usb = -1;
static gint ett_hci_usb_msg_fragment = -1;
@@ -186,12 +189,12 @@ dissect_hci_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
reassembled = fragment_get_reassembled_id(&hci_usb_reassembly_table, pinfo, session_id);
if (reassembled && pinfo->fd->num < reassembled->reassembled_in) {
- pitem = proto_tree_add_text(ttree, tvb, offset, -1, "Fragment");
+ pitem = proto_tree_add_item(ttree, hf_bthci_usb_packet_fragment, tvb, offset, -1, ENC_NA);
PROTO_ITEM_SET_GENERATED(pitem);
col_append_fstr(pinfo->cinfo, COL_INFO, " Fragment");
} else if (reassembled && pinfo->fd->num == reassembled->reassembled_in) {
- pitem = proto_tree_add_text(ttree, tvb, offset, -1, "Complete");
+ pitem = proto_tree_add_item(ttree, hf_bthci_usb_packet_complete, tvb, offset, -1, ENC_NA);
PROTO_ITEM_SET_GENERATED(pitem);
if (reassembled->len > tvb_ensure_length_remaining(tvb, offset)) {
@@ -209,7 +212,7 @@ dissect_hci_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
call_dissector(find_dissector("bthci_acl"), next_tvb, pinfo, tree);
}
} else {
- pitem = proto_tree_add_text(ttree, tvb, offset, -1, "Unknown Fragment");
+ pitem = proto_tree_add_item(ttree, hf_bthci_usb_packet_unknown_fragment, tvb, offset, -1, ENC_NA);
PROTO_ITEM_SET_GENERATED(pitem);
}
@@ -283,6 +286,21 @@ proto_register_hci_usb(void)
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
+ { &hf_bthci_usb_packet_fragment,
+ { "Packet Fragment", "hci_usb.packet.fragment",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_bthci_usb_packet_complete,
+ { "Packet Complete", "hci_usb.packet.complete",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
+ { &hf_bthci_usb_packet_unknown_fragment,
+ { "Unknown Packet Fragment", "hci_usb.packet.unknown_fragment",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }
+ },
{ &hf_bthci_usb_data,
{ "Unknown Data", "hci_usb.data",
FT_NONE, BASE_NONE, NULL, 0x00,