more things tracked

This commit is contained in:
Tim Young 2017-08-26 19:05:44 -05:00
parent c6bee193ce
commit fdacb85fe6
4 changed files with 10 additions and 6 deletions

View File

@ -2172,6 +2172,10 @@ namespace EduNetworkBuilder
Console.WriteLine(i + " " + TraversalCollection[i].Source()); Console.WriteLine(i + " " + TraversalCollection[i].Source());
Console.WriteLine(i + " " + TraversalCollection[i].Destination()); Console.WriteLine(i + " " + TraversalCollection[i].Destination());
} }
if(TraversalCollection.Count>0)
{
TraversalCollection[0].DumpPath();
}
} }
#endregion Random Map Stuff #endregion Random Map Stuff
} }

View File

@ -559,7 +559,7 @@ namespace EduNetworkBuilder
{ {
//When we leave the WAN port, we are masqueraded. Track that. //When we leave the WAN port, we are masqueraded. Track that.
WhereFrom.StoreOutgoingPacketInfo(nPacket, ResponseToPacket.masq); WhereFrom.StoreOutgoingPacketInfo(nPacket, ResponseToPacket.masq);
tPacket.TraversalInformation.AddPath(WhereFrom.hostname, TraversalTechnology.masquerade); //We just masqueraded tPacket.TraversalInformation.AddPath(WhereFrom.hostname, TraversalTechnology.masquerade,""); //We just masqueraded
//Now, we masquerade the packet so it looks like it comes fromhere //Now, we masquerade the packet so it looks like it comes fromhere
nPacket.Tracking.AddMessage(DebugLevel.natting, WhereFrom.hostname, string.Format(NB.Translate("NC_ChangeIPStr"), nf.myIP.GetIPString)); nPacket.Tracking.AddMessage(DebugLevel.natting, WhereFrom.hostname, string.Format(NB.Translate("NC_ChangeIPStr"), nf.myIP.GetIPString));
nPacket.sourceIP = nf.myIP; nPacket.sourceIP = nf.myIP;
@ -600,7 +600,7 @@ namespace EduNetworkBuilder
{ {
//We need to tell the original packet that it is inside another packet //We need to tell the original packet that it is inside another packet
tPacket.MyStatus = PacketStatus.encapsulated; tPacket.MyStatus = PacketStatus.encapsulated;
tPacket.TraversalInformation.AddPath(WhereFrom.hostname, TraversalTechnology.vpn); //We just started a VPN tPacket.TraversalInformation.AddPath(WhereFrom.hostname, TraversalTechnology.vpn, NicName()); //We just started a VPN
tPacket.TsourceIP = nf.myIP; tPacket.TsourceIP = nf.myIP;
tPacket.destMAC = WhereFrom.LookupArpFromIP(tPacket.OutboundIP.GetIPString); tPacket.destMAC = WhereFrom.LookupArpFromIP(tPacket.OutboundIP.GetIPString);
if (nf != null) if (nf != null)
@ -614,7 +614,7 @@ namespace EduNetworkBuilder
//We need to send the new packet on (pass it back to the device to process) //We need to send the new packet on (pass it back to the device to process)
madeprogress = true; madeprogress = true;
if(EncryptionKey != "") if(EncryptionKey != "")
tPacket.TraversalInformation.AddPath(WhereFrom.hostname, TraversalTechnology.vpn_encryption); //We the packet is "encrypted" tPacket.TraversalInformation.AddPath(WhereFrom.hostname, TraversalTechnology.vpn_encryption,NicName()); //We the packet is "encrypted"
} }
} }
break; break;

View File

@ -418,9 +418,9 @@ namespace EduNetworkBuilder
//Console.WriteLine(NB.Translate("P_StartingOnLink") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC)); //Console.WriteLine(NB.Translate("P_StartingOnLink") + string.Format(" SMAC: {0} DMAC: {1}",sourceMAC,destMAC));
AddMessage(DebugLevel.debug, " " + NB.Translate("P_StartingOnLink")); AddMessage(DebugLevel.debug, " " + NB.Translate("P_StartingOnLink"));
if(theLink.theLinkType == LinkType.wireless) if(theLink.theLinkType == LinkType.wireless)
TraversalInformation.AddPath(theLink.hostname, TraversalTechnology.wireless); //We just went to wireless TraversalInformation.AddPath(theLink.hostname, TraversalTechnology.wireless,""); //We just went to wireless
else else
TraversalInformation.AddPath(theLink.hostname, TraversalTechnology.ethernet); //We just went to ethernet TraversalInformation.AddPath(theLink.hostname, TraversalTechnology.ethernet,""); //We just went to ethernet
} }

View File

@ -58,7 +58,7 @@ namespace EduNetworkBuilder
{ {
foreach(TraversalRecord one in PathTaken) foreach(TraversalRecord one in PathTaken)
{ {
Console.WriteLine(string.Format("{0:12} : {1:-12}",one.host, one.WhatUsed.ToString())); Console.WriteLine(string.Format("{0:12} : {1:-12} {2:10}",one.host, one.WhatUsed.ToString(),one.AdditionalData));
} }
Console.WriteLine(""); //blank line. Console.WriteLine(""); //blank line.
} }