[Winpcap-users] How to monitor multiple NIC in one thread

Gianluca Varenni gianluca.varenni at cacetech.com
Fri May 11 17:20:56 GMT 2007


At the moment there's no way to have a single pcap_t handle draining packets from all the interfaces. You can probably write some code that interleaves the reception of the packets from the various pcap_t handles from within a single thread, by setting the read timeout to 0, getting the read events (pcap_getevent()) and writing some intelligent logic that drains the packets in a fair way (i.e. avoiding to receive packets from one board only).

Is there a specific reason why you want to capture the packets from all the available interfaces from within a single thread? 

Have a nice day
GV




  ----- Original Message ----- 
  From: Haigui Chen 
  To: winpcap-users at winpcap.org 
  Sent: Monday, May 07, 2007 8:54 PM
  Subject: [Winpcap-users] How to monitor multiple NIC in one thread


  I want to monitor all those valid NIC in one machine in one thread,
  But i didn't find any appropriate method to do this, the key issue is 
  that after bind event to one valid nic, how to receive the packet from
  this NIC device, pcap_next_ex(...) is not a good way.
  Anyone can help me?



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


  _______________________________________________
  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/20070511/d6ba03f5/attachment.htm


More information about the Winpcap-users mailing list