diff options
author | Michael Mann <mmann78@netscape.net> | 2017-07-09 13:47:59 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-09-16 11:12:29 +0000 |
commit | 7d65b573f2734017be416f31852c4ede42bd987b (patch) | |
tree | 5fc5e6ebe6c44a5060292541f9664f0244a5e0e4 /epan/dissectors/packet-usb-ccid.c | |
parent | d992e85fe8e9192cb730abf8796336d3b6d6fd50 (diff) |
Have register_decode_as_next_proto create dissector table.
For protocols that have don't have a unique identifier for their
payload, have register_decode_as_next_proto be a one stop shop to
create Decode As functionality and a dissector table of type FT_NONE.
Change-Id: Ic1f2e9ed0aee0554a4eb8f232630b99c0604dfc0
Reviewed-on: https://code.wireshark.org/review/22575
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-usb-ccid.c')
-rw-r--r-- | epan/dissectors/packet-usb-ccid.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-usb-ccid.c b/epan/dissectors/packet-usb-ccid.c index c7096424ec..0512eb382b 100644 --- a/epan/dissectors/packet-usb-ccid.c +++ b/epan/dissectors/packet-usb-ccid.c @@ -557,7 +557,7 @@ dissect_ccid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) /* sent/received is from the perspective of the card reader */ pinfo->p2p_dir = P2P_DIR_SENT; - if (!dissector_try_uint_new(subdissector_table, 0, next_tvb, pinfo, tree, TRUE, usb_conv_info)) { + if (!dissector_try_payload_new(subdissector_table, next_tvb, pinfo, tree, TRUE, usb_conv_info)) { call_data_dissector(next_tvb, pinfo, tree); } break; @@ -581,7 +581,7 @@ dissect_ccid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) next_tvb = tvb_new_subset_length(tvb, 10, payload_len); pinfo->p2p_dir = P2P_DIR_RECV; - if (!dissector_try_uint_new(subdissector_table, 0, next_tvb, pinfo, tree, TRUE, usb_conv_info)) { + if (!dissector_try_payload_new(subdissector_table, next_tvb, pinfo, tree, TRUE, usb_conv_info)) { call_data_dissector(next_tvb, pinfo, tree); } break; @@ -879,10 +879,7 @@ proto_register_ccid(void) usb_ccid_handle = register_dissector("usbccid", dissect_ccid, proto_ccid); - subdissector_table = register_dissector_table( - "usbccid.subdissector", "USB CCID payload", - proto_ccid, FT_UINT32, BASE_HEX); - register_decode_as_next_proto("USB CCID", "Transport", "usbccid.subdissector", NULL); + subdissector_table = register_decode_as_next_proto(proto_ccid, "Transport", "usbccid.subdissector", "USB CCID payload", NULL); } /* Handler registration */ |