aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tcp.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-04-27 22:21:15 -0400
committerAnders Broman <a.broman58@gmail.com>2016-04-29 04:52:26 +0000
commitcefea720340320aca86d31d7703eaf6b38c1f45a (patch)
treefc7e01d16e5c0d3869fc09c4ea080d8734cfeb40 /epan/dissectors/packet-tcp.h
parentba4888ed62baad4c794d26a097dd0889bd4f6559 (diff)
Separate out the members of tcp_flow_t structure that are only used for sequence analysis.
That way they only need to be allocated if analysis is being done. Inspired by https://www.wireshark.org/lists/wireshark-dev/201604/msg00218.html Ping-Bug: 12367 Change-Id: I797e5b305133d85a2a89688109cc3a218d0a9e88 Reviewed-on: https://code.wireshark.org/review/15138 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-tcp.h')
-rw-r--r--epan/dissectors/packet-tcp.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h
index 9b4cec40db..a9b25dadcc 100644
--- a/epan/dissectors/packet-tcp.h
+++ b/epan/dissectors/packet-tcp.h
@@ -287,14 +287,12 @@ typedef enum {
#define MPTCP_CHECKSUM_MASK 0x80
-
-typedef struct _tcp_flow_t {
- guint8 static_flags; /* true if base seq set */
- guint32 base_seq; /* base seq number (used by relative sequence numbers)*/
-#define TCP_MAX_UNACKED_SEGMENTS 1000 /* The most unacked segments we'll store */
+/* Information in a flow that is only used when tcp_analyze_seq preference
+ * is enabled, so save the memory when it isn't
+ */
+typedef struct tcp_analyze_seq_flow_info_t {
tcp_unacked_t *segments;/* List of segments for which we haven't seen an ACK */
guint16 segment_count; /* How many unacked segments we're currently storing */
- guint32 fin; /* frame number of the final FIN */
guint32 lastack; /* last seen ack */
nstime_t lastacktime; /* Time of the last ack packet */
guint32 lastnondupack; /* frame number of last seen non dupack */
@@ -310,6 +308,14 @@ typedef struct _tcp_flow_t {
* distinguish between retransmission,
* fast retransmissions and outoforder
*/
+
+} tcp_analyze_seq_flow_info_t;
+
+typedef struct _tcp_flow_t {
+ guint8 static_flags; /* true if base seq set */
+ guint32 base_seq; /* base seq number (used by relative sequence numbers)*/
+#define TCP_MAX_UNACKED_SEGMENTS 1000 /* The most unacked segments we'll store */
+ guint32 fin; /* frame number of the final FIN */
guint32 window; /* last seen window */
gint16 win_scale; /* -1 is we don't know, -2 is window scaling is not used */
gint16 scps_capable; /* flow advertised scps capabilities */
@@ -318,6 +324,8 @@ typedef struct _tcp_flow_t {
guint32 push_bytes_sent; /* bytes since the last PSH flag */
gboolean push_set_last; /* tracking last time PSH flag was set */
+ tcp_analyze_seq_flow_info_t* tcp_analyze_seq_info;
+
/* This tcp flow/session contains only one single PDU and should
* be reassembled until the final FIN segment.
*/