aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hci_h4.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-10-16 17:19:16 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-10-16 17:19:16 +0000
commit0f82a3e7e81e96ba7ecd993688183e34bbf5bd71 (patch)
tree71ea788dd9b1573fd53c35cf798cf0880058db30 /epan/dissectors/packet-hci_h4.c
parent53489c8f5d938b927419eb95861034c06f48bcfc (diff)
From Paolo Abeni via bug 1751:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1751 The patch adds support to wiretap for a new libpcap DLT for bluetooth captures. This DLT carries the direction information, which now can be displayed correctly. The hci H4 dissector is updated to handle also the newly introduced wtap encap. svn path=/trunk/; revision=23208
Diffstat (limited to 'epan/dissectors/packet-hci_h4.c')
-rw-r--r--epan/dissectors/packet-hci_h4.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/epan/dissectors/packet-hci_h4.c b/epan/dissectors/packet-hci_h4.c
index 973bbac340..2d455d15d6 100644
--- a/epan/dissectors/packet-hci_h4.c
+++ b/epan/dissectors/packet-hci_h4.c
@@ -17,12 +17,12 @@
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -68,14 +68,14 @@ dissect_hci_h4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti=NULL;
proto_tree *hci_h4_tree=NULL;
- if(check_col(pinfo->cinfo, COL_PROTOCOL))
+ if(check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI H4");
-
+
if(check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
type = tvb_get_guint8(tvb, 0);
-
+
if(tree){
ti = proto_tree_add_item(tree, proto_hci_h4, tvb, 0, 1, FALSE);
hci_h4_tree = proto_item_add_subtree(ti, ett_hci_h4);
@@ -105,16 +105,16 @@ dissect_hci_h4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_hci_h4(void)
-{
+{
static hf_register_info hf[] = {
{ &hf_hci_h4_type,
{ "HCI Packet Type", "hci_h4.type",
- FT_UINT8, BASE_HEX, VALS(hci_h4_type_vals), 0x0,
+ FT_UINT8, BASE_HEX, VALS(hci_h4_type_vals), 0x0,
"HCI Packet Type", HFILL }},
{ &hf_hci_h4_direction,
{ "Direction", "hci_h4.direction",
- FT_UINT8, BASE_HEX, VALS(hci_h4_direction_vals), 0x0,
+ FT_UINT8, BASE_HEX, VALS(hci_h4_direction_vals), 0x0,
"HCI Packet Direction Sent/Rcvd", HFILL }},
};
@@ -143,6 +143,7 @@ proto_reg_handoff_hci_h4(void)
data_handle = find_dissector("data");
hci_h4_handle = find_dissector("hci_h4");
dissector_add("wtap_encap", WTAP_ENCAP_BLUETOOTH_H4, hci_h4_handle);
+ dissector_add("wtap_encap", WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, hci_h4_handle);
}