private GodLesZ.Library.Network.Packet.Packet BuildRequest(System.Net.IPAddress destinationIP, PhysicalAddress localMac, System.Net.IPAddress localIP) { // an arp packet is inside of an ethernet packet var ethernetPacket = new GodLesZ.Library.Network.Packet.EthernetPacket(localMac, PhysicalAddress.Parse("FF-FF-FF-FF-FF-FF"), GodLesZ.Library.Network.Packet.EthernetPacketType.Arp); var arpPacket = new GodLesZ.Library.Network.Packet.ARPPacket(GodLesZ.Library.Network.Packet.ARPOperation.Request, PhysicalAddress.Parse("00-00-00-00-00-00"), destinationIP, localMac, localIP); // the arp packet is the payload of the ethernet packet ethernetPacket.PayloadPacket = arpPacket; return(ethernetPacket); }
private GodLesZ.Library.Network.Packet.Packet BuildRequest(System.Net.IPAddress destinationIP, PhysicalAddress localMac, System.Net.IPAddress localIP) { // an arp packet is inside of an ethernet packet var ethernetPacket = new GodLesZ.Library.Network.Packet.EthernetPacket(localMac, PhysicalAddress.Parse("FF-FF-FF-FF-FF-FF"), GodLesZ.Library.Network.Packet.EthernetPacketType.Arp); var arpPacket = new GodLesZ.Library.Network.Packet.ARPPacket(GodLesZ.Library.Network.Packet.ARPOperation.Request, PhysicalAddress.Parse("00-00-00-00-00-00"), destinationIP, localMac, localIP); // the arp packet is the payload of the ethernet packet ethernetPacket.PayloadPacket = arpPacket; return ethernetPacket; }