nDPI
nDPI copied to clipboard
Timestamps in nanoseconds in json
Hello.
I'm using compiled after "git clone" nDPI 4.9 on Linux and on Windows. I would like to have timestamps (first_seen, last_seen) in nanoseconds like in Wireshark after saving in json (6 decimal places, not three as now). I found a few places in the source code but the full changes happened in other places, not in json. In json's timestamps were added only three zeros.
Could you please tell me where I need to change to get what I want? English and C are not my languages, sorry if someting wrong. Thank you.
At very least you need:
- to use
pcap_open_offline_with_tstamp_precision()
- treat the
struct timeval
in thepcap_pkthdr
structure as being seconds and nanoseconds rather than seconds and microseconds
With some luck, you might only need to change the application code and not the library itself (with the exception of the serialization code, likely)