<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16441" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>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).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Is there a specific reason why you want to capture the packets
from all the available interfaces from within a single thread?
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=haigui.chen@gmail.com href="mailto:haigui.chen@gmail.com">Haigui
Chen</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 07, 2007 8:54 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] How to monitor
multiple NIC in one thread</DIV>
<DIV><BR></DIV>I want to monitor all those valid NIC in one machine in one
thread,<BR>But i didn't find any appropriate method to do this, the key issue
is <BR>that after bind event to one valid nic, how to receive the packet
from<BR>this NIC device, pcap_next_ex(...) is not a good way.<BR>Anyone can
help me?<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>