<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.2900.5726" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>No, unfortunately not. You would need to rescan the PacketBuf
to know how many packets have been transmitted.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</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=drewcrewof2@yahoo.com href="mailto:drewcrewof2@yahoo.com">Dennis
Drew</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> Friday, August 14, 2009 6:01
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users] Anyone have
current Packet32 source?</DIV>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV>GV,</DIV>
<DIV>When one passes a PacketBuf with thousands of packets, and that is passed
to </DIV>
<P>Res = (BOOLEAN)DeviceIoControl(AdapterObject->hFile,</P>
<DIV>The low level routine sends many of the packets auromatically. We only
get to see TotBytesTransfered += BytesTransfered; which in my case is many
hunreds of packets. Is there any way to get a caount back of how many were
sent at the lower level?</DIV>
<DIV> </DIV>
<DIV>Dennis<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT
face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Gianluca Varenni
<gianluca.varenni@cacetech.com><BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B> winpcap-users@winpcap.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, August 13, 2009 2:27:21
PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re:
[Winpcap-users] Anyone have current Packet32 source?<BR></FONT><BR>
<STYLE type=text/css>DIV {
MARGIN:0px;}
</STYLE>
<DIV><FONT size=2>Can you elaborate on that? Which packets do you want to
count?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</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"><B>From:</B> <A
title=drewcrewof2@yahoo.com href="mailto:drewcrewof2@yahoo.com"
target=_blank rel=nofollow ymailto="mailto:drewcrewof2@yahoo.com">Dennis
Drew</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org" target=_blank rel=nofollow
ymailto="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, August 13, 2009 11:59
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users] Anyone
have current Packet32 source?</DIV>
<DIV><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV>Hmmm... the "find" function cannot detect that embedded within () I
guess. Thanks GV...</DIV>
<DIV> </DIV>
<DIV>So do you have any idea how at this low level I could determine the
packet count so I could display it on my application screen? There is a byte
count but that is not the same...</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Dennis<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT
face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Gianluca Varenni <<A
href="mailto:gianluca.varenni@cacetech.com" target=_blank rel=nofollow
ymailto="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>><BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B>
winpcap-users@winpcap.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thursday, August 13, 2009
11:35:04 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re:
[Winpcap-users] Anyone have current Packet32 source?<BR></FONT><BR>
<STYLE type=text/css>DIV {
MARGIN:0px;}
</STYLE>
<DIV><FONT size=2>The code in the compiled DLL is the same as the one that
we ship as a source package (I'm the person who builds the packages).
Remember that the same sources generate different binaries, depending on the
build configuration you use (NT4, NT5x, NT6x). </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>The code you sent actually makes use of the Sync flag,
here</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> </FONT>
<P>Res = (BOOLEAN)DeviceIoControl(AdapterObject->hFile,</P>
<P>(Sync)?BIOCSENDPACKETSSYNC:BIOCSENDPACKETSNOSYNC,</P>
<P>(PCHAR)PacketBuff + TotBytesTransfered,</P>
<P>Size - TotBytesTransfered,</P>
<P>NULL,</P>
<P>0,</P>
<P><FONT size=2></FONT> </P>
<P><FONT size=2>Have a nice day<BR>GV</FONT></P></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"><B>From:</B> <A
title=drewcrewof2@yahoo.com href="mailto:drewcrewof2@yahoo.com"
target=_blank rel=nofollow ymailto="mailto:drewcrewof2@yahoo.com">Dennis
Drew</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=winpcap-users@winpcap.org href="mailto:winpcap-users@winpcap.org"
target=_blank rel=nofollow
ymailto="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, August 13, 2009 11:03
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Anyone have
current Packet32 source?</DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT><FONT
size=2></FONT><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV>Anyone have current Packet32 source?</DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV>The code I see in the packetNtx download is not the same as the code
supplied as a compiled .dll. This code section does not repond the the
Sync flag and it also runs VERY, very slow... like one packet per second
so the loop at "<FONT size=2><FONT color=#0000ff>do</FONT>{" must be
broken.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Any help on pointing me to a fully functional packet dll
will be appreciated.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thnaks,</FONT></DIV>
<DIV><FONT size=2>Dennis (The other Dennis!)</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT size=2>
<P>INT PacketSendPackets( EMCallBack CB, LPADAPTER AdapterObject, PVOID
PacketBuff, ULONG Size, BOOLEAN Sync)</P>
<P>{</P>
<P>BOOLEAN Res;</P>
<P>DWORD BytesTransfered, TotBytesTransfered=0;</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>struct</FONT></FONT><FONT size=2> timeval BufStartTime;</P>
<P>LARGE_INTEGER StartTicks, CurTicks, TargetTicks, TimeFreq;</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>int</FONT></FONT><FONT size=2> nCt = 0, nCount = 0;</P>
<P>TRACE_ENTER(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"PacketSendPackets"</FONT></FONT><FONT size=2>);</P></FONT><FONT
color=#0000ff size=2><FONT color=#0000ff size=2>
<P>#ifdef</FONT></FONT><FONT size=2> HAVE_WANPACKET_API</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>if</FONT></FONT><FONT size=2>(AdapterObject->Flags ==
INFO_FLAG_NDISWAN_ADAPTER)</P>
<P>{</P>
<P>TRACE_PRINT(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"PacketSendPackets: packet sending not allowed on wan
adapters"</FONT></FONT><FONT size=2>);</P>
<P>TRACE_EXIT(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"PacketSendPackets"</FONT></FONT><FONT size=2>);</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>return</FONT></FONT><FONT size=2> 0;</P>
<P>}</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<P>#endif</FONT></FONT><FONT size=2> </FONT><FONT color=#008000
size=2><FONT color=#008000 size=2>//
HAVE_WANPACKET_API</P></FONT></FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>
<P>#ifdef</FONT></FONT><FONT size=2> HAVE_NPFIM_API</P></FONT><FONT
color=#808080 size=2><FONT color=#808080 size=2>
<P>if(AdapterObject->Flags == INFO_FLAG_NPFIM_DEVICE)</P>
<P>{</P>
<P>TRACE_PRINT("PacketSendPackets: packet sending not allowed on npfim
adapters");</P>
<P>TRACE_EXIT("PacketSendPackets");</P>
<P>return 0;</P>
<P>}</P></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>
<P>#endif</FONT></FONT><FONT size=2> </FONT><FONT color=#008000
size=2><FONT color=#008000 size=2>// HAVE_NPFIM_API</P></FONT></FONT><FONT
color=#0000ff size=2><FONT color=#0000ff size=2>
<P>#ifdef</FONT></FONT><FONT size=2> HAVE_AIRPCAP_API</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>if</FONT></FONT><FONT size=2>(AdapterObject->Flags ==
INFO_FLAG_AIRPCAP_CARD)</P>
<P>{</P>
<P>TRACE_PRINT(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"PacketSendPackets: packet sending not allowed on airpcap
adapters"</FONT></FONT><FONT size=2>);</P>
<P>TRACE_EXIT(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"PacketSendPackets"</FONT></FONT><FONT size=2>);</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>return</FONT></FONT><FONT size=2> 0;</P>
<P>}</P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<P>#endif</FONT></FONT><FONT size=2> </FONT><FONT color=#008000
size=2><FONT color=#008000 size=2>//
HAVE_AIRPCAP_API</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>if</FONT></FONT><FONT size=2> (AdapterObject->Flags ==
INFO_FLAG_NDIS_ADAPTER)</P>
<P>{</P>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Obtain
starting timestamp of the buffer</P></FONT></FONT><FONT size=2>
<P>BufStartTime.tv_sec = ((</FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>struct</FONT></FONT><FONT size=2>
timeval*)(PacketBuff))->tv_sec;</P>
<P>BufStartTime.tv_usec = ((</FONT><FONT color=#0000ff size=2><FONT
color=#0000ff size=2>struct</FONT></FONT><FONT size=2>
timeval*)(PacketBuff))->tv_usec;</P>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//
Retrieve the reference time counters</P></FONT></FONT><FONT size=2>
<P>QueryPerformanceCounter(&StartTicks);</P>
<P>QueryPerformanceFrequency(&TimeFreq);</P>
<P>CurTicks.QuadPart = StartTicks.QuadPart;</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>do</FONT></FONT><FONT size=2>{</P>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Send
the data to the driver</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//TODO Res
is NEVER checked, this is REALLY bad.</P></FONT></FONT><FONT size=2>
<P>Res = (BOOLEAN)DeviceIoControl(AdapterObject->hFile,</P>
<P>(Sync)?BIOCSENDPACKETSSYNC:BIOCSENDPACKETSNOSYNC,</P>
<P>(PCHAR)PacketBuff + TotBytesTransfered,</P>
<P>Size - TotBytesTransfered,</P>
<P>NULL,</P>
<P>0,</P>
<P>&BytesTransfered,</P>
<P>NULL);</P>
<P>TotBytesTransfered += BytesTransfered;</P>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Exit
from the loop on termination or error</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>if</FONT></FONT><FONT size=2>(TotBytesTransfered >= Size || Res
!= TRUE)</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>break</FONT></FONT><FONT size=2>;</P>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//
calculate the time interval to wait before sending the next
packet</P></FONT></FONT><FONT size=2>
<P>TargetTicks.QuadPart = StartTicks.QuadPart +</P>
<P>(LONGLONG)</P>
<P>((((</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>struct</FONT></FONT><FONT size=2> timeval*)((PCHAR)PacketBuff +
TotBytesTransfered))->tv_sec - BufStartTime.tv_sec) * 1000000 +</P>
<P>(((</FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>struct</FONT></FONT><FONT size=2> timeval*)((PCHAR)PacketBuff +
TotBytesTransfered))->tv_usec - BufStartTime.tv_usec)) *</P>
<P>(TimeFreq.QuadPart) / 1000000;</P>
<P></P>
<P></FONT><FONT size=2><FONT face="Courier New"></FONT> </P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// Wait
until the time interval has elapsed</P></FONT></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>while</FONT></FONT><FONT size=2>( CurTicks.QuadPart <=
TargetTicks.QuadPart )</P>
<P>QueryPerformanceCounter(&CurTicks);</P>
<P>}</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>while</FONT></FONT><FONT size=2>(TRUE);</P>
<P>}</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>else</P></FONT></FONT><FONT size=2>
<P>{</P>
<P>TRACE_PRINT1(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"Request to write on an unknown device type
(%u)"</FONT></FONT><FONT size=2>, AdapterObject->Flags);</P>
<P>TotBytesTransfered = 0;</P>
<P>}</P>
<P>TRACE_EXIT(</FONT><FONT color=#a31515 size=2><FONT color=#a31515
size=2>"PacketSendPackets"</FONT></FONT><FONT size=2>);</P>
<P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff
size=2>return</FONT></FONT><FONT size=2> TotBytesTransfered;</P>
<P>}</P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>
<P> </P></FONT></FONT></DIV></DIV>
<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></DIV></DIV></DIV>
<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></DIV></DIV></DIV>
<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>