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-ax25.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-ax25.c')
-rw-r--r-- | epan/dissectors/packet-ax25.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ax25.c b/epan/dissectors/packet-ax25.c index 03d28b09f3..c5f3885e54 100644 --- a/epan/dissectors/packet-ax25.c +++ b/epan/dissectors/packet-ax25.c @@ -51,9 +51,7 @@ #include <epan/xdlc.h> #include <epan/ax25_pids.h> #include <epan/ipproto.h> -#include "packet-ip.h" #include "packet-ax25.h" -#include "packet-netrom.h" #define STRLEN 80 @@ -279,16 +277,7 @@ capture_ax25( const guchar *pd, int offset, int len, packet_counts *ld, const un pid = pd[ l_offset ]; l_offset += 1; /* step over the pid and point to the first byte of the payload */ - switch ( pid & 0x0ff ) - { - case AX25_P_NETROM : - return capture_netrom( pd, l_offset, len, ld, pseudo_header ); - case AX25_P_IP : - return capture_ip( pd, l_offset, len, ld, pseudo_header ); - case AX25_P_ARP : - ld->arp++; - return TRUE; - } + return try_capture_dissector("ax25.pid", pid & 0x0ff, pd, l_offset, len, ld, pseudo_header); } return FALSE; } @@ -430,6 +419,7 @@ proto_register_ax25(void) /* Register dissector table for protocol IDs */ ax25_dissector_table = register_dissector_table("ax25.pid", "AX.25 protocol ID", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); + register_capture_dissector_table("ax25.pid", "AX.25"); } void |