For our program was designed to just has one thread for the network monitor, so i have to...<br><br><div><span class="gmail_quote">On 5/12/07, <b class="gmail_sendername">Gianluca Varenni</b> &lt;<a href="mailto:gianluca.varenni@cacetech.com">
gianluca.varenni@cacetech.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div bgcolor="#ffffff">
<div><font size="2">At the moment there&#39;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>&nbsp;</div>
<div><font size="2">Is there a specific reason why you want to capture the packets 
from all the available interfaces from within&nbsp;a single thread? 
</font></div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2">Have a nice day</font></div>
<div><font size="2">GV</font></div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2"></font>&nbsp;</div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><div><span class="e" id="q_1127c9d690e716d1_1">
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
  <div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> 
  <a title="haigui.chen@gmail.com" href="mailto:haigui.chen@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Haigui 
  Chen</a> </div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="winpcap-users@winpcap.org" href="mailto:winpcap-users@winpcap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
winpcap-users@winpcap.org</a> </div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Monday, May 07, 2007 8:54 PM
</div>
  <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><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&#39;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>
  </span></div><p>
  </p><hr>

  <p></p>_______________________________________________<br>Winpcap-users 
  mailing 
  list<br><a href="mailto:Winpcap-users@winpcap.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Winpcap-users@winpcap.org</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br><p></p></blockquote></div>
<br>_______________________________________________<br>Winpcap-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://www.winpcap.org/mailman/listinfo/winpcap-users" target="_blank">
https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br><br></blockquote></div><br>