<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>@font-face {
font-family: Calibri;
}
@font-face {
font-family: Tahoma;
}
@page WordSection1 {margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P.MsoAcetate {
FONT-SIZE: 8pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"
}
LI.MsoAcetate {
FONT-SIZE: 8pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"
}
DIV.MsoAcetate {
FONT-SIZE: 8pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Tahoma","sans-serif"
}
SPAN.EmailStyle18 {
COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"
}
SPAN.BalloonTextChar {
FONT-FAMILY: "Tahoma","sans-serif"
}
.MsoChpDefault {
FONT-SIZE: 10pt
}
</style><style id="owaParaStyle">P {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body lang="EN-US" vlink="purple" link="blue" fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>I should've known better than to think "success" on the call meant ACK.</p>
<p>The send is protocol agnostic so may not even have an ACK.</p>
<p> </p>
<p>Been a while since I used it. Typing too fast without thinking gets you in trouble most every time...</p>
<div>
<p id=""> </p>
<div style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma">
<p>Michael D. Black</p>
<p>Senior Scientist</p>
<p>NG Information Systems</p>
<p>Advanced Analytics Directorate</p>
<p> </p>
</div>
</div>
<div style="FONT-SIZE: 16px; COLOR: #000000; FONT-FAMILY: Times New Roman">
<hr tabindex="-1">
<div id="divRpF58164" style="DIRECTION: ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b> winpcap-users-bounces@winpcap.org [winpcap-users-bounces@winpcap.org] on behalf of Gianluca Varenni [Gianluca.Varenni@riverbed.com]<br>
<b>Sent:</b> Wednesday, January 26, 2011 11:04 AM<br>
<b>To:</b> winpcap-users@winpcap.org<br>
<b>Subject:</b> Re: [Winpcap-users] EXTERNAL: Limit on packet sending.<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Pcap_send is synchronous, but it doesn’t wait for the acknowledge on the network (which ACK, by the way?).</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">The reason why is slow is that you perform a system call per packet, which introduces latency and CPU load. As Michael correctly said, I would explore the
use of pcap_queue’s.</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></span> </p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Have a nice day</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">GV</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></span> </p>
<div>
<div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<p class="MsoNormal"><b><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</span></b><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> winpcap-users-bounces@winpcap.org [mailto:winpcap-users-bounces@winpcap.org]
<b>On Behalf Of </b>Black, Michael (IS)<br>
<b>Sent:</b> Wednesday, January 26, 2011 4:54 AM<br>
<b>To:</b> winpcap-users@winpcap.org<br>
<b>Subject:</b> Re: [Winpcap-users] EXTERNAL: Limit on packet sending.</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">I'll jump in here...somebody correct me if I'm wrong.</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">But...I believe pcap_send is synchronous so you're seeing network latency on the acknowledge.</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">You need to look at pcap_sendqueue.... functions. Or just do the windows packet write without using winpcap at all. Pcap is mainly for honoring timestamps
which you probably don't care about.</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
<div>
<p class="MsoNormal" id=""><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
<div>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">Michael D. Black</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">Senior Scientist</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">NG Information Systems</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">Advanced Analytics Directorate</span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"></span> </p>
</div>
</div>
<div>
<div class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span style="COLOR: black">
<hr align="center" width="100%" size="2">
</span></div>
<div id="divRpF15293">
<p class="MsoNormal" style="MARGIN-BOTTOM: 12pt"><b><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'">From:</span></b><span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Tahoma','sans-serif'"> winpcap-users-bounces@winpcap.org
[winpcap-users-bounces@winpcap.org] on behalf of Akif Usman [akif.usman@hotmail.com]<br>
<b>Sent:</b> Wednesday, January 26, 2011 5:46 AM<br>
<b>To:</b> winpcap-users@winpcap.org<br>
<b>Subject:</b> EXTERNAL:[Winpcap-users] Limit on packet sending.</span><span style="COLOR: black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black">HI, </span></p>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black">I am experiencing a problem while writing a program that accepts packets from one ethernet interface puts them in a queue and sends it back to another interface. I am using threading to do this multitasking. The
sending thread is very slow, i dont know why!</span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black">While i use threads and i receive at 50 Mbps i get a total forwarding rate of only 5-7 mbps. Then when i just grab one packet and keep on sending it in one thread (just to test the sending thread), it still gives
me 5-10 Mbps . Is it a limitation of pcap_send packet?</span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black">I am using pcap_loop to receive packets if i want to receive them continuously. But i don;t understand why the sending speed is so low. Please help me i am stuck from quite many days on this.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black"></span> </p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black">Best Regards</span></p>
</div>
<div>
<p class="MsoNormal"><span style="COLOR: black">Fika</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>