4 # we need the number of bytes in a packet to do the output
5 # in packet numbers rather than byte numbers.
12 # convert tcp trace to send/ack form.
14 tim = t
[1]*3600 + t
[2]*60 + t
[3]
21 # we have a data packet record:
22 # ignore guys with syn, fin or reset 'cause we
23 # can't handle their sequence numbers. Try to
24 # detect and add a flag character for 'anomalies':
26 # - -> packet after hole (missing packet(s))
27 # # -> odd size packet
31 strtSeq =
substr($
6,1,i
-1)
32 endSeq =
substr($
6,i
+1,j
-i
-1)
33 len = endSeq
- strtSeq
37 if (endSeq
- expectNext
< 0)
40 if (strtSeq
- expectNext
> 0)
42 else if (len
!= packetsize
)
48 printf "%7.2f\t%7.2f\t%s send %s %d", tim
-tzero
, tim
-ltim
,\
50 if (++timesSent
[id
] > 1)
51 printf " (%.2f) [%d]", tim
- timeOf
[id
], timesSent
[id
]
52 if (len
!= packetsize
)
58 printf "%7.2f\t%7.2f\t%s ack %s %d", tim
-tzero
, tim
-ltim
,\
64 printf " (%.2f)", tim
- timeOf
[id
]
65 if (++timesAcked
[id
] > 1)
66 printf " [%d]", timesAcked
[id
]