VirtualBox

Changeset 14844 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Dec 1, 2008 10:07:12 AM (16 years ago)
Author:
vboxsync
Message:

netsniffer: fixed offset between VBox.log and the sniffer tracefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp

    r11284 r14844  
    325325    pThis->pDrvIns                      = pDrvIns;
    326326    pThis->File                         = NIL_RTFILE;
    327     pThis->StartNanoTS                  = /*RTTimeProgramNanoTS() - */ RTTimeNanoTS();
     327    /* The pcap file *must* start at time offset 0,0. */
     328    pThis->StartNanoTS                  = RTTimeNanoTS() - RTTimeProgramNanoTS();
    328329    /* IBase */
    329330    pDrvIns->IBase.pfnQueryInterface    = drvNetSnifferQueryInterface;
     
    414415    /*
    415416     * Write pcap header.
    416      */
    417     PcapFileHdr(pThis->File, pThis->StartNanoTS);
     417     * Some time is done since capturing pThis->StartNanoTS so capture the current time again.
     418     */
     419    PcapFileHdr(pThis->File, RTTimeNanoTS());
    418420
    419421    return VINF_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette