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

Haigui Chen haigui.chen at gmail.com
Sun May 13 04:14:47 GMT 2007


For our program was designed to just has one thread for the network monitor,
so i have to...

On 5/12/07, Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:
>
>  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 <haigui.chen at gmail.com>
> *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
>
>
> _______________________________________________
> 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/20070513/eb30a959/attachment.html


More information about the Winpcap-users mailing list