diff options
author | Michael Mann <mmann78@netscape.net> | 2016-01-05 22:28:48 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-01-06 23:28:19 +0000 |
commit | c7c936a32d2422916797cdd2f39a93c3829b8ea5 (patch) | |
tree | e0d137eeebe2d41968344639d873e8f7151acd7f /epan/dissectors/packet-tcp.h | |
parent | 3239d02bc9335cefd56c99166ead6de7b8f67c29 (diff) |
Have all TCP flags in the structure that is passed to subdissectors.
Have subdissectors do the bit math checking for particular flag bits.
Change-Id: Ie6350e316f79af879be9fc512ce215f24449a7e5
Reviewed-on: https://code.wireshark.org/review/13071
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
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.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h index 55711f0291..876a4b68ed 100644 --- a/epan/dissectors/packet-tcp.h +++ b/epan/dissectors/packet-tcp.h @@ -44,6 +44,9 @@ extern "C" { #define TH_RES 0x0E00 /* 3 reserved bits */ #define TH_MASK 0x0FFF +#define IS_TH_FIN(x) (x & TH_FIN) +#define IS_TH_URG(x) (x & TH_URG) + /* Idea for gt: either x > y, or y is much bigger (assume wrap) */ #define GT_SEQ(x, y) ((gint32)((y) - (x)) < 0) #define LT_SEQ(x, y) ((gint32)((x) - (y)) < 0) @@ -106,8 +109,7 @@ struct tcpinfo { guint32 nxtseq; /* Sequence number of first byte after data */ guint32 lastackseq; /* Sequence number of last ack */ gboolean is_reassembled; /* This is reassembled data. */ - gboolean fin; /* TRUE if FIN flag bit is set */ - gboolean urgent; /* TRUE if "urgent_pointer" is valid */ + guint16 flags; /* TCP flags */ guint16 urgent_pointer; /* Urgent pointer value for the current packet. */ }; |