aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ax25.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-10-26 17:07:47 +0100
committerMichael Mann <mmann78@netscape.net>2016-10-28 17:39:04 +0000
commitd47551982b343664cafa3ddfa3b3bb960ed9f34a (patch)
tree8c88e54355d399d3b43a57098c3ad76276cd5112 /epan/dissectors/packet-ax25.c
parent01147f8369e76927d7a90cfa0b592457a1878839 (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-ax25.c')
-rw-r--r--epan/dissectors/packet-ax25.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ax25.c b/epan/dissectors/packet-ax25.c
index c9535bbe65..8bfb0e3e7f 100644
--- a/epan/dissectors/packet-ax25.c
+++ b/epan/dissectors/packet-ax25.c
@@ -51,7 +51,6 @@
#include <epan/xdlc.h>
#include <epan/ax25_pids.h>
#include <epan/ipproto.h>
-#include "packet-ax25.h"
#define STRLEN 80
@@ -64,6 +63,8 @@ void proto_reg_handoff_ax25(void);
/* Dissector table */
static dissector_table_t ax25_dissector_table;
+static capture_dissector_handle_t ax25_cap_handle;
+
/* Initialize the protocol and registered fields */
static int proto_ax25 = -1;
static int hf_ax25_dst = -1;
@@ -411,6 +412,8 @@ proto_register_ax25(void)
/* Register dissector table for protocol IDs */
ax25_dissector_table = register_dissector_table("ax25.pid", "AX.25 protocol ID", proto_ax25, FT_UINT8, BASE_HEX);
register_capture_dissector_table("ax25.pid", "AX.25");
+
+ ax25_cap_handle = register_capture_dissector("ax25", capture_ax25, proto_ax25);
}
void
@@ -419,7 +422,7 @@ proto_reg_handoff_ax25(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_AX25, ax25_handle);
dissector_add_uint("ip.proto", IP_PROTO_AX25, ax25_handle);
- register_capture_dissector("wtap_encap", WTAP_ENCAP_AX25, capture_ax25, proto_ax25);
+ capture_dissector_add_uint("wtap_encap", WTAP_ENCAP_AX25, ax25_cap_handle);
}
/*