My changes
This commit is contained in:
parent
2df0409bb4
commit
5dd3bf8e81
@ -106,7 +106,7 @@ namespace EduNetworkBuilder
|
|||||||
health = copyfrom.health;
|
health = copyfrom.health;
|
||||||
StartTime = copyfrom.StartTime;
|
StartTime = copyfrom.StartTime;
|
||||||
OriginalDestIP = copyfrom.OriginalDestIP;
|
OriginalDestIP = copyfrom.OriginalDestIP;
|
||||||
Tracking.AddMessage(DebugLevel.debug, WhereAmI, "Packet duplicated");
|
Tracking.AddMessage(DebugLevel.debug, WhereAmI, NB.Translate("P_PacketDuplicated"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Generate a packet with the given payload.
|
//Generate a packet with the given payload.
|
||||||
@ -121,7 +121,7 @@ namespace EduNetworkBuilder
|
|||||||
sourceMAC = source;
|
sourceMAC = source;
|
||||||
destMAC = dest;
|
destMAC = dest;
|
||||||
OutboundDestMAC = dest;
|
OutboundDestMAC = dest;
|
||||||
Tracking.AddMessage(DebugLevel.info, start, theType.ToString() + string.Format("Packet Created"));
|
Tracking.AddMessage(DebugLevel.info, start, theType.ToString() + string.Format(NB.Translate("Packet Created")));
|
||||||
Tracking.AddMessage(DebugLevel.routing, start, string.Format(" MAC: {0} -> {1}", source, dest));
|
Tracking.AddMessage(DebugLevel.routing, start, string.Format(" MAC: {0} -> {1}", source, dest));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -134,9 +134,9 @@ namespace EduNetworkBuilder
|
|||||||
destMAC = NB.BroadcastMACString;
|
destMAC = NB.BroadcastMACString;
|
||||||
OutboundDestMAC = destMAC;
|
OutboundDestMAC = destMAC;
|
||||||
}
|
}
|
||||||
Tracking.AddMessage(DebugLevel.info, start, "Packet Created");
|
Tracking.AddMessage(DebugLevel.info, start, NB.Translate("Packet Created"));
|
||||||
Tracking.AddMessage(DebugLevel.routing, start, string.Format(" IP: {0} -> {1}", source, dest));
|
Tracking.AddMessage(DebugLevel.routing, start, string.Format(" IP: {0} -> {1}", source, dest));
|
||||||
Tracking.AddMessage(DebugLevel.debug, start, string.Format(" IPs Translated {0} -> {1}",sourceIP.GetIP.ToIpString(), destIP.GetIP.ToIpString()));
|
Tracking.AddMessage(DebugLevel.debug, start, string.Format(NB.Translate(" IPs Translated {0} -> {1}"),sourceIP.GetIP.ToIpString(), destIP.GetIP.ToIpString()));
|
||||||
}
|
}
|
||||||
isFresh = true;
|
isFresh = true;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ namespace EduNetworkBuilder
|
|||||||
destIP = dest;
|
destIP = dest;
|
||||||
if (destIP != null && destIP.BroadcastAddress == destIP.GetIP)
|
if (destIP != null && destIP.BroadcastAddress == destIP.GetIP)
|
||||||
destMAC = NB.BroadcastMACString;
|
destMAC = NB.BroadcastMACString;
|
||||||
Tracking.AddMessage(DebugLevel.info, start, "Packet Created");
|
Tracking.AddMessage(DebugLevel.info, start, NB.Translate("Packet Created"));
|
||||||
Tracking.AddMessage(DebugLevel.routing, start, string.Format(" IP:{0} -> {1}", sourceIP.GetIP.ToIpString(), dest.GetIP.ToIpString()));
|
Tracking.AddMessage(DebugLevel.routing, start, string.Format(" IP:{0} -> {1}", sourceIP.GetIP.ToIpString(), dest.GetIP.ToIpString()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -161,7 +161,7 @@ namespace EduNetworkBuilder
|
|||||||
sourceIP = new IPAddress(NB.ZeroIPString);
|
sourceIP = new IPAddress(NB.ZeroIPString);
|
||||||
destMAC = NB.BroadcastMACString;
|
destMAC = NB.BroadcastMACString;
|
||||||
destIP = dest;
|
destIP = dest;
|
||||||
Tracking.AddMessage(DebugLevel.info, start, "Packet Created");
|
Tracking.AddMessage(DebugLevel.info, start, NB.Translate("Packet Created"));
|
||||||
//Tracking.AddMessage(DebugLevel.routing, start, " IP:" + sourceIP.GetIP.ToIpString() + " -> " + dest.GetIP.ToIpString());
|
//Tracking.AddMessage(DebugLevel.routing, start, " IP:" + sourceIP.GetIP.ToIpString() + " -> " + dest.GetIP.ToIpString());
|
||||||
}
|
}
|
||||||
isFresh = true;
|
isFresh = true;
|
||||||
@ -261,8 +261,8 @@ namespace EduNetworkBuilder
|
|||||||
if(MyNet.CountPackets(PacketType.arp_answer) + MyNet.CountPackets(PacketType.arp_request) == 0)
|
if(MyNet.CountPackets(PacketType.arp_answer) + MyNet.CountPackets(PacketType.arp_request) == 0)
|
||||||
{
|
{
|
||||||
//No more arps going. We do not have an answer!
|
//No more arps going. We do not have an answer!
|
||||||
Tracking.AddMessage(DebugLevel.info, WhereAmI, string.Format("Unable to find a mac address for the IP address: {0}", dest.GetIP.ToIpString()));
|
Tracking.AddMessage(DebugLevel.info, WhereAmI, NB.Translate("P_ProcessTick") + ": "+ dest.GetIP.ToIpString());
|
||||||
Tracking.Status = string.Format("{0} Failed: Unable to find a MAC address for the specified IP.", WhereAmI.hostname );
|
Tracking.Status = WhereAmI.hostname + NB.Translate("P_ProcessTick");
|
||||||
MyStatus = PacketStatus.finished_failed;
|
MyStatus = PacketStatus.finished_failed;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -277,8 +277,8 @@ namespace EduNetworkBuilder
|
|||||||
//We pass it to the device
|
//We pass it to the device
|
||||||
if (WhereAmI == null)
|
if (WhereAmI == null)
|
||||||
{
|
{
|
||||||
AddMessage(DebugLevel.debug, "The packet was dropped because we lost where it was. WhereAmI == null!");
|
AddMessage(DebugLevel.debug, NB.Translate("P_PacketLostLong"));
|
||||||
Tracking.Status = "NO_Host Lost location of packet..";
|
Tracking.Status = NB.Translate("P_PacketLostShort");
|
||||||
MyStatus = PacketStatus.finished_failed;
|
MyStatus = PacketStatus.finished_failed;
|
||||||
return; //We cannot process the packet
|
return; //We cannot process the packet
|
||||||
}
|
}
|
||||||
@ -297,8 +297,8 @@ namespace EduNetworkBuilder
|
|||||||
//So, we pass the packet to the device to process
|
//So, we pass the packet to the device to process
|
||||||
if (WhereAmI == null)
|
if (WhereAmI == null)
|
||||||
{
|
{
|
||||||
AddMessage(DebugLevel.debug, "The packet was dropped because we lost where it was. WhereAmI == null!");
|
AddMessage(DebugLevel.debug, NB.Translate("P_PacketLostLong"));
|
||||||
Tracking.Status = "NO_Host Lost location of packet..";
|
Tracking.Status = NB.Translate("P_PacketLostShort");
|
||||||
MyStatus = PacketStatus.finished_failed;
|
MyStatus = PacketStatus.finished_failed;
|
||||||
return; //We cannot process the packet
|
return; //We cannot process the packet
|
||||||
}
|
}
|
||||||
@ -309,8 +309,8 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
if (WhereAmI == null)
|
if (WhereAmI == null)
|
||||||
{
|
{
|
||||||
AddMessage(DebugLevel.debug, "The packet was dropped because we lost where it was. WhereAmI == null!");
|
AddMessage(DebugLevel.debug, NB.Translate("P_PacketLostLong"));
|
||||||
Tracking.Status = "NO_Host Lost location of packet..";
|
Tracking.Status = NB.Translate("P_PacketLostShort");
|
||||||
MyStatus = PacketStatus.finished_failed;
|
MyStatus = PacketStatus.finished_failed;
|
||||||
return; //We cannot process the packet
|
return; //We cannot process the packet
|
||||||
}
|
}
|
||||||
@ -340,8 +340,8 @@ namespace EduNetworkBuilder
|
|||||||
myDirection = nb_direction.to_dst;
|
myDirection = nb_direction.to_dst;
|
||||||
else
|
else
|
||||||
myDirection = nb_direction.to_src;
|
myDirection = nb_direction.to_src;
|
||||||
Console.WriteLine(string.Format("Starting on link. SMAC: {0} DMAC: {1}",sourceMAC,destMAC));
|
Console.WriteLine(NB.Translate("Starting on link.") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC));
|
||||||
AddMessage(DebugLevel.debug, " Starting on link");
|
AddMessage(DebugLevel.debug, " " + "Starting on link");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartOnDevice(NetworkDevice theDevice)
|
public void StartOnDevice(NetworkDevice theDevice)
|
||||||
|
@ -1525,6 +1525,30 @@
|
|||||||
<value>unknown</value>
|
<value>unknown</value>
|
||||||
<comment>PacketMessage PM_UnknownHost = unknown</comment>
|
<comment>PacketMessage PM_UnknownHost = unknown</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="P_IPsTranslated" xml:space="preserve">
|
||||||
|
<value>IPs Translated {0} -> {1}</value>
|
||||||
|
<comment>Packet IPsTranslated = IPs Translated {0} -> {1}</comment>
|
||||||
|
</data>
|
||||||
|
<data name="P_PacketCreated" xml:space="preserve">
|
||||||
|
<value>Packet Created</value>
|
||||||
|
<comment>Packet P_PacketCreated = Packet Created</comment>
|
||||||
|
</data>
|
||||||
|
<data name="P_PacketDuplicated" xml:space="preserve">
|
||||||
|
<value>Packet duplicated</value>
|
||||||
|
<comment>Packet P_PacketDuplicated = Packet duplicated</comment>
|
||||||
|
</data>
|
||||||
|
<data name="P_PacketLostLong" xml:space="preserve">
|
||||||
|
<value>The packet was dropped because we lost where it was. WhereAmI == null!</value>
|
||||||
|
<comment>P_PacketLostLong = The packet was dropped because we lost where it was. WhereAmI == null!</comment>
|
||||||
|
</data>
|
||||||
|
<data name="P_PacketLostShort" xml:space="preserve">
|
||||||
|
<value>NO_Host Lost location of packet..</value>
|
||||||
|
<comment>P_PacketLostShort = NO_Host Lost location of packet..</comment>
|
||||||
|
</data>
|
||||||
|
<data name="P_ProcessTick" xml:space="preserve">
|
||||||
|
<value>Unable to find a MAC address for the IP address</value>
|
||||||
|
<comment>P_ProcessTick = Unable to find a MAC address for the IP address</comment>
|
||||||
|
</data>
|
||||||
<data name="RTFW_NotFound" xml:space="preserve">
|
<data name="RTFW_NotFound" xml:space="preserve">
|
||||||
<value>Not found.</value>
|
<value>Not found.</value>
|
||||||
<comment>RTFW_NotFound = Not found.</comment>
|
<comment>RTFW_NotFound = Not found.</comment>
|
||||||
|
Loading…
Reference in New Issue
Block a user