ODP: [Winpcap-users] pcap_sendpacket help

Daniel Wojcieszyk Daniel.Wojcieszyk at bielsko.evatronix.com.pl
Thu Aug 17 17:35:11 GMT 2006

Hi Thai,
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.
Best regards,


Od: winpcap-users-bounces at winpcap.org w imieniu Thai Pham Vinh
Wysłano: Cz 2006-08-17 19:14
Do: winpcap-users at winpcap.org
Temat: Re: [Winpcap-users] pcap_sendpacket help

Hi Daniel,

Did you open the correct adapter?


On Thu, 17 Aug 2006 10:32:08 +0200, Daniel Wojcieszyk wrote
> Hi All,
> I am new with winpcap. I try to build application in Visual C++ 2005
> which use pcap_sendpacket method. I have to send Ethernet (MAC) frame
> throw my Ethernet card to other device. The problem is that when I build
> this frame and use following method, frame isn't received by other
> devices. When I start Etherael on my machine I can see that packet was
> send, but in other machine ethereal can't see any packets. Similar
> situation is when I connect some HUB between my computer and other one
> and I send some packets, I can see that green diode is blinking only in
> hub port to which I am connected, but not in the rest of ports where
> other computers are connected. It looks like this packet is not
> forwarded to other ports. Frame which I build loks like frame from
> sample from winpcap documentation:
>                       /* destination broadcast address*/
>                       packet[0]=0xFF;
>                       packet[1]=0xFF;
>                       packet[2]=0xFF;
>                       packet[3]=0xFF;
>                       packet[4]=0xFF;
>                       packet[5]=0xFF;
>                       /* set mac source to 2:2:2:2:2:2 */
>                       packet[6]=2;
>                       packet[7]=2;
>                       packet[8]=2;
>                       packet[9]=2;
>                       packet[10]=2;
>                       packet[11]=2;
>                       /* Fill the rest of the packet */
>                       for(i=12;i<100;i++)
>                       {
>                               packet[i]=i%256;
>                       }
>                       while(1)
>                       {
>                       /* Send down the packet */
>                       if (pcap_sendpacket(adhandle, packet, 100 /*
> size */) !=0)
>                       {
>                               pcap_geterr(fp));
>                               return ;
>                       }
> Function pcap_sendpacket doesn't return any error, it shows always that
> packet was send correctly but in other computers I can't see them
> anyway. When I get packets (send by other computers to mine machine)from
> my card everythink works good, I can do this without any problems. IS
> anybody who can help me to solve this problem?
> Thank you all.
> Best greats,
> Daniel.
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users


Winpcap-users mailing list
Winpcap-users at winpcap.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060817/0cc5a048/attachment.htm

More information about the Winpcap-users mailing list