From df930be708d50e9715f173caa26ffe1b7599b157 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 18 Oct 1995 08:37:01 +0000 Subject: initial import of NetBSD tree --- usr.sbin/tcpdump/stime.awk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 usr.sbin/tcpdump/stime.awk (limited to 'usr.sbin/tcpdump/stime.awk') diff --git a/usr.sbin/tcpdump/stime.awk b/usr.sbin/tcpdump/stime.awk new file mode 100644 index 00000000000..d57968ed932 --- /dev/null +++ b/usr.sbin/tcpdump/stime.awk @@ -0,0 +1,21 @@ +# $NetBSD: stime.awk,v 1.2 1995/03/06 19:11:43 mycroft Exp $ + +$6 !~ /^ack/ && $5 !~ /[SFR]/ { + # given a tcpdump ftp trace, output one line for each send + # in the form + # + # where is the time packet was sent (in seconds with + # zero at time of first packet) and is the tcp sequence + # number of the packet divided by 1024 (i.e., Kbytes sent). + # + # convert time to seconds + n = split ($1,t,":") + tim = t[1]*3600 + t[2]*60 + t[3] + if (! tzero) { + tzero = tim + OFS = "\t" + } + # get packet sequence number + i = index($6,":") + printf "%7.2f\t%g\n", tim-tzero, substr($6,1,i-1)/1024 + } -- cgit v1.2.3-59-g8ed1b