<html><head><base href="x-msg://1/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Hi, Devid! Maaany thanks for Your reply. NO, it's just an example MAC's, actually i'm using hardware MAC's. And one more thing, my PC (laptop) connected directly to the other PC (or custom device, it doesn't mater i guess).. </div><div>Many thanks for Your attention, i've spend about 6-8 month with this problem, and still no luck :(</div><br><div><div>19.09.2010, � 15:25, Fish (David B. Trout) �������(�):</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Geneva CY'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">FYI: be careful with the MAC address you choose.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Any MAC address with the<span class="Apple-converted-space"> </span><u>0x01</u><span class="Apple-converted-space"> </span>bit on in the<span class="Apple-converted-space"> </span><u>first byte</u><span class="Apple-converted-space"> </span>is considered an<span class="Apple-converted-space"> </span><i><u>all-stations</u></i><u><span class="Apple-converted-space"> </span><i>broadcast</i></u><i>.</i><o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Is that what you actually intended to do? Send 10,000 packets to ALL/every network adapter on your local network?? (if your host has more than one network adapter on the same physical network segment then they�ll<span class="Apple-converted-space"> </span><i>both</i><span class="Apple-converted-space"> </span>receive every packet.)<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">If you need a MAC address to test with, the IANNA has reserved the range 00-00-5E-00-00-00 through 00-00-5E-FF-FF-FF just for that purpose.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">See the section �IANA ETHERNET ADDRESS BLOCK - UNICAST USE� (about 0.75 of the way down the web page) in the following document:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 0.5in; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> <a href="http://www.iana.org/assignments/ethernet-numbers" style="color: blue; text-decoration: underline; ">http://www.iana.org/assignments/ethernet-numbers</a><o:p></o:p></span></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: black; ">--<span class="Apple-converted-space"> </span></span><span style="color: rgb(31, 73, 125); "><br></span><span style="font-size: 13.5pt; font-family: Arial, sans-serif; color: black; "> "</span><b><span style="font-family: Arial, sans-serif; color: green; ">Fish</span></b><span style="font-size: 13.5pt; font-family: Arial, sans-serif; color: black; ">"</span><span style="font-size: 10pt; font-family: Arial, sans-serif; color: black; "> (</span><span style="font-size: 10pt; font-family: 'Comic Sans MS'; color: purple; ">David B. Trout</span><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(31, 73, 125); ">)</span><span style="color: rgb(31, 73, 125); "><span class="Apple-converted-space"> </span><br></span><span style="font-size: 10pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125); "> </span><span style="color: rgb(31, 73, 125); "> <span class="Apple-converted-space"> </span></span><u><span style="font-size: 10pt; font-family: Arial, sans-serif; color: blue; "><a href="mailto:fish@softdevlabs.com" style="color: blue; text-decoration: underline; ">fish@softdevlabs.com</a></span></u><span style="color: rgb(31, 73, 125); "><o:p></o:p></span></div></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 4pt; "><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span><a href="mailto:winpcap-users-bounces@winpcap.org" style="color: blue; text-decoration: underline; ">winpcap-users-bounces@winpcap.org</a><span class="Apple-converted-space"> </span>[mailto:winpcap-users-bounces@winpcap.org]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>Alimjan Kuramshin<br><b>Sent:</b><span class="Apple-converted-space"> </span>Saturday, September 18, 2010 2:33 PM<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:winpcap-users@winpcap.org" style="color: blue; text-decoration: underline; ">winpcap-users@winpcap.org</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>[Winpcap-users] WinPCAP packets capture delay..<br><b>Importance:</b><span class="Apple-converted-space"> </span>High<o:p></o:p></span></div></div></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">Hello!<o:p></o:p></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">Gianluca, can u run this code on Your machine and running the Wireshark save the log and send it to me, please..<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">Is there any delays, i mean delays between the packets that Wireshark (winpcap) capture?<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">P.S. code from WinPcap documentation, sending packets, not one, but 10000 (or 1000000)..<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><span class="preprocessor">#include <stdlib.h></span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><span class="preprocessor">#include <stdio.h></span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><span class="preprocessor">#include <pcap.h></span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><span class="keywordtype">void</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; ">{<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><a href="http://www.winpcap.org/docs/docs_412/html/group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that..." style="color: blue; text-decoration: underline; ">pcap_t</a> *fp;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><span class="keywordtype">char</span> errbuf[<a href="http://www.winpcap.org/docs/docs_412/html/group__wpcap__def.html#gacd448353957d92c98fccc29e1fc8d927" title="Size to use when allocating the buffer that contains the libpcap errors." style="color: blue; text-decoration: underline; ">PCAP_ERRBUF_SIZE</a>];<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; ">u_char packet[100];<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><span class="keywordtype">int</span> i;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; ">volatile int n_pkts = 10000; // 1000000<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="comment">/* Check the validity of the command line */</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">if</span> (argc != 2)<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> {<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> printf(<span class="stringliteral">"usage: %s interface (e.g. 'rpcap://eth0')"</span>, argv[0]);<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">return</span>;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> }<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="comment">/* Open the output device */</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">if</span> ( (fp= <a href="http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html#ga2b64c7b6490090d1d37088794f1f1791" title="Open a generic source in order to capture / send (WinPcap only) traffic." style="color: blue; text-decoration: underline; ">pcap_open</a>(argv[1], <span class="comment">// name of the device</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> 65536, <span class="comment">// portion of the packet to capture (only the first 100 bytes)</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <a href="http://www.winpcap.org/docs/docs_412/html/group__remote__open__flags.html#ga9134ce51a9a6a7d497c3dee5affdc3b9" title="Defines if the adapter has to go in promiscuous mode." style="color: blue; text-decoration: underline; ">PCAP_OPENFLAG_PROMISCUOUS</a>, <span class="comment">// promiscuous mode</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> 1000, <span class="comment">// read timeout</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> NULL, <span class="comment">// authentication on the remote machine</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> errbuf <span class="comment">// error buffer</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> ) ) == NULL)<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> {<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> fprintf(stderr,<span class="stringliteral">"\nUnable to open the adapter. %s is not supported by WinPcap\n"</span>, argv[1]);<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">return</span>;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> }<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="comment">/* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[0]=1;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[1]=1;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[2]=1;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[3]=1;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[4]=1;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[5]=1;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="comment">/* set mac source to 2:2:2:2:2:2 */</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[6]=2;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[7]=2;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[8]=2;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[9]=2;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[10]=2;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[11]=2;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="comment">/* Fill the rest of the packet */</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">for</span>(i=12;i<100;i++)<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> {<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> packet[i]=(u_char)i;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> }<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> while (n_pkts--)<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="comment">/* Send down the packet */</span><o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">if</span> (<a href="http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html#ga51dbda0f1ab9da2cfe49d657486d50b2" title="Send a raw packet." style="color: blue; text-decoration: underline; ">pcap_sendpacket</a>(fp, packet, 100 <span class="comment">/* size */</span>) != 0)<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> {<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> fprintf(stderr,<span class="stringliteral">"\nError sending the packet: %s\n"</span>, <a href="http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html#ga81305cb154e4497e95bbb9b708631a3a" title="return the error text pertaining to the last pcap library error." style="color: blue; text-decoration: underline; ">pcap_geterr</a>(fp));<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">return</span>;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> }<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "> <span class="keywordflow">return</span>;<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; ">}<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; ">/* EOF */<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; ">Thanks, bye..<o:p></o:p></pre><pre style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></pre><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div></div></div></div>_______________________________________________<br>Winpcap-users mailing list<br><a href="mailto:Winpcap-users@winpcap.org" style="color: blue; text-decoration: underline; ">Winpcap-users@winpcap.org</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users" style="color: blue; text-decoration: underline; ">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br></div></span></blockquote></div><br></body></html>