aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tap-tcp-stream.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-09-09 01:40:06 +0000
committerGerald Combs <gerald@wireshark.org>2013-09-09 01:40:06 +0000
commit829c1ed25ec2734d9c6fec6d8cbcc2b6e69ff6f1 (patch)
treea33d1faa4ba754b7a9c831c61fd8dff5bd8b1130 /ui/tap-tcp-stream.c
parent077d252fd92c4a41e3d5396e2f869c6804ce86ef (diff)
Add the TCP window scaling graph. Add zoom selections.
Rename some methods. Add the ability to toggle time and sequence number origins. Add more keyboard shortcuts. Comment out abs_secs abs_usecs in the segment struct since it looks like we aren't using them. Make sure we stay in the same TCP stream. svn path=/trunk/; revision=51856
Diffstat (limited to 'ui/tap-tcp-stream.c')
-rw-r--r--ui/tap-tcp-stream.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/tap-tcp-stream.c b/ui/tap-tcp-stream.c
index 6bbf3c1d3a..621c882b09 100644
--- a/ui/tap-tcp-stream.c
+++ b/ui/tap-tcp-stream.c
@@ -61,15 +61,18 @@ tapall_tcpip_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, cons
tg->src_port, tg->dst_port,
&tcphdr->ip_src, &tcphdr->ip_dst,
tcphdr->th_sport, tcphdr->th_dport,
- ts->direction))
+ ts->direction)
+ && tg->stream == tcphdr->th_stream)
{
struct segment *segment = (struct segment *)g_malloc(sizeof(struct segment));
segment->next = NULL;
segment->num = pinfo->fd->num;
segment->rel_secs = (guint32)pinfo->rel_ts.secs;
segment->rel_usecs = pinfo->rel_ts.nsecs/1000;
+ /* Currently unused
segment->abs_secs = (guint32)pinfo->fd->abs_ts.secs;
segment->abs_usecs = pinfo->fd->abs_ts.nsecs/1000;
+ */
segment->th_seq = tcphdr->th_seq;
segment->th_ack = tcphdr->th_ack;
segment->th_win = tcphdr->th_win;
@@ -111,7 +114,8 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_k
if (!cf || !tg) return;
if (!stream_known) {
- if (!select_tcpip_session(cf, &current)) return;
+ struct tcpheader *header = select_tcpip_session(cf, &current);
+ if (!header) return;
if (tg->type == GRAPH_THROUGHPUT)
ts.direction = COMPARE_CURR_DIR;
else
@@ -122,6 +126,7 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_k
tg->src_port = current.th_sport;
COPY_ADDRESS(&tg->dst_address, &current.ip_dst);
tg->dst_port = current.th_dport;
+ tg->stream = header->th_stream;
}
/* rescan all the packets and pick up all interesting tcp headers.
@@ -328,8 +333,10 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
hdrs->num = fdata->num;
hdrs->rel_secs = (guint32) rel_ts.secs;
hdrs->rel_usecs = rel_ts.nsecs/1000;
+ /* Currently unused
hdrs->abs_secs = (guint32) fdata->abs_ts.secs;
hdrs->abs_usecs = fdata->abs_ts.nsecs/1000;
+ */
hdrs->th_seq = th.tcphdrs[0]->th_seq;
hdrs->th_ack = th.tcphdrs[0]->th_ack;
hdrs->th_win = th.tcphdrs[0]->th_win;