> -----Original Message-----
> From: Sherif Fanous [mailto:[EMAIL PROTECTED]
> Sent: gioved� 3 luglio 2003 15.40
> To: [EMAIL PROTECTED]
> Subject: [WinPcap-users] pcap_next_ex() and threads question
>
>
> Hi,
> I'm writing an application that runs 2 worker threads. The first
> thread keeps capturing packets within a loop for a specified
> period of time using pcap_next_ex(), for every captured packet it
> enqueues it into a queue.
You can avoid this thread.
WinPcap will enqueue the captured packets into an internal buffer for your
convenience.
You can call the pcap_next_ex() and perform your job.
If some other packets arrive in the meanwhile, they will be returned by the
next call to pcap_next_ex().
Cheers,
fulvio
> The second thread just dequeues the
> captured packets and performs some operations. My question is,
> while the second thread is running, their is still network
> activity going on and I want to make sure I am capturing those
> packets as well!!!! Is this doable using my design. On the other
> hand I cant revert to a design with 1 thread capturing all the
> packets and then doing all the processing, because what usually
> happens is that a huge capture time causes the application to
> crash reporting memory overflows.
> Any help would be appreciated
> Regards
>
> Sherif Fanous
> Software Engineer
> Netcelera, ITWorx
>
>
>
>
> ======================
> This is the WinPcap users list. It is archived at
> http://www.mail-archive.com/[EMAIL PROTECTED]/
>
> To unsubscribe use
> mailto: [EMAIL PROTECTED]
> ======================
================================================================= This is the WinPcap
users list. It is archived at
http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use
mailto: [EMAIL PROTECTED]
=================================================================