[Winpcap-users] Getting problem related to timeout in pcap_next_exfunction

Gianluca Varenni gianluca.varenni at cacetech.com
Fri May 2 23:07:27 GMT 2008


I would probably set an 0 read timeout opening the adapter (pcap_open_live, to_ms = -1), ask for the HANDLEs with pcap_gethandle() and then use WaitForMultipleObjects to wait for the reception of packets on either interface. From there you need to intertwine the packets coming from the two interfaces into a single file. Actually, if you are just capturing to file, doesn't it make more sense to capture on two different files, and then merge them? The only caveat to this approach is that if you are working on high speed networks, you probably want to dump the two files on two completely separate hard drives.

Hope it helps
GV

  ----- Original Message ----- 
  From: Ashok Gupta 
  To: winpcap-users at winpcap.org 
  Sent: Tuesday, April 29, 2008 9:49 AM
  Subject: [Winpcap-users] Getting problem related to timeout in pcap_next_exfunction


  Hi All,

  I am making a program that takes packet from two network interface(using networktap) and mix them in a file on timestamp basis.

  I am getting a problem when one of interface card not capture data it wait for timeout period and it get delay to my program.

  I have tried with setting timeout to -1 but still getting same problem.

  please provide a solution so I can make my program faster in this situation.

  Thanks in advance

  Ashok Gupta


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


  _______________________________________________
  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/20080502/d6dedf79/attachment.htm


More information about the Winpcap-users mailing list