packet.net

Sending my own ARP packet using SharpPcap and Packet.Net

梦想的初衷 提交于 2019-12-22 05:33:37
问题 I am trying unsuccessfully so far to send an ARP packet I have created with Packet.Net using SharpPcap. The problem is even though I send the packet using device.SendPacket it doesn't actually get sent, and I have no idea why. This is my code: ARPPacket arpPacket = new ARPPacket(ARPOperation.Request, PhysicalAddress.Parse("000000000000"), targetIpAddress, device.Interface.MacAddress, myIpAddress); EthernetPacket ethPacket = new EthernetPacket(device.Interface.MacAddress, PhysicalAddress.Parse

Sending my own ARP packet using SharpPcap and Packet.Net

笑着哭i 提交于 2019-12-05 06:11:11
I am trying unsuccessfully so far to send an ARP packet I have created with Packet.Net using SharpPcap. The problem is even though I send the packet using device.SendPacket it doesn't actually get sent, and I have no idea why. This is my code: ARPPacket arpPacket = new ARPPacket(ARPOperation.Request, PhysicalAddress.Parse("000000000000"), targetIpAddress, device.Interface.MacAddress, myIpAddress); EthernetPacket ethPacket = new EthernetPacket(device.Interface.MacAddress, PhysicalAddress.Parse("FFFFFFFFFFFF"), EthernetPacketType.Arp); ethPacket.PayloadPacket = arpPacket; device.Open(); device