summaryrefslogtreecommitdiff
path: root/ui/tap-tcp-stream.h
diff options
context:
space:
mode:
authorKevin Hogan <kwabena@google.com>2017-01-17 16:53:42 -0800
committerRoland Knall <rknall@gmail.com>2017-01-19 10:00:23 +0000
commit259a3e508f37bb3c9b6d18cdacf7a18aa6dbd8f8 (patch)
treefcd04fb31b00a6f78b23c6131b0929ea47fdf4d3 /ui/tap-tcp-stream.h
parentc397adda8a7af8374ba1355f8c221f48abfac42a (diff)
downloadwireshark-259a3e508f37bb3c9b6d18cdacf7a18aa6dbd8f8.tar.gz
Qt: add graph of unacked (outstanding) bytes to window scale graph
This metric is commonly used as an estimate of the sender's congestion window. [ when examining a capture taken from the sender ] Change-Id: I812d5556cef477c08ef1e5d396fbdddda9a6751e Reviewed-on: https://code.wireshark.org/review/19661 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/tap-tcp-stream.h')
-rw-r--r--ui/tap-tcp-stream.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/tap-tcp-stream.h b/ui/tap-tcp-stream.h
index f430fa5fa5..360f4af016 100644
--- a/ui/tap-tcp-stream.h
+++ b/ui/tap-tcp-stream.h
@@ -114,6 +114,21 @@ struct unack *rtt_get_new_unack(double , unsigned int );
void rtt_put_unack_on_list(struct unack ** , struct unack * );
void rtt_delete_unack_from_list(struct unack ** , struct unack * );
+static inline int
+tcp_seq_before(guint32 s1, guint32 s2) {
+ return (gint32)(s1 - s2) < 0;
+}
+
+static inline int
+tcp_seq_eq_or_after(guint32 s1, guint32 s2) {
+ return !tcp_seq_before(s1, s2);
+}
+
+static inline int
+tcp_seq_after(guint32 s1, guint32 s2) {
+ return (s1 != s2) && !tcp_seq_before(s1, s2);
+}
+
#ifdef __cplusplus
}