diff --git a/EduNetworkBuilder/NetworkDevice.cs b/EduNetworkBuilder/NetworkDevice.cs index 29eeed9..8702491 100644 --- a/EduNetworkBuilder/NetworkDevice.cs +++ b/EduNetworkBuilder/NetworkDevice.cs @@ -1982,15 +1982,15 @@ namespace EduNetworkBuilder { if (tPacket.MyType == PacketType.dhcp_answer) { - tPacket.AddMessage(DebugLevel.info, hostname + string.Format(NB.Translate("ND_PrepPackGtewyErr")) + " " + tPacket.OutboundIP.GetIP.ToIpString()); - tPacket.Tracking.Status = hostname + string.Format(NB.Translate("ND_PrepPackGtewyErr")); + tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackGtewyErr")) + " " + tPacket.OutboundIP.GetIP.ToIpString()); + tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_PrepPackGtewyErr")); tPacket.MyStatus = PacketStatus.finished_failed; return false; } else { - tPacket.AddMessage(DebugLevel.info, hostname + string.Format(NB.Translate("ND_PrepPackRoutErr")) +" "+ tPacket.OutboundIP.GetIP.ToIpString()); - tPacket.Tracking.Status = hostname + NB.Translate("ND_PrepPackRoutErr"); + tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackRoutErr")) +" "+ tPacket.OutboundIP.GetIP.ToIpString()); + tPacket.Tracking.Status = hostname + " " + NB.Translate("ND_PrepPackRoutErr"); tPacket.MyStatus = PacketStatus.finished_failed; return false; } @@ -2003,8 +2003,8 @@ namespace EduNetworkBuilder tPacket.OutboundNic = LocalNic(tPacket.OutboundIP); if (tPacket.OutboundNic == null) { - tPacket.AddMessage(DebugLevel.info, hostname + string.Format(NB.Translate("ND_PrepPackNICErr")) + " :"+ tPacket.OutboundIP.GetIP.ToIpString()); - tPacket.Tracking.Status = hostname + NB.Translate("ND_PrepPackNICErr"); + tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackNICErr")) + " :"+ tPacket.OutboundIP.GetIP.ToIpString()); + tPacket.Tracking.Status = hostname + " " + NB.Translate("ND_PrepPackNICErr"); tPacket.MyStatus = PacketStatus.finished_failed; return false; } @@ -2015,8 +2015,8 @@ namespace EduNetworkBuilder tPacket.OutboundIF = tPacket.OutboundNic.LocalInterface(tPacket.OutboundIP, tPacket.Tracking); if (tPacket.OutboundIF == null) { - tPacket.AddMessage(DebugLevel.info, hostname + string.Format(NB.Translate("ND_PrepPackRoutErr")) + " :" + tPacket.OutboundIP.GetIP.ToIpString()); - tPacket.Tracking.Status = hostname + NB.Translate("ND_PrepPackRoutErr"); + tPacket.AddMessage(DebugLevel.info, hostname + " " + string.Format(NB.Translate("ND_PrepPackRoutErr")) + " :" + tPacket.OutboundIP.GetIP.ToIpString()); + tPacket.Tracking.Status = hostname + " " + NB.Translate("ND_PrepPackRoutErr"); tPacket.MyStatus = PacketStatus.finished_failed; return false; } @@ -2193,7 +2193,7 @@ namespace EduNetworkBuilder if(nc == null) { tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_DoInputFromLink_CardFail1")); - tPacket.Tracking.Status = hostname + string.Format(NB.Translate("ND_DoInputFromLink_CardFail2")); + tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_DoInputFromLink_CardFail2")); tPacket.MyStatus = PacketStatus.finished_failed; return; } @@ -2232,16 +2232,16 @@ namespace EduNetworkBuilder { if (tPacket.MyType == PacketType.dhcp_request && !isDHCPServer) { - tPacket.AddMessage(DebugLevel.debug, hostname + string.Format(NB.Translate("ND_DoInFromLnkDeaf"))); - tPacket.Tracking.Status = hostname + string.Format(NB.Translate("ND_DoInFromLnkNoDHCP")); + tPacket.AddMessage(DebugLevel.debug, hostname + " " +string.Format(NB.Translate("ND_DoInFromLnkDeaf"))); + tPacket.Tracking.Status = hostname +" " + string.Format(NB.Translate("ND_DoInFromLnkNoDHCP")); tPacket.MyStatus = PacketStatus.finished_failed; return; } if ((tPacket.MyType == PacketType.ping_answer || tPacket.MyType== PacketType.ping_request) && !RoutesPackets() && (!HasIPAddress(tPacket.destIP) && !HasBroadcastAddress(tPacket.destIP))) { - tPacket.AddMessage(DebugLevel.debug, hostname + string.Format(NB.Translate("ND_NotRouter"))); - tPacket.Tracking.Status = hostname + string.Format(NB.Translate("ND_NotRouter2")); + tPacket.AddMessage(DebugLevel.debug, hostname + " " +string.Format(NB.Translate("ND_NotRouter"))); + tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_NotRouter2")); tPacket.MyStatus = PacketStatus.finished_failed; return; } @@ -2251,7 +2251,7 @@ namespace EduNetworkBuilder myType != NetworkComponentType.wrouter) { tPacket.AddMessage(DebugLevel.debug, hostname + string.Format(NB.Translate("ND_NoLocIP"))); - tPacket.Tracking.Status = hostname + string.Format(NB.Translate("ND_NoLocIP2")); + tPacket.Tracking.Status = hostname + " " + string.Format(NB.Translate("ND_NoLocIP2")); tPacket.MyStatus = PacketStatus.finished_failed; return; } diff --git a/EduNetworkBuilder/Packet.cs b/EduNetworkBuilder/Packet.cs index 6b491ae..936e065 100644 --- a/EduNetworkBuilder/Packet.cs +++ b/EduNetworkBuilder/Packet.cs @@ -340,8 +340,8 @@ namespace EduNetworkBuilder myDirection = nb_direction.to_dst; else myDirection = nb_direction.to_src; - Console.WriteLine(NB.Translate("Starting on link.") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC)); - AddMessage(DebugLevel.debug, " " + "Starting on link"); + Console.WriteLine(NB.Translate("P_StartingOnLink") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC)); + AddMessage(DebugLevel.debug, " " + NB.Translate("P_StartingOnLink")); } public void StartOnDevice(NetworkDevice theDevice) @@ -366,9 +366,9 @@ namespace EduNetworkBuilder } if(MyType == PacketType.arp_request && MyStatus == PacketStatus.finished_failed) { - Tracking.AddMessage(DebugLevel.info, "Packet", - string.Format("Packet failed to reach any IP. No such IP on network: {0}", destIP.GetIPString)); - Tracking.Status = string.Format("Packet failed to reach IP: {0}",destIP.GetIPString); + Tracking.AddMessage(DebugLevel.info, NB.Translate("P_Packet"), + NB.Translate("P_PacketFailedToReach") + ": " + destIP.GetIPString); + Tracking.Status = NB.Translate("P_PacketFailedToReach2") + ": "+ destIP.GetIPString; MyStatus = PacketStatus.finished_failed; } if (MyStatus != PacketStatus.finished) @@ -448,7 +448,7 @@ namespace EduNetworkBuilder { if (!typeof(T).IsSerializable) { - throw new ArgumentException("The type must be serializable.", "source"); + throw new ArgumentException(NB.Translate("NC_CloneSerialzable"), NB.Translate("NC_source")); } // Don't serialize a null object, simply return the default for that object diff --git a/EduNetworkBuilder/Resources/about.rtf b/EduNetworkBuilder/Resources/about.rtf index 2fbdb58..6b52da9 100644 Binary files a/EduNetworkBuilder/Resources/about.rtf and b/EduNetworkBuilder/Resources/about.rtf differ diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index 1895267..8abcd7c 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -1505,4 +1505,20 @@ Not found. RTFW_NotFound = Not found. + + Packet + P_Packet = Packet + + + Packet failed to reach any IP. No such IP on network + P_PacketFailedToReach = Packet failed to reach any IP. No such IP on network + + + Packet failed to reach IP + P_PacketFailedToReach2 = Packet failed to reach IP + + + Starting on link. + P_StartingOnLink = Starting on link. + \ No newline at end of file diff --git a/EduNetworkBuilder/toedit.txt b/EduNetworkBuilder/toedit.txt index 84204c0..bcf6191 100644 --- a/EduNetworkBuilder/toedit.txt +++ b/EduNetworkBuilder/toedit.txt @@ -63,16 +63,11 @@ Packet.cs:32: PacketDump(" " + status, DebugPausePoint.packet Packet.cs:125: Tracking.AddMessage(DebugLevel.routing, start, string.Format(" MAC: {0} -> {1}", source, dest)); Packet.cs:138: Tracking.AddMessage(DebugLevel.routing, start, string.Format(" IP: {0} -> {1}", source, dest)); Packet.cs:157: Tracking.AddMessage(DebugLevel.routing, start, string.Format(" IP:{0} -> {1}", sourceIP.GetIP.ToIpString(), dest.GetIP.ToIpString())); -Packet.cs:344: AddMessage(DebugLevel.debug, " " + "Starting on link"); -Packet.cs:369: Tracking.AddMessage(DebugLevel.info, "Packet", -Packet.cs:370: string.Format("Packet failed to reach any IP. No such IP on network: {0}", destIP.GetIPString)); -Packet.cs:371: Tracking.Status = string.Format("Packet failed to reach IP: {0}",destIP.GetIPString); Packet.cs:435: Console.WriteLine("Pausing"); Packet.cs:439: Console.WriteLine(string.Format("{0}: {1} PACKET: dstIP: {2} destMAC: {3}", hostname, position, dIP, destMAC)); Packet.cs:440: Console.WriteLine(string.Format("{0}: {1} PACKET: srcIP: {2} srcMAC: {3}", hostname, position, sIP, sourceMAC)); Packet.cs:441: Console.WriteLine("---"); Packet.cs:443: AddMessage(DebugLevel.packet, string.Format("{0}: {1} PACKET: dstIP: {2} destMAC: {3}", hostname, position, dIP, destMAC)); Packet.cs:444: AddMessage(DebugLevel.packet, string.Format("{0}: {1} PACKET: srcIP: {2} srcMAC: {3}", hostname,position,sIP,sourceMAC)); -Packet.cs:451: throw new ArgumentException("The type must be serializable.", "source"); PacketMessage.cs:91: tString = tmessage.HostName + " \t" + tmessage.WhatLevel.ToString() + "\t" + tmessage.Message; PacketMessage.cs:103: tString = time.ToString() + " ms " + Status;