tcpdump mailing list archives

Re: [libpcap] Make timestamps precision configurable (#303)


From: Michael Richardson <mcr () sandelman ca>
Date: Mon, 03 Jun 2013 13:58:00 -0400


"Michal" == Michal Sekletar <notifications () github com> writes:
    Michal> Two new functions are introduced, pcap_set_tstamp_precision() and
    Michal> pcap_get_tstamp_precision(). Those functions allow one to specify
    Michal> desired timestamps precision for captured packets. By default
    Michal> application will obtain timestamps in microseconds.

..

    Michal> https://github.com/the-tcpdump-group/libpcap/pull/303

"Guy" == Guy Harris <notifications () github com> writes:
    Guy> We might also want to add a routine such as
    Guy> `pcap_open_offline_nsectime()` that: 

    Guy> - returns seconds-and-nanoseconds time stamps when reading files;
    Guy> - supplies them natively for nanosecond-time-stamp pcaps (which have a different magic number);
    Guy> - fakes them with microsecond-time-stamp pcaps;
    Guy> - scales pcap-ng file time stamps appropriately;

    Guy> and also have `pcap_dump()` create a file of the appropriate
    Guy> type based on whether the input capture or savefile is
    Guy> providing microsecond or nanosecond precision (and also provide
    Guy> a `pcap_open_dead_nsectime()` when writing a savefile with
    Guy> packet sources other than libpcap). 

Correct me if I'm wrong, but we have magic number differences when the
save file contents are different?

-- 
]               Never tell me the odds!                 | ipv6 mesh networks [ 
]   Michael Richardson, Sandelman Software Works        | network architect  [ 
]     mcr () sandelman ca  http://www.sandelman.ca/        |   ruby on rails    [ 
        

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: