Sending my own ARP packet using SharpPcap and Packet.Net
public static void ARP(IPAddress ipAddress , LivePcapDevice device)
{
if (ipAddress == null )
throw new Exception("ARP IP address Cannot be null");
var ethernetPacket = new PacketDotNet.EthernetPacket(device.Addresses[1].Addr.hardwareAddress, PhysicalAddress.Parse("FF-FF-FF-FF-FF-FF"), PacketDotNet.EthernetPacketType.Arp);
var arpPacket = new PacketDotNet.ARPPacket(PacketDotNet.ARPOperation.Request, PhysicalAddress.Parse("00-00-00-00-00-00"), ipAddress , device.Addresses[1].Addr.hardwareAddress, device.Addresses[0].Addr.ipAddress );
ethernetPacket.PayloadPacket = arpPacket;
device.SendPacket(ethernetPacket);
}
Try this function, from: http://stolenpackets.net/?p=29
looking at this code there is no ethernetpacket involved
ARPPacket arpPacket = new ARPPacket(ARPOperation.Request, PhysicalAddress.Parse("000000000000"), targetIpAddress, device.Interface.MacAddress, myIpAddress);
arpPacket.ARPTargetProtoAddress = destIP;
arpPacket.DestinationHwAddress = PhysicalAddress.Parse("FF-FF-FF-FF-FF-FF");
device.Open();
device.SendPacket(arpPacket);
device.Close();