register ping arrival in traversal info

This commit is contained in:
Tim Young 2017-08-25 16:02:42 -05:00
parent 4755d0511d
commit 2e73b622e4
2 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,7 @@ namespace EduNetworkBuilder
packet_in=4, packet_out=8, packet_duplicate=16, all=63, packet_in=4, packet_out=8, packet_duplicate=16, all=63,
dump=256, pause=512} dump=256, pause=512}
public enum TraversalTechnology { gateway, static_route, vlan, ethernet, wireless, firewall, public enum TraversalTechnology { gateway, static_route, vlan, ethernet, wireless, firewall,
vpn, vpn_encryption, vpn_decryption, ip_address, masquerade, forward} vpn, vpn_encryption, vpn_decryption, ip_address, masquerade, forward, arrived}
[Serializable] [Serializable]
public struct HostNicID //This holds a unique identifier for a network card. Links use this to know what it is connected to public struct HostNicID //This holds a unique identifier for a network card. Links use this to know what it is connected to

View File

@ -1778,6 +1778,7 @@ namespace EduNetworkBuilder
} }
} }
} }
tPacket.TraversalInformation.AddPath(hostname, TraversalTechnology.arrived);
nPacket = new Packet(this, tPacket.sourceIP, "", PacketType.ping_answer, tPacket.packetID); nPacket = new Packet(this, tPacket.sourceIP, "", PacketType.ping_answer, tPacket.packetID);
nPacket.OriginalDestIP = tPacket.destIP; nPacket.OriginalDestIP = tPacket.destIP;
nPacket.isFresh = true; //So it starts from here nPacket.isFresh = true; //So it starts from here
@ -1846,6 +1847,7 @@ namespace EduNetworkBuilder
} }
else else
{ {
tPacket.TraversalInformation.AddPath(hostname, TraversalTechnology.arrived);
tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReturn1")); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReturn1"));
tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrSuccessStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString()); tPacket.Tracking.Status = NB.LeftPad(hostname) + " " + string.Format(NB.Translate("ND_ProssArrSuccessStr"), tPacket.sourceIP.GetIP.ToIpString(), tPacket.destIP.GetIP.ToIpString());
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
@ -1880,6 +1882,8 @@ namespace EduNetworkBuilder
//Console.WriteLine("Tracert: " + tPacket.OrigTTL + " " + tPacket.sourceIP.GetIPString); //Console.WriteLine("Tracert: " + tPacket.OrigTTL + " " + tPacket.sourceIP.GetIPString);
//Console.WriteLine("Tracert: -- " + tPacket.sourceIP.GetIPString + " " + origStart.GetIPString); //Console.WriteLine("Tracert: -- " + tPacket.sourceIP.GetIPString + " " + origStart.GetIPString);
//If we had not landed on the actual dest... //If we had not landed on the actual dest...
tPacket.TraversalInformation.AddPath(hostname, TraversalTechnology.arrived);
tracertmessages.Add(NB.Translate("ND_ProcessArrival_TracertReply") + " " + tPacket.sourceIP.GetIPString); tracertmessages.Add(NB.Translate("ND_ProcessArrival_TracertReply") + " " + tPacket.sourceIP.GetIPString);
if (tPacket.sourceIP.GetIPString != origStart.GetIPString && ttl < 10) if (tPacket.sourceIP.GetIPString != origStart.GetIPString && ttl < 10)