<!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.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<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=jhm121@yahoo.com href="mailto:jhm121@yahoo.com">Emma Jin</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> Wednesday, March 04, 2009 1:41
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] About
pcap_sendqueue</DIV>
<DIV><BR></DIV>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=plainMail>Hello,</DIV>
<DIV class=plainMail> </DIV>
<DIV class=plainMail>I am new to pcap. I am trying to use pcap to
implement a switch. I have a few questions about the pcap_sendqueue.
</DIV>
<DIV class=plainMail> </DIV>
<DIV class=plainMail>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.</DIV>
<DIV class=plainMail> </DIV></BLOCKQUOTE>
<DIV class=plainMail><FONT size=2>Yes, you can.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=plainMail><FONT size=2></FONT> </DIV>
<DIV class=plainMail>Does the queue have to be full before
pcap_sendqueue_transmit is called?</DIV>
<DIV class=plainMail><FONT size=2></FONT> </DIV></BLOCKQUOTE>
<DIV class=plainMail><FONT size=2>No. The library will transmit whatever
you have put in the queue.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=plainMail> </DIV>
<DIV class=plainMail>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?</DIV></BLOCKQUOTE>
<DIV class=plainMail><FONT size=2></FONT> </DIV>
<DIV class=plainMail><FONT size=2>You need to close it with
pcap_close().</FONT></DIV>
<DIV class=plainMail><FONT size=2>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.</FONT></DIV>
<DIV class=plainMail><FONT size=2></FONT> </DIV>
<DIV class=plainMail><FONT size=2>GV</FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=plainMail><FONT size=2></FONT> </DIV>
<DIV class=plainMail><FONT size=2></FONT> </DIV>
<DIV class=plainMail>Thank you very much.</DIV>
<DIV class=plainMail> </DIV>
<DIV class=plainMail>Emma</DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><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>