summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rfid-pn532.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2017-06-20 15:04:54 -0400
committerAnders Broman <a.broman58@gmail.com>2017-06-23 14:25:00 +0000
commit082e3e346f69f0c2134064e80dcc104c18111c55 (patch)
treeb8d3d904728ad8cac4ad285c45fe8dd68f439db0 /epan/dissectors/packet-rfid-pn532.c
parent635b3720b5a43ed4b3bb1f030033d25675a390b3 (diff)
downloadwireshark-082e3e346f69f0c2134064e80dcc104c18111c55.tar.gz
USB CCID: use Decode As to select the payload protocol
Remove the special case for vid 0x072F, pid 0x2200. We should be able to set Decode As for this (vid, pid) to USB CCID and then use the new Decode As mechanism to select the next protocol. Register GSM SIM, ISO7816, PN532 and ACR122 as possible payloads for USB CCID. Change-Id: I8237cc9123655d3b289b0564ffb83a32434bebfc Reviewed-on: https://code.wireshark.org/review/22290 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rfid-pn532.c')
-rw-r--r--epan/dissectors/packet-rfid-pn532.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-rfid-pn532.c b/epan/dissectors/packet-rfid-pn532.c
index 0b306b8187..b15efcaceb 100644
--- a/epan/dissectors/packet-rfid-pn532.c
+++ b/epan/dissectors/packet-rfid-pn532.c
@@ -219,6 +219,8 @@ static expert_field ei_unexpected_data = EI_INIT;
static wmem_tree_t *command_info = NULL;
+static dissector_handle_t pn532_handle;
+
void proto_register_pn532(void);
void proto_reg_handoff_pn532(void);
@@ -2327,12 +2329,14 @@ void proto_register_pn532(void)
prefs_register_enum_preference(pref_mod, "prtype532", "Payload Type", "Protocol payload type",
&sub_selected, sub_enum_vals, FALSE);
- register_dissector("pn532", dissect_pn532, proto_pn532);
+ pn532_handle = register_dissector("pn532", dissect_pn532, proto_pn532);
}
/* Handler registration */
void proto_reg_handoff_pn532(void)
{
+ dissector_add_for_decode_as("usbccid.subdissector", pn532_handle);
+
sub_handles[SUB_DATA] = find_dissector("data");
sub_handles[SUB_FELICA] = find_dissector_add_dependency("felica", proto_pn532);
sub_handles[SUB_MIFARE] = find_dissector_add_dependency("mifare", proto_pn532);