From b03c96c32691d4004befc0b9b5a17da73c4cb803 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 14 Jan 2020 03:39:25 +0000 Subject: [PATCH] Change a FIXME to a TODO with documentation of related issues #180 and #1407 --- libnetutil/netutil.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 38b423d1a..eb40d0869 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -4335,11 +4335,12 @@ int read_reply_pcap(pcap_t *pd, long to_usec, return 0; if (rcvdtime) { - // FIXME: I eventually need to figure out why Windows head.ts time is sometimes BEFORE the time I - // sent the packet (which is according to gettimeofday() in nbase). For now, I will sadly have to - // use gettimeofday() for Windows in this case - // Actually I now allow .05 discrepancy. So maybe this isn't needed. I'll comment out for now. - // Nope: it is still needed at least for Windows. Sometimes the time from he pcap header is a + // TODO: come up with a better way to synchronize pcap with gettimeofday. + // Npcap and WinPcap both suffer from clock drift relative to gettimeofday(). + // We hope to fix this with better time sources for Npcap ( http://issues.nmap.org/1407 ) + // and for Nmap ( http://issues.nmap.org/180 ) + // For now, we use gettimeofday() for Windows in this case. + // Sometimes the time from the pcap header is a // COUPLE SECONDS before the gettimeofday() results :(. #if defined(WIN32) || defined(__amigaos__) gettimeofday(&tv_end, NULL);