summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-btsdp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-08-18 02:11:36 +0000
committerMichael Mann <mmann78@netscape.net>2013-08-18 02:11:36 +0000
commit3ffb8e29b9600cae716049dc2c1e7b0c1e53ec3f (patch)
treeb83852acef6facfa772f71330ac64413d31997e2 /epan/dissectors/packet-btsdp.c
parent46192881d93d531022ccb0116e54317374c61e25 (diff)
downloadwireshark-3ffb8e29b9600cae716049dc2c1e7b0c1e53ec3f.tar.gz
HCI: Full dissection of EIR/AD and little improve filtering, bug 9050 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050)
From Michal Labedzki. From me: 1. Have boolean filters use tfs_true_false instead of NULL (because it appears previous functionality had "TRUE" and "FALSE"). Perhaps other tfs_ values could be used, but tfs_true_false makes a good placeholder. 2. Add FT_ETHER field as a proto_tree_add_item. svn path=/trunk/; revision=51410
Diffstat (limited to 'epan/dissectors/packet-btsdp.c')
-rw-r--r--epan/dissectors/packet-btsdp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c
index e40efb44c9..eacec6c77c 100644
--- a/epan/dissectors/packet-btsdp.c
+++ b/epan/dissectors/packet-btsdp.c
@@ -348,9 +348,6 @@ typedef struct _continuation_state_data_t {
#define PDU_TYPE_SERVICE_ATTRIBUTE 0x01
#define PDU_TYPE_SERVICE_SEARCH_ATTRIBUTE 0x02
-#define DID_VENDOR_ID_SOURCE_BLUETOOTH_SIG 1
-#define DID_VENDOR_ID_SOURCE_USB_FORUM 2
-
#define MAX_SDP_LEN 1024
extern value_string_ext ext_usb_vendors_vals;
@@ -594,6 +591,7 @@ static const value_string did_vendor_id_source_vals[] = {
{ 0x0002, "USB Implementer's Forum" },
{ 0, NULL }
};
+value_string_ext did_vendor_id_source_vals_ext = VALUE_STRING_EXT_INIT(did_vendor_id_source_vals);
static const value_string synch_supported_data_store_vals[] = {
{ 0x01, "Phonebook" },
@@ -1858,12 +1856,13 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
g_snprintf(str, MAX_SDP_LEN, "%s (0x%04x)", str_val, vendor_id);
break;
case 0x202:
- proto_tree_add_item(next_tree, hf_did_product_id, tvb, offset, 2, ENC_BIG_ENDIAN);
+ entry_item = proto_tree_add_item(next_tree, hf_did_product_id, tvb, offset, 2, ENC_BIG_ENDIAN);
product_id = tvb_get_ntohs(tvb, offset);
if (service_did_vendor_id_source == DID_VENDOR_ID_SOURCE_USB_FORUM) {
str_val = val_to_str_ext_const(service_did_vendor_id << 16 | product_id, &ext_usb_products_vals, "Unknown");
g_snprintf(str, MAX_SDP_LEN, "%s (0x%04x)", str_val, product_id);
+ proto_item_append_text(entry_item, " (%s)", str_val);
} else {
g_snprintf(str, MAX_SDP_LEN, "0x%04x", product_id);
}