Skip to content

Commit

Permalink
Fixed the bug in the calculation of the "avg win adv" field in long o…
Browse files Browse the repository at this point in the history
…utput.

Now, we have the nice property that avg. falls in between min. and max. :-)

The win_tot field in the tcb structure that sums up all the window
advertisements seen to calculate the average in the end, was a u_long which
had to be changed to u_llong.

Further, the semantics of what tcptrace reports as window stats (min,max,avg)
when both end-points agree on using window scaling has been modified.
When we know that both sides are infact doing window scaling (we saw both the
SYNs carrying window scale option), we flush out the win_min, win_max,
win_tot stats gathered from the SYN packets so that the min, max, and
avg values reported are only for the scaled window advertisements seen in
the connection.
  • Loading branch information
mramadas committed Jun 13, 2003
1 parent 954c44d commit 444cf2a
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 71 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,8 @@ based on the patch sent by Thomas Bohnert.
6.4.4 : 19 MAY 2003 Wes
-----
Added dsack counter to long output format and dsack sample input and output

6.4.5 : 13 JUN 2003 Mani
-----
Fixed bug in the calculation of the "avg win adv" field, so that now avg.
falls in between min and max.
6 changes: 3 additions & 3 deletions flex_bison/filt_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static const short yycheck[] = { 4,
20, 21, 17, 18, 19, 20, 21, 19, 20, 21
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/local/share/bison.simple"
#line 3 "/usr/share/bison.simple"
/* This file comes from bison-1.28. */

/* Skeleton output parser for bison,
Expand Down Expand Up @@ -474,7 +474,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif
#endif

#line 217 "/usr/local/share/bison.simple"
#line 217 "/usr/share/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
Expand Down Expand Up @@ -912,7 +912,7 @@ case 27:
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/local/share/bison.simple"
#line 543 "/usr/share/bison.simple"

yyvsp -= yylen;
yyssp -= yylen;
Expand Down
4 changes: 2 additions & 2 deletions input/OUTPUTbench/6syns.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ TCP connection 1:
max win adv: 1516544 bytes max win adv: 246720 bytes
min win adv: 1516544 bytes min win adv: 241344 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 1070079 bytes avg win adv: 205814 bytes
avg win adv: 1516544 bytes avg win adv: 243700 bytes
max owin: 2897 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 1380 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -132,7 +132,7 @@ TCP connection 2:
max win adv: 1516544 bytes max win adv: 246720 bytes
min win adv: 1516544 bytes min win adv: 212904 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 1416474 bytes avg win adv: 216907 bytes
avg win adv: 1516544 bytes avg win adv: 227461 bytes
max owin: 6300 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 3529 bytes avg owin: 1 bytes
Expand Down
2 changes: 1 addition & 1 deletion input/OUTPUTbench/bad_ack_code.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ TCP connection 2:
max win adv: 16384 bytes max win adv: 1 bytes
min win adv: 16384 bytes min win adv: 1 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 0 bytes avg win adv: 1 bytes
avg win adv: 16384 bytes avg win adv: 1 bytes
max owin: 0 bytes max owin: 0 bytes
min non-zero owin: 0 bytes min non-zero owin: 0 bytes
avg owin: 0 bytes avg owin: 0 bytes
Expand Down
6 changes: 3 additions & 3 deletions input/OUTPUTbench/badsyns.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TCP connection 1:
max win adv: 16384 bytes max win adv: 0 bytes
min win adv: 16384 bytes min win adv: 0 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 0 bytes avg win adv: 0 bytes
avg win adv: 16384 bytes avg win adv: 0 bytes
max owin: 0 bytes max owin: 0 bytes
min non-zero owin: 0 bytes min non-zero owin: 0 bytes
avg owin: 0 bytes avg owin: 0 bytes
Expand Down Expand Up @@ -115,9 +115,9 @@ TCP connection 2:
min segm size: 439 bytes min segm size: 0 bytes
avg segm size: 1279 bytes avg segm size: 0 bytes
max win adv: 17520 bytes max win adv: 65535 bytes
min win adv: 16384 bytes min win adv: 16384 bytes
min win adv: 17520 bytes min win adv: 64088 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 17393 bytes avg win adv: 52885 bytes
avg win adv: 17520 bytes avg win adv: 65052 bytes
max owin: 2897 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 1304 bytes avg owin: 1 bytes
Expand Down
4 changes: 2 additions & 2 deletions input/OUTPUTbench/discard.solaris.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ TCP connection 1:
max win adv: 8760 bytes max win adv: 0 bytes
min win adv: 8760 bytes min win adv: 0 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 0 bytes avg win adv: 0 bytes
avg win adv: 8760 bytes avg win adv: 0 bytes
max owin: 0 bytes max owin: 0 bytes
min non-zero owin: 0 bytes min non-zero owin: 0 bytes
avg owin: 0 bytes avg owin: 0 bytes
Expand Down Expand Up @@ -115,7 +115,7 @@ TCP connection 2:
max win adv: 8760 bytes max win adv: 0 bytes
min win adv: 8760 bytes min win adv: 0 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 0 bytes avg win adv: 0 bytes
avg win adv: 8760 bytes avg win adv: 0 bytes
max owin: 0 bytes max owin: 0 bytes
min non-zero owin: 0 bytes min non-zero owin: 0 bytes
avg owin: 0 bytes avg owin: 0 bytes
Expand Down
4 changes: 2 additions & 2 deletions input/OUTPUTbench/dlt_null.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ TCP connection 1:
min segm size: 1392 bytes min segm size: 0 bytes
avg segm size: 1391 bytes avg segm size: 0 bytes
max win adv: 16704 bytes max win adv: 16704 bytes
min win adv: 16384 bytes min win adv: 15312 bytes
min win adv: 16704 bytes min win adv: 15312 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 16702 bytes avg win adv: 15403 bytes
avg win adv: 16704 bytes avg win adv: 15397 bytes
max owin: 16705 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 14356 bytes avg owin: 1 bytes
Expand Down
4 changes: 2 additions & 2 deletions input/OUTPUTbench/dsack.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ TCP connection 1:
min segm size: 996 bytes min segm size: 0 bytes
avg segm size: 1447 bytes avg segm size: 0 bytes
max win adv: 17520 bytes max win adv: 121180 bytes
min win adv: 16384 bytes min win adv: 3892 bytes
min win adv: 17520 bytes min win adv: 3892 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 17519 bytes avg win adv: 120698 bytes
avg win adv: 17520 bytes avg win adv: 120711 bytes
max owin: 120185 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 73984 bytes avg owin: 1 bytes
Expand Down
34 changes: 17 additions & 17 deletions input/OUTPUTbench/fast_reuse.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TCP connection 2:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 214520 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 241823 bytes avg win adv: 220117 bytes
avg win adv: 246720 bytes avg win adv: 226484 bytes
max owin: 7241 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 1581 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -198,7 +198,7 @@ TCP connection 3:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 201200 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 243541 bytes avg win adv: 215318 bytes
avg win adv: 246720 bytes avg win adv: 219144 bytes
max owin: 7241 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 1255 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -276,7 +276,7 @@ TCP connection 4:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 195072 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 244015 bytes avg win adv: 212410 bytes
avg win adv: 246720 bytes avg win adv: 215572 bytes
max owin: 7241 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 1157 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -354,7 +354,7 @@ TCP connection 5:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 245528 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 199937 bytes
avg win adv: 246720 bytes avg win adv: 245826 bytes
max owin: 1194 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 597 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -432,7 +432,7 @@ TCP connection 6:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 235296 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 230248 bytes avg win adv: 212357 bytes
avg win adv: 246720 bytes avg win adv: 240353 bytes
max owin: 4345 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 2157 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -510,7 +510,7 @@ TCP connection 7:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 245912 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 200168 bytes
avg win adv: 246720 bytes avg win adv: 246114 bytes
max owin: 807 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 404 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -588,7 +588,7 @@ TCP connection 8:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 245048 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 199694 bytes
avg win adv: 246720 bytes avg win adv: 245522 bytes
max owin: 1449 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 418 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -666,7 +666,7 @@ TCP connection 9:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 244200 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 199355 bytes
avg win adv: 246720 bytes avg win adv: 245098 bytes
max owin: 1449 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 631 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -744,7 +744,7 @@ TCP connection 10:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 245336 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 199822 bytes
avg win adv: 246720 bytes avg win adv: 245682 bytes
max owin: 1381 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 691 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -822,7 +822,7 @@ TCP connection 11:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 246696 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 200638 bytes
avg win adv: 246720 bytes avg win adv: 246702 bytes
max owin: 21 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 11 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -900,7 +900,7 @@ TCP connection 12:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 246696 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 200638 bytes
avg win adv: 246720 bytes avg win adv: 246702 bytes
max owin: 21 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 11 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -978,7 +978,7 @@ TCP connection 13:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 246064 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 200259 bytes
avg win adv: 246720 bytes avg win adv: 246228 bytes
max owin: 658 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 329 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -1056,7 +1056,7 @@ TCP connection 14:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 245776 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 200086 bytes
avg win adv: 246720 bytes avg win adv: 246012 bytes
max owin: 942 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 471 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -1134,7 +1134,7 @@ TCP connection 15:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 244168 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 199342 bytes
avg win adv: 246720 bytes avg win adv: 245082 bytes
max owin: 1449 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 638 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -1212,7 +1212,7 @@ TCP connection 16:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 246696 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 200638 bytes
avg win adv: 246720 bytes avg win adv: 246702 bytes
max owin: 21 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 11 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -1290,7 +1290,7 @@ TCP connection 17:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 222728 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 240009 bytes avg win adv: 221448 bytes
avg win adv: 246720 bytes avg win adv: 230769 bytes
max owin: 7241 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 1874 bytes avg owin: 1 bytes
Expand Down Expand Up @@ -1368,7 +1368,7 @@ TCP connection 18:
max win adv: 246720 bytes max win adv: 246720 bytes
min win adv: 246720 bytes min win adv: 245592 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 210483 bytes avg win adv: 199976 bytes
avg win adv: 246720 bytes avg win adv: 245874 bytes
max owin: 1125 bytes max owin: 1 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 563 bytes avg owin: 1 bytes
Expand Down
2 changes: 1 addition & 1 deletion input/OUTPUTbench/first_seg_ooo.dmp.gz.long
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TCP connection 1:
max win adv: 99280 bytes max win adv: 17520 bytes
min win adv: 99280 bytes min win adv: 16994 bytes
zero win adv: 0 times zero win adv: 0 times
avg win adv: 98970 bytes avg win adv: 17347 bytes
avg win adv: 99280 bytes avg win adv: 17345 bytes
max owin: 527 bytes max owin: 4345 bytes
min non-zero owin: 1 bytes min non-zero owin: 1 bytes
avg owin: 34 bytes avg owin: 780 bytes
Expand Down
Loading

0 comments on commit 444cf2a

Please sign in to comment.