diff --git a/EduNetworkBuilder/NetworkDevice.cs b/EduNetworkBuilder/NetworkDevice.cs index 47b82f6..4970b2a 100644 --- a/EduNetworkBuilder/NetworkDevice.cs +++ b/EduNetworkBuilder/NetworkDevice.cs @@ -1583,6 +1583,17 @@ namespace EduNetworkBuilder 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) { //We need to create a traceroute packet - start with 1 TTL