[prev in list] [next in list] [prev in thread] [next in thread] 

List:       winpcap-users
Subject:    [Winpcap-users] How to get the timestamp
From:       "Varuna De Silva" <varunax () gmail ! com>
Date:       2007-09-22 8:42:59
Message-ID: cfaac9680709220130t38bbc9eaofe25a7698b21b58c () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello all,

I am reading packets from a different interface to that of the Network
interface of Winpcap.
I use a USB interface. So to get the packets I read to a pcap format, I have
to fill in a pcap_t
structure. For this, Since I need to give the time stamp, in the
pcap_timeval in the pcap_pkthdr,
I want to get the time stamp.

gettimeofday() dont work in windows, GetSystemTime() has only accuracy in ms
which is not
adequate to me.

Can anyone please give me a clue to overcome this, May be I can use the
Winpcap way of
getting the timestamp (possibly from the system) but I do not have any Idea
of how it gets
it kindly guide me to this.

Can I use a simple counter instead of the real time stamp? Is this
advisable? Since I am not
really interested in knowing the exact time the packets arrived.

Regards

Xavier

[Attachment #5 (text/html)]

Hello all,<br><br>I am reading packets from a different interface to that of the \
Network interface of Winpcap.<br>I use a USB interface. So to get the packets I read \
to a pcap format, I have to fill in a pcap_t <br>structure. For this, Since I need to \
give the time stamp, in the pcap_timeval in the pcap_pkthdr, <br>I want to get the \
time stamp. <br><br>gettimeofday() dont work in windows, GetSystemTime() has only \
accuracy in ms which is not <br>adequate to me. <br><br>Can anyone please give me a \
clue to overcome this, May be I can use the Winpcap way of  <br>getting the timestamp \
(possibly from the system) but I do not have any Idea of how it gets<br>it kindly \
guide me to this. <br><br>Can I use a simple counter instead of the real time stamp? \
Is this advisable? Since I am not  <br>really interested in knowing the exact time \
the packets arrived.<br><br>Regards<br><br>Xavier<br>



_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic