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-sll.c | |
parent | 54413c8594ab6fb8518ad9347f21d58038fceed9 (diff) |
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-sll.c')
-rw-r--r-- | epan/dissectors/packet-sll.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c index dc1253dcf9..d339064f28 100644 --- a/epan/dissectors/packet-sll.c +++ b/epan/dissectors/packet-sll.c @@ -151,33 +151,7 @@ capture_sll(const guchar *pd, int offset _U_, int len, packet_counts *ld, const * "proto" is *not* a length field, it's a Linux internal * protocol type. */ - switch (protocol) { - - case LINUX_SLL_P_802_2: - /* - * 802.2 LLC. - */ - return capture_llc(pd, len, SLL_HEADER_SIZE, ld, pseudo_header); - - case LINUX_SLL_P_ETHERNET: - /* - * Ethernet. - */ - return capture_eth(pd, SLL_HEADER_SIZE, len, ld, pseudo_header); - - case LINUX_SLL_P_802_3: - /* - * Novell IPX inside 802.3 with no 802.2 LLC - * header. - */ - return capture_ipx(pd, SLL_HEADER_SIZE, len, ld, pseudo_header); - - case LINUX_SLL_P_PPPHDLC: - /* - * PPP HDLC. - */ - return capture_ppp_hdlc(pd, len, SLL_HEADER_SIZE, ld, pseudo_header); - } + return try_capture_dissector("sll.ltype", protocol, pd, SLL_HEADER_SIZE, len, ld, pseudo_header); } else { return try_capture_dissector("ethertype", protocol, pd, SLL_HEADER_SIZE, len, ld, pseudo_header); } @@ -337,6 +311,7 @@ proto_register_sll(void) FT_UINT16, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE ); + register_capture_dissector_table("sll.ltype", "Linux SLL protocol"); } void |