aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btavdtp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-02 20:10:51 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-02 20:10:51 +0000
commitf1e8e58ec5f5b8f46b80caf504930935eb9ace92 (patch)
treef31562fd1c8da09960b41fab92c473363e1c07a6 /epan/dissectors/packet-btavdtp.c
parenta267501b82a84ab3d5b9cb7d2f06129d5ca57e42 (diff)
Bluetooth: minor improvements. Bug 7893 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893)
1. AVDTP: Fix double decoded stream 2. AVDTP: Use items for logical block objects 3. HCI_USB use handoffed dissector handles instead of find_dissector() From Michal Labedzki svn path=/trunk/; revision=53052
Diffstat (limited to 'epan/dissectors/packet-btavdtp.c')
-rw-r--r--epan/dissectors/packet-btavdtp.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/epan/dissectors/packet-btavdtp.c b/epan/dissectors/packet-btavdtp.c
index 7a61df132e..0386feebfa 100644
--- a/epan/dissectors/packet-btavdtp.c
+++ b/epan/dissectors/packet-btavdtp.c
@@ -1061,7 +1061,7 @@ dissect_btavdtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
}
- return offset;
+ return tvb_length(tvb);
} else if (!(cid_type_data && cid_type_data->type == STREAM_TYPE_SIGNAL && cid_type_data->cid == l2cap_data->cid)) {
/* AVDTP not signaling - Unknown Media stream */
ti = proto_tree_add_item(tree, proto_btavdtp, tvb, offset, -1, ENC_NA);
@@ -1069,7 +1069,7 @@ dissect_btavdtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown stream on cid=0x%04x", l2cap_data->cid);
proto_tree_add_item(btavdtp_tree, hf_btavdtp_data, tvb, offset, -1, ENC_NA);
- return offset;
+ return tvb_length(tvb);
}
}
@@ -2089,12 +2089,25 @@ proto_register_bta2dp(void)
{
module_t *module;
+ static hf_register_info hf[] = {
+ { &hf_bta2dp_codec,
+ { "Codec", "bta2dp.codec",
+ FT_UINT8, BASE_HEX, VALS(media_codec_audio_type_vals), 0x00,
+ NULL, HFILL }
+ },
+ { &hf_bta2dp_content_protection,
+ { "Content Protection", "bta2dp.content_protection",
+ FT_UINT16, BASE_HEX, VALS(content_protection_type_vals), 0x0000,
+ NULL, HFILL }
+ }
+ };
+
static gint *ett[] = {
&ett_bta2dp
};
proto_bta2dp = proto_register_protocol("Bluetooth A2DP Profile", "BT A2DP", "bta2dp");
-
+ proto_register_field_array(proto_bta2dp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
new_register_dissector("bta2dp", dissect_bta2dp, proto_bta2dp);
@@ -2203,6 +2216,19 @@ proto_register_btvdp(void)
module_t *module;
expert_module_t* expert_btavdtp;
+ static hf_register_info hf[] = {
+ { &hf_btvdp_codec,
+ { "Codec", "btvdp.codec",
+ FT_UINT8, BASE_HEX, VALS(media_codec_video_type_vals), 0x00,
+ NULL, HFILL }
+ },
+ { &hf_btvdp_content_protection,
+ { "Content Protection", "btvdp.content_protection",
+ FT_UINT16, BASE_HEX, VALS(content_protection_type_vals), 0x0000,
+ NULL, HFILL }
+ }
+ };
+
static gint *ett[] = {
&ett_btvdp
};
@@ -2215,7 +2241,7 @@ proto_register_btvdp(void)
proto_btvdp = proto_register_protocol("Bluetooth VDP Profile", "BT VDP", "btvdp");
new_register_dissector("btvdp", dissect_btvdp, proto_btvdp);
-
+ proto_register_field_array(proto_bta2dp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_btavdtp = expert_register_protocol(proto_btvdp);
expert_register_field_array(expert_btavdtp, ei, array_length(ei));