diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-21 01:18:23 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-21 01:18:23 +0000 |
commit | 3111b6c88968bec609dfc04912f6cfaf65a6927a (patch) | |
tree | 42fb760fbefc0b94d25f750cb9b295aa0df257a0 /epan/dissectors | |
parent | 091fd3d12b70cb91a04130fe4372885ac23c87a0 (diff) |
USB CCID and PN532_HCI can be now used in Decode As. Bug 9445 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9445)
From Michal Labedzki
svn path=/trunk/; revision=53463
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-rfid-pn532-hci.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-usb-ccid.c | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/epan/dissectors/packet-rfid-pn532-hci.c b/epan/dissectors/packet-rfid-pn532-hci.c index d1218291f3..d0ebef57c1 100644 --- a/epan/dissectors/packet-rfid-pn532-hci.c +++ b/epan/dissectors/packet-rfid-pn532-hci.c @@ -265,7 +265,7 @@ proto_register_pn532_hci(void) }; proto_pn532_hci = proto_register_protocol("NXP PN532 HCI", "PN532_HCI", "pn532_hci"); - new_register_dissector("pn532_hci", dissect_pn532_hci, proto_pn532_hci); + pn532_hci_handle = new_register_dissector("pn532_hci", dissect_pn532_hci, proto_pn532_hci); proto_register_field_array(proto_pn532_hci, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -282,11 +282,11 @@ void proto_reg_handoff_pn532_hci(void) { pn532_handle = find_dissector("pn532"); - pn532_hci_handle = find_dissector("pn532_hci"); dissector_add_uint("usb.product", (0x04e6 << 16) | 0x5591, pn532_hci_handle); dissector_add_handle("usb.device", pn532_hci_handle); + dissector_add_handle("usb.protocol", pn532_hci_handle); } /* diff --git a/epan/dissectors/packet-usb-ccid.c b/epan/dissectors/packet-usb-ccid.c index bd528bb3e0..ce46a504ce 100644 --- a/epan/dissectors/packet-usb-ccid.c +++ b/epan/dissectors/packet-usb-ccid.c @@ -73,6 +73,8 @@ static int hf_ccid_wLcdLayout = -1; static int hf_ccid_bPINSupport = -1; static int hf_ccid_bMaxCCIDBusySlots = -1; +static dissector_handle_t usb_ccid_handle; + static const int *bVoltageLevel_fields[] = { &hf_ccid_bVoltageSupport50, &hf_ccid_bVoltageSupport30, @@ -671,21 +673,24 @@ proto_register_ccid(void) ccid_dissector_table = register_dissector_table("usbccid.payload", "USBCCID Payload", FT_UINT8, BASE_DEC); - new_register_dissector("usbccid", dissect_ccid, proto_ccid); + usb_ccid_handle = new_register_dissector("usbccid", dissect_ccid, proto_ccid); } /* Handler registration */ void proto_reg_handoff_ccid(void) { - dissector_handle_t usb_ccid_bulk_handle, usb_ccid_descr_handle; + dissector_handle_t usb_ccid_descr_handle; usb_ccid_descr_handle = new_create_dissector_handle( dissect_usb_ccid_descriptor, proto_ccid); dissector_add_uint("usb.descriptor", IF_CLASS_SMART_CARD, usb_ccid_descr_handle); - usb_ccid_bulk_handle = find_dissector("usbccid"); - dissector_add_uint("usb.bulk", IF_CLASS_SMART_CARD, usb_ccid_bulk_handle); + dissector_add_uint("usb.bulk", IF_CLASS_SMART_CARD, usb_ccid_handle); + + dissector_add_handle("usb.device", usb_ccid_handle); + dissector_add_handle("usb.product", usb_ccid_handle); + dissector_add_handle("usb.protocol", usb_ccid_handle); sub_handles[SUB_DATA] = find_dissector("data"); sub_handles[SUB_ISO7816] = find_dissector("iso7816"); |