diff options
author | Kevin Hogan <kwabena@google.com> | 2017-01-17 20:30:26 -0800 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-01-20 00:35:34 +0000 |
commit | 73b5e3d0082cc7ca65e5a085bd80264e5a0b1082 (patch) | |
tree | fabca3a702f742198832bca4fa1985c19bfd41d3 /ui/tap-tcp-stream.h | |
parent | 069a5329887b9195f7994de00fe46c9fd055ca71 (diff) |
Qt: modify RTT graph (handle GSO, SACK, etc), plus bug fixes
Modifications to RTT graph:
- change x-axis to time (s) rather than sequence number
[ avoids sequence number wraparound ambiguity, plus
easier to correlate RTT changes to tcptrace graph ]
- change RTT computation to properly handle acks to GSO packets
- change RTT computation to take SACK blocks into account
Bug fixes:
- eliminate potential memory leak if some packets are unacked
- ensure RTT graph is shown if TCPGraph window is opened to it directly
Change-Id: I2bdcab97399ebde0f15c78fa19c882529a814580
Reviewed-on: https://code.wireshark.org/review/19662
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/tap-tcp-stream.h')
-rw-r--r-- | ui/tap-tcp-stream.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/ui/tap-tcp-stream.h b/ui/tap-tcp-stream.h index 360f4af016..a29e04dedc 100644 --- a/ui/tap-tcp-stream.h +++ b/ui/tap-tcp-stream.h @@ -103,16 +103,33 @@ int get_num_acks(struct tcp_graph *, int * ); struct tcpheader *select_tcpip_session(capture_file *, struct segment * ); /* This is used by rtt module only */ -struct unack { - struct unack *next; +struct rtt_unack { + struct rtt_unack *next; double time; unsigned int seqno; + unsigned int end_seqno; }; -int rtt_is_retrans(struct unack * , unsigned int ); -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 * ); +int rtt_is_retrans(struct rtt_unack * , unsigned int ); +struct rtt_unack *rtt_get_new_unack(double , unsigned int , unsigned int ); +void rtt_put_unack_on_list(struct rtt_unack ** , struct rtt_unack * ); +void rtt_delete_unack_from_list(struct rtt_unack ** , struct rtt_unack * ); +void rtt_destroy_unack_list(struct rtt_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); +} static inline int tcp_seq_before(guint32 s1, guint32 s2) { |