[Winpcap-users] About pcap_sendqueue
Gianluca Varenni
gianluca.varenni at cacetech.com
Tue Mar 10 09:04:14 PDT 2009
----- Original Message -----
From: Emma Jin
To: winpcap-users at winpcap.org
Sent: Wednesday, March 04, 2009 1:41 PM
Subject: [Winpcap-users] About pcap_sendqueue
Hello,
I am new to pcap. I am trying to use pcap to implement a switch. I have a few questions about the pcap_sendqueue.
Can I create a queue and reuse it again and again? I mean, I want to create a queue, capture packets and put them into the queue until it is full. Then I will send the packets out using pcap_sendqueue_transmit and continue the same process.
Yes, you can.
Does the queue have to be full before pcap_sendqueue_transmit is called?
No. The library will transmit whatever you have put in the queue.
One more question about device handle. If I open a device and obtain a device handle, do I need to close the handle somehow? If so, how to close it? If I open the same device twice, what is going to happen?
You need to close it with pcap_close().
And you can definitely open the same device more than once. Evey device handle will work as a separate capture instance, e.g. you can use different filters on each handle.
GV
Thank you very much.
Emma
------------------------------------------------------------------------------
_______________________________________________
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/20090310/aea00e93/attachment.html
More information about the Winpcap-users
mailing list