chg: [pibs] print timestamp when printing potential backscatter

master
Gerard Wagener 2019-04-10 10:16:41 +02:00
parent aff2cb2d94
commit ff7df8ce2a
1 changed files with 4 additions and 3 deletions

View File

@ -299,8 +299,9 @@ void process_frame(pibs_t* pibs, wtap *wth,
} }
// TODO keep these IPs in a hashtable and rank them // TODO keep these IPs in a hashtable and rank them
if (pibs->show_backscatter) { if (pibs->show_backscatter) {
printf("%s,%d,%d\n", printf("%ld,%s,%d,%d\n",
inet_ntoa(ipv4->ip_src), tcp->th_flags, ntohs(tcp->th_sport)); wth->rec.ts.secs, inet_ntoa(ipv4->ip_src), tcp->th_flags,
ntohs(tcp->th_sport));
} }
//TODO relative time //TODO relative time
//Purge old ips? //Purge old ips?
@ -560,7 +561,7 @@ int main(int argc, char* argv[])
} }
if (pibs->show_backscatter) 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]) { if (pibs->filename[0]) {
process_file(pibs); process_file(pibs);
} }