diff options
author | Michael Mann <mmann78@netscape.net> | 2015-12-14 08:48:59 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-14 22:35:15 +0000 |
commit | d835b271679c5e5eae7146b96ae1a65cbd5c16b4 (patch) | |
tree | 68bd42732c1b6ee509f9ae69bdaf8a6513c16f1d /epan/dissectors/packet-ppp.c | |
parent | 54413c8594ab6fb8518ad9347f21d58038fceed9 (diff) | |
download | wireshark-d835b271679c5e5eae7146b96ae1a65cbd5c16b4.tar.gz |
Create some more capture dissector tables.
These were created from capture dissector functions that had switch statements determine "next" protocol/dissector. The registration decreases the need for function declarations in header files.
Added new capture dissection tables for IP, IPv6, TCP and UDP as that seems like the next logical place to expand
Change-Id: I1ec0cd54eecda4f400669ee5b026bf6e2b46545a
Reviewed-on: https://code.wireshark.org/review/12634
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-ppp.c')
-rw-r--r-- | epan/dissectors/packet-ppp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index 08028e9562..351898c952 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -1968,16 +1968,7 @@ capture_ppp_hdlc(const guchar *pd, int offset, int len, packet_counts *ld, const if (!BYTES_ARE_IN_FRAME(offset, len, 4)) return FALSE; - switch (pntoh16(&pd[offset + 2])) { - case PPP_IP: - return capture_ip(pd, offset + 4, len, ld, pseudo_header); - case PPP_IPX: - return capture_ipx(pd, offset + 4, len, ld, pseudo_header); - case PPP_VINES: - return capture_vines(pd, offset + 4, len, ld, pseudo_header); - } - - return FALSE; + return try_capture_dissector("ppp_hdlc", pntoh16(&pd[offset + 2]), pd, offset + 4, len, ld, pseudo_header); } static void @@ -5625,6 +5616,8 @@ proto_register_ppp_raw_hdlc(void) "PPP-HDLC", "ppp_hdlc"); proto_register_subtree_array(ett, array_length(ett)); proto_register_field_array(proto_ppp_hdlc, hf, array_length(hf)); + + register_capture_dissector_table("ppp_hdlc", "PPP-HDLC"); } void @@ -5639,6 +5632,7 @@ proto_reg_handoff_ppp_raw_hdlc(void) heur_dissector_add("usb.bulk", dissect_ppp_usb, "PPP USB bulk endpoint", "ppp_usb_bulk", proto_ppp, HEURISTIC_ENABLE); register_capture_dissector("wtap_encap", WTAP_ENCAP_PPP, capture_ppp_hdlc, proto_ppp_hdlc); + register_capture_dissector("sll.ltype", LINUX_SLL_P_PPPHDLC, capture_ppp_hdlc, proto_ppp_hdlc); } /* |