[Winpcap-users] Where does the Winpcap timestamp come from?andothers

Gianluca Varenni gianluca.varenni at cacetech.com
Mon May 4 13:28:33 PDT 2009


  ----- Original Message ----- 
  From: John Wang 
  To: winpcap-users at winpcap.org 
  Sent: Saturday, May 02, 2009 8:45 PM
  Subject: Re: [Winpcap-users] Where does the Winpcap timestamp come from?andothers


  Hi ,



    >>2. Which function in the NPF or Packet.dll can be used as a trigger to request CPU timer, like queryperformancecounter (), to >>timestamp the arrival packet to obatin higher precision?

    >>--GV--
    >>There is no way to obtain higher precision than we are currently using in WinPcap, apart from using custom hardware that >>timestamps the packets in the hardware itself.
    >>--GV--

  Is there any possible to know that which function inside WinPcap is used to timestamp the packets?

The functions used to timestamp packets are in the driver code, in the file time_calls.h. Packets are timestamped in function "NPF_Tap", look for "GET_TIME"




    >>4. Can I reduce the size of the user buffer inside the NPF to set it small enough to triger the CPU timer to timestamp when >>every packet is arrival?

    >>-GV--
    >>Timestamps are generated before the packet is stored in the buffers. So changing the buffer size doesn't help.
    >>--GV--

  Because I try to timestamp the arrival packets again by using my timing functions, I'm looking for a trigger. As I know, the frequency of NPF copying the arrival packets from kernel space to user space depends on the size of user buffer. If I can set the size of user buffer as same as the size of one arrival packet, then, the NPF would copy every single packet from kernel space to user space
  once the packet arrives. And I can use this operation as a trigger to timestamp the arrival packet again with my timing functions, am I right?

You don't want to do that. Unless you want to kill your application performance. What exactly are you trying to achieve with your timing functions vs. the timestamps generated by WinPcap?

GV


  Cheers

  John



------------------------------------------------------------------------------


  _______________________________________________
  Winpcap-users mailing list
  Winpcap-users at winpcap.org
  https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20090504/014b5dd4/attachment.htm 


More information about the Winpcap-users mailing list