From f342fdcdb83d960bd59ab7e42237c18f9282adcc Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 14 Dec 2015 19:25:31 -0500 Subject: Create capture dissector "info" structure (capture_packet_info_t) While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-udp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-udp.c') diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index c9adb6195f..1e784a4a3a 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -692,14 +692,14 @@ udp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } static gboolean -capture_udp(const guchar *pd _U_, int offset _U_, int len _U_, packet_counts *ld, const union wtap_pseudo_header *pseudo_header _U_) +capture_udp(const guchar *pd _U_, int offset _U_, int len _U_, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_) { guint16 src_port, dst_port, low_port, high_port; if (!BYTES_ARE_IN_FRAME(offset, len, 4)) return FALSE; - ld->udp++; + cpinfo->counts->udp++; src_port = pntoh16(&pd[offset]); dst_port = pntoh16(&pd[offset+2]); @@ -713,11 +713,11 @@ capture_udp(const guchar *pd _U_, int offset _U_, int len _U_, packet_counts *ld } if (low_port != 0 && - try_capture_dissector("udp.port", low_port, pd, offset+20, len, ld, pseudo_header)) + try_capture_dissector("udp.port", low_port, pd, offset+20, len, cpinfo, pseudo_header)) return TRUE; if (high_port != 0 && - try_capture_dissector("udp.port", high_port, pd, offset+20, len, ld, pseudo_header)) + try_capture_dissector("udp.port", high_port, pd, offset+20, len, cpinfo, pseudo_header)) return TRUE; /* We've at least identified one type of packet, so this shouldn't be "other" */ -- cgit v1.2.3