<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Re: [Winpcap-users] pcap_sendpacket help</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText6537 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hi Thai,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Yes I am sure that I opened correct 
adapter. I supose that it could be problem with CRC cheksum, I do not write it 
to my array which I send. Where I can find some information about this, mybe you 
know? I did some experience today, I sent some ICMP packet which I obtained 
by Ethereal, and this packet was sent corectly throw my ethernet card. Do you 
have some idea what it could be? Thanks for response.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Best regards,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Daniel</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Od:</B> winpcap-users-bounces@winpcap.org w imieniu 
Thai Pham Vinh<BR><B>Wysłano:</B> Cz 2006-08-17 19:14<BR><B>Do:</B> 
winpcap-users@winpcap.org<BR><B>Temat:</B> Re: [Winpcap-users] pcap_sendpacket 
help<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hi Daniel,<BR><BR>Did you open the correct 
adapter?<BR><BR>Regards,<BR>Thai.<BR><BR>On Thu, 17 Aug 2006 10:32:08 +0200, 
Daniel Wojcieszyk wrote<BR>> Hi All,<BR>><BR>> I am new with winpcap. I 
try to build application in Visual C++ 2005<BR>> which use pcap_sendpacket 
method. I have to send Ethernet (MAC) frame<BR>> throw my Ethernet card to 
other device. The problem is that when I build<BR>> this frame and use 
following method, frame isn't received by other<BR>> devices. When I start 
Etherael on my machine I can see that packet was<BR>> send, but in other 
machine ethereal can't see any packets. Similar<BR>> situation is when I 
connect some HUB between my computer and other one<BR>> and I send some 
packets, I can see that green diode is blinking only in<BR>> hub port to 
which I am connected, but not in the rest of ports where<BR>> other computers 
are connected. It looks like this packet is not<BR>> forwarded to other 
ports. Frame which I build loks like frame from<BR>> sample from winpcap 
documentation:<BR>><BR>>       
        
        /* destination broadcast 
address*/<BR>>       
        
        packet[0]=0xFF;<BR>> 
              
        packet[1]=0xFF;<BR>> 
              
        packet[2]=0xFF;<BR>> 
              
        packet[3]=0xFF;<BR>> 
              
        packet[4]=0xFF;<BR>> 
              
        packet[5]=0xFF;<BR>> 
              
   <BR>>       
        
        /* set mac source to 2:2:2:2:2:2 
*/<BR>>       
        
        packet[6]=2;<BR>> 
              
        packet[7]=2;<BR>> 
              
        packet[8]=2;<BR>> 
              
        packet[9]=2;<BR>> 
              
        packet[10]=2;<BR>> 
              
        packet[11]=2;<BR>> 
              
   <BR>>       
        
        /* Fill the rest of the packet 
*/<BR>>       
        
        for(i=12;i<100;i++)<BR>> 
              
        {<BR>> 
              
        
        packet[i]=i%256;<BR>> 
              
        }<BR>><BR>> 
              
        while(1)<BR>> 
              
        {<BR>> 
              
        /* Send down the packet */<BR>> 
              
        if (pcap_sendpacket(adhandle, packet, 
100 /*<BR>> size */) !=0)<BR>>       
        
        {<BR>> 
              
        
        pcap_geterr(fp));<BR>> 
              
        
        return ;<BR>> 
              
        }<BR>><BR>> Function 
pcap_sendpacket doesn't return any error, it shows always that<BR>> packet 
was send correctly but in other computers I can't see them<BR>> anyway. When 
I get packets (send by other computers to mine machine)from<BR>> my card 
everythink works good, I can do this without any problems. IS<BR>> anybody 
who can help me to solve this problem?<BR>><BR>> Thank you 
all.<BR>><BR>> Best greats,<BR>> Daniel.<BR>><BR>> 
_______________________________________________<BR>> Winpcap-users mailing 
list<BR>> Winpcap-users@winpcap.org<BR>> <A 
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR><BR><BR>--<BR><BR>_______________________________________________<BR>Winpcap-users 
mailing list<BR>Winpcap-users@winpcap.org<BR><A 
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR></FONT></P></DIV>
</BODY>
</HTML>