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-llc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'epan/dissectors/packet-llc.c') diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c index 9f4d0e47ec..c2fa07813e 100644 --- a/epan/dissectors/packet-llc.c +++ b/epan/dissectors/packet-llc.c @@ -252,7 +252,7 @@ llc_add_oui(guint32 oui, const char *table_name, const char *table_ui_name, } gboolean -capture_llc(const guchar *pd, int offset, int len, packet_counts *ld, const union wtap_pseudo_header *pseudo_header _U_) { +capture_llc(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_) { int is_snap; guint16 control; @@ -279,30 +279,30 @@ capture_llc(const guchar *pd, int offset, int len, packet_counts *ld, const unio return FALSE; if (is_snap) - return capture_snap(pd, offset+llc_header_len, len, ld, pseudo_header); + return capture_snap(pd, offset+llc_header_len, len, cpinfo, pseudo_header); /* non-SNAP */ switch (pd[offset]) { case SAP_IP: - return capture_ip(pd, offset + llc_header_len, len, ld, pseudo_header); + return capture_ip(pd, offset + llc_header_len, len, cpinfo, pseudo_header); case SAP_NETWARE1: case SAP_NETWARE2: - return capture_ipx(pd, offset + llc_header_len, len, ld, pseudo_header); + return capture_ipx(pd, offset + llc_header_len, len, cpinfo, pseudo_header); case SAP_NETBIOS: - return capture_netbios(pd, offset + llc_header_len, len, ld, pseudo_header); + return capture_netbios(pd, offset + llc_header_len, len, cpinfo, pseudo_header); case SAP_VINES1: case SAP_VINES2: - return capture_vines(pd, offset + llc_header_len, len, ld, pseudo_header); + return capture_vines(pd, offset + llc_header_len, len, cpinfo, pseudo_header); } return FALSE; } gboolean -capture_snap(const guchar *pd, int offset, int len, packet_counts *ld, const union wtap_pseudo_header *pseudo_header _U_) +capture_snap(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_) { guint32 oui; guint16 etype; @@ -324,10 +324,10 @@ capture_snap(const guchar *pd, int offset, int len, packet_counts *ld, const uni AppleTalk data packets - but used OUI_ENCAP_ETHER and an Ethernet packet type for AARP packets. */ - return try_capture_dissector("ethertype", etype, pd, offset+5, len, ld, pseudo_header); + return try_capture_dissector("ethertype", etype, pd, offset+5, len, cpinfo, pseudo_header); case OUI_CISCO: - return try_capture_dissector("ethertype", etype, pd, offset+5, len, ld, pseudo_header); + return try_capture_dissector("ethertype", etype, pd, offset+5, len, cpinfo, pseudo_header); case OUI_MARVELL: /* @@ -336,7 +336,7 @@ capture_snap(const guchar *pd, int offset, int len, packet_counts *ld, const uni * the payload. (We assume the header is * 5 bytes, for now). */ - return try_capture_dissector("ethertype", etype, pd, offset+5+5, len, ld, pseudo_header); + return try_capture_dissector("ethertype", etype, pd, offset+5+5, len, cpinfo, pseudo_header); } return FALSE; -- cgit v1.2.3