summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-sctp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-12-14 08:48:59 -0500
committerMichael Mann <mmann78@netscape.net>2015-12-14 22:35:15 +0000
commitd835b271679c5e5eae7146b96ae1a65cbd5c16b4 (patch)
tree68bd42732c1b6ee509f9ae69bdaf8a6513c16f1d /epan/dissectors/packet-sctp.c
parent54413c8594ab6fb8518ad9347f21d58038fceed9 (diff)
downloadwireshark-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-sctp.c')
-rw-r--r--epan/dissectors/packet-sctp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 94cc64a8eb..293760c100 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -53,6 +53,7 @@
#include <epan/packet.h>
+#include <epan/capture_dissectors.h>
#include <epan/prefs.h>
#include <epan/exceptions.h>
#include <epan/exported_pdu.h>
@@ -4686,6 +4687,13 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
proto_tree_move_item(sctp_tree, vt, pi);
}
+static gboolean
+capture_sctp(const guchar *pd _U_, int offset _U_, int len _U_, packet_counts *ld, const union wtap_pseudo_header *pseudo_header _U_)
+{
+ ld->sctp++;
+ return TRUE;
+}
+
static int
dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
@@ -5075,6 +5083,8 @@ proto_reg_handoff_sctp(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_SCTP, sctp_handle);
dissector_add_uint("ip.proto", IP_PROTO_SCTP, sctp_handle);
dissector_add_uint("udp.port", UDP_TUNNELING_PORT, sctp_handle);
+ register_capture_dissector("ip.proto", IP_PROTO_SCTP, capture_sctp, proto_sctp);
+ register_capture_dissector("ipv6.nxt", IP_PROTO_SCTP, capture_sctp, proto_sctp);
}
/*