From dae607bbae77aff067c5de41d37864fc0df57a15 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Tue, 3 Apr 2018 16:17:17 +0300 Subject: [PATCH] make an enum for a bad packet --- EduNetworkBuilder/NB.cs | 2 +- EduNetworkBuilder/Packet.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NB.cs b/EduNetworkBuilder/NB.cs index b6e36ca..ac0c0fd 100644 --- a/EduNetworkBuilder/NB.cs +++ b/EduNetworkBuilder/NB.cs @@ -32,7 +32,7 @@ namespace EduNetworkBuilder public enum NetShapeType { none, circle, rectangle, } public enum LinkType { normal, wireless, broken } public enum PacketType { none, ping_request, ping_answer, arp_request, arp_answer, dhcp_request, - dhcp_answer, vpn_packet, tun_packet, tracert_request, tracert_reply } + dhcp_answer, vpn_packet, tun_packet, tracert_request, tracert_reply, bad_packet } public enum ResponseToPacket { none, accept, masq, drop, reject } public enum DebugLevel { none=0, info=1, routing=2, switching=4, natting=8, filtering=16, debug=32 , packet=64, all=127} public enum NetworkComponentType { none, router, net_switch, net_hub, laptop, pc, server, wap , tree, diff --git a/EduNetworkBuilder/Packet.cs b/EduNetworkBuilder/Packet.cs index f80ee9c..e43eac5 100644 --- a/EduNetworkBuilder/Packet.cs +++ b/EduNetworkBuilder/Packet.cs @@ -243,6 +243,9 @@ namespace EduNetworkBuilder case PacketType.vpn_packet: pencolor = Color.Orange; break; + case PacketType.bad_packet: + pencolor = Color.Black; //bad packets look bad + break; } Network theNet = NB.GetNetwork(); if (theNet == null)