diff options
Diffstat (limited to 'epan/dissectors/packet-sctp.c')
-rw-r--r-- | epan/dissectors/packet-sctp.c | 10 |
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); } /* |