diff options
author | Michael Mann <mmann78@netscape.net> | 2015-12-14 19:25:31 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-17 04:01:56 +0000 |
commit | f342fdcdb83d960bd59ab7e42237c18f9282adcc (patch) | |
tree | 81c59810cd548e154d3c1fd95998b3ed0148db4e /epan/dissectors/packet-tcp.c | |
parent | 8cb03d57a600bc092fd5670f37fb990784fffd96 (diff) |
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 <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-tcp.c')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 89b462e82f..9771f8d5c0 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -4800,14 +4800,14 @@ tcp_flags_to_str_first_letter(const struct tcpheader *tcph) } static gboolean -capture_tcp(const guchar *pd _U_, int offset _U_, int len _U_, packet_counts *ld, const union wtap_pseudo_header *pseudo_header _U_) +capture_tcp(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->tcp++; + cpinfo->counts->tcp++; src_port = pntoh16(&pd[offset]); dst_port = pntoh16(&pd[offset+2]); @@ -4821,11 +4821,11 @@ capture_tcp(const guchar *pd _U_, int offset _U_, int len _U_, packet_counts *ld } if (low_port != 0 && - try_capture_dissector("tcp.port", low_port, pd, offset+20, len, ld, pseudo_header)) + try_capture_dissector("tcp.port", low_port, pd, offset+20, len, cpinfo, pseudo_header)) return TRUE; if (high_port != 0 && - try_capture_dissector("tcp.port", high_port, pd, offset+20, len, ld, pseudo_header)) + try_capture_dissector("tcp.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" */ |