diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-10-26 17:07:47 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-10-28 17:39:04 +0000 |
commit | d47551982b343664cafa3ddfa3b3bb960ed9f34a (patch) | |
tree | 8c88e54355d399d3b43a57098c3ad76276cd5112 /epan/dissectors/packet-vines.c | |
parent | 01147f8369e76927d7a90cfa0b592457a1878839 (diff) |
Implement registration of capture dissectors by name
Mirror it after protocol dissector API.
Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304
Reviewed-on: https://code.wireshark.org/review/18496
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-vines.c')
-rw-r--r-- | epan/dissectors/packet-vines.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c index c2e1c317ab..f8f5300fae 100644 --- a/epan/dissectors/packet-vines.c +++ b/epan/dissectors/packet-vines.c @@ -2042,16 +2042,20 @@ void proto_reg_handoff_vines_icp(void) { dissector_handle_t vines_icp_handle; + capture_dissector_handle_t vines_echo_cap_handle; + capture_dissector_handle_t vines_ip_cap_handle; - vines_icp_handle = create_dissector_handle(dissect_vines_icp, - proto_vines_icp); + vines_icp_handle = create_dissector_handle(dissect_vines_icp, proto_vines_icp); dissector_add_uint("vines_ip.protocol", VIP_PROTO_ICP, vines_icp_handle); - register_capture_dissector("ethertype", ETHERTYPE_VINES_IP, capture_vines, proto_vines_ip); - register_capture_dissector("ethertype", ETHERTYPE_VINES_ECHO, capture_vines, proto_vines_echo); - register_capture_dissector("ppp_hdlc", PPP_VINES, capture_vines, proto_vines_echo); - register_capture_dissector("ip.proto", PPP_VINES, capture_vines, proto_vines_echo); - register_capture_dissector("llc.dsap", SAP_VINES1, capture_vines, proto_vines_echo); - register_capture_dissector("llc.dsap", SAP_VINES2, capture_vines, proto_vines_echo); + + vines_ip_cap_handle = create_capture_dissector_handle(capture_vines, proto_vines_ip); + capture_dissector_add_uint("ethertype", ETHERTYPE_VINES_IP, vines_ip_cap_handle); + vines_echo_cap_handle = create_capture_dissector_handle(capture_vines, proto_vines_echo); + capture_dissector_add_uint("ethertype", ETHERTYPE_VINES_ECHO, vines_echo_cap_handle); + capture_dissector_add_uint("ppp_hdlc", PPP_VINES, vines_echo_cap_handle); + capture_dissector_add_uint("ip.proto", PPP_VINES, vines_echo_cap_handle); + capture_dissector_add_uint("llc.dsap", SAP_VINES1, vines_echo_cap_handle); + capture_dissector_add_uint("llc.dsap", SAP_VINES2, vines_echo_cap_handle); } /* |