From ff7df8ce2a9ff7ef46555194ec0ba4c84abd5167 Mon Sep 17 00:00:00 2001 From: Gerard Wagener Date: Wed, 10 Apr 2019 10:16:41 +0200 Subject: [PATCH] chg: [pibs] print timestamp when printing potential backscatter --- bin/pibs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/pibs.c b/bin/pibs.c index cf5632b..e6c90ca 100644 --- a/bin/pibs.c +++ b/bin/pibs.c @@ -299,8 +299,9 @@ void process_frame(pibs_t* pibs, wtap *wth, } // TODO keep these IPs in a hashtable and rank them if (pibs->show_backscatter) { - printf("%s,%d,%d\n", - inet_ntoa(ipv4->ip_src), tcp->th_flags, ntohs(tcp->th_sport)); + printf("%ld,%s,%d,%d\n", + wth->rec.ts.secs, inet_ntoa(ipv4->ip_src), tcp->th_flags, + ntohs(tcp->th_sport)); } //TODO relative time //Purge old ips? @@ -560,7 +561,7 @@ int main(int argc, char* argv[]) } if (pibs->show_backscatter) - printf("#source IP, TCP flags, source port\n"); + printf("#timestamp, source IP, TCP flags, source port\n"); if (pibs->filename[0]) { process_file(pibs); }