diff options
author | Evan Huus <eapache@gmail.com> | 2013-03-28 03:06:30 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-03-28 03:06:30 +0000 |
commit | aee73d6d9e101927150b1ca3a16d404b50196366 (patch) | |
tree | 3080e4ed90e09b79c8ca3bb0df23632f191fcc81 | |
parent | 37de47688f9ba7363c9cef63d6481918cf9ce2d8 (diff) |
From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8530
Enable "Decode As" for Bluetooth over USB.
svn path=/trunk/; revision=48605
-rw-r--r-- | epan/address.h | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-hci_usb.c | 1 | ||||
-rw-r--r-- | ui/gtk/decode_as_dlg.c | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/epan/address.h b/epan/address.h index 5c4c564601..5405075868 100644 --- a/epan/address.h +++ b/epan/address.h @@ -204,7 +204,8 @@ typedef enum { PT_TIPC, /* TIPC PORT */ PT_USB, /* USB endpoint 0xffff means the host */ PT_I2C, - PT_IBQP /* Infiniband QP number */ + PT_IBQP, /* Infiniband QP number */ + PT_BLUETOOTH } port_type; /* Types of circuit IDs Wireshark knows about. */ diff --git a/epan/dissectors/packet-hci_usb.c b/epan/dissectors/packet-hci_usb.c index 6cdf2a706a..2080df97cd 100644 --- a/epan/dissectors/packet-hci_usb.c +++ b/epan/dissectors/packet-hci_usb.c @@ -148,6 +148,7 @@ dissect_hci_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data hci_data->localhost_bdaddr = localhost_bdaddr; hci_data->localhost_name = localhost_name; pinfo->private_data = hci_data; + pinfo->ptype = PT_BLUETOOTH; next_tvb = tvb_new_subset_remaining(tvb, offset); if (!pinfo->fd->flags.visited && usb_data->endpoint <= 0x02) { diff --git a/ui/gtk/decode_as_dlg.c b/ui/gtk/decode_as_dlg.c index 986f88ea7e..6750a9c60c 100644 --- a/ui/gtk/decode_as_dlg.c +++ b/ui/gtk/decode_as_dlg.c @@ -1927,6 +1927,7 @@ decode_as_ok(void) cfile.edt->pi.ptype == PT_TCP || cfile.edt->pi.ptype == PT_UDP || cfile.edt->pi.mpls_label || cfile.cd_t == WTAP_FILE_BER || + cfile.edt->pi.ptype == PT_BLUETOOTH || wtap_file_encap(cfile.wth) == WTAP_ENCAP_BLUETOOTH_H4 || wtap_file_encap(cfile.wth) == WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR; } @@ -2019,7 +2020,8 @@ decode_add_notebook (GtkWidget *format_hb) } if (wtap_file_encap(cfile.wth) == WTAP_ENCAP_BLUETOOTH_H4 || - wtap_file_encap(cfile.wth) == WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR) { + wtap_file_encap(cfile.wth) == WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR || + cfile.edt->pi.ptype == PT_BLUETOOTH) { gint page_l2cap_service = -1; gint page_l2cap_cid = -1; gint page_l2cap_psm = -1; |