chg: [pibs] added usecs and close the dumper
parent
b74ade61dd
commit
0c9a205dc6
|
@ -306,7 +306,7 @@ void process_frame(pibs_t* pibs, wtap *wth,
|
|||
if (pibs->should_writepcap) {
|
||||
pchdr.ts.tv_sec = wth->rec.ts.secs;
|
||||
//TODO other part of the timestamp
|
||||
pchdr.ts.tv_usec = 0;
|
||||
pchdr.ts.tv_usec = wth->rec.ts.nsecs / 1000;
|
||||
pchdr.caplen = wth->rec.rec_header.packet_header.caplen;
|
||||
pchdr.len = wth->rec.rec_header.packet_header.len;
|
||||
pcap_dump((u_char*)pibs->dumper, &pchdr, eth);
|
||||
|
@ -554,5 +554,8 @@ int main(int argc, char* argv[])
|
|||
if (pibs->show_stats){
|
||||
pibs_dump_stats(pibs);
|
||||
}
|
||||
if (pibs->should_writepcap) {
|
||||
pcap_dump_close(pibs->dumper);
|
||||
}
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue