Make device.BadPacketFromHere func

This commit is contained in:
Tim Young 2018-04-03 16:27:34 +03:00
parent dae607bbae
commit 0a13df1446

View File

@ -1583,6 +1583,17 @@ namespace EduNetworkBuilder
myNet.addPacket(PingPacket); myNet.addPacket(PingPacket);
} }
public void BadPacketFromHere()
{
NB_IPAddress Destination = new NB_IPAddress(NB.ZeroIPString); //this works like a broadcast
if (isFrozen() || IsBurned || PowerOff) return;
//We need to create a packet
Packet BadPacket = new Packet(this, Destination, "----", PacketType.bad_packet); //generate a bad packet
Network myNet = NB.GetNetwork();
myNet.addPacket(BadPacket);
}
public void TracerouteFromHere(NB_IPAddress Destination) public void TracerouteFromHere(NB_IPAddress Destination)
{ {
//We need to create a traceroute packet - start with 1 TTL //We need to create a traceroute packet - start with 1 TTL