[Winpcap-users] Problems using pcap_sendpacket()

Janne Heikkinen janne.m.heikkinen at helsinki.fi
Wed Apr 1 03:49:04 PDT 2009


I've been trying to use pcap_sendpacket() like in the following:

http://www.winpcap.org/docs/docs_40_2/html/group__wpcap__tut8.html

pcap_sendpacket() returns no error but I don't see the packets with
WinDump on the other machine. I've been trying to send packets from
Vista computer to XP computer and vice versa. I've tried to run
the executable as administrator but it didn't help.

I've also tried the following change where the latter address is
MAC of the sending NIC:

/* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */
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]=00;
packet[7]=0x1b;
packet[8]=0x78;
packet[9]=0xb3;
packet[10]=0x00;
packet[11]=0xfd;

- Janne



More information about the Winpcap-users mailing list