Tim Young 2015-11-16 14:51:38 -05:00
commit 945cdd30ce
2 changed files with 79 additions and 19 deletions

View File

@ -1472,9 +1472,9 @@ namespace EduNetworkBuilder
Network myNet = NB.GetNetwork(); Network myNet = NB.GetNetwork();
if (tPacket.MyType == PacketType.tun_packet || tPacket.MyType == PacketType.vpn_packet) if (tPacket.MyType == PacketType.tun_packet || tPacket.MyType == PacketType.vpn_packet)
{ {
tPacket.Tracking.AddMessage(DebugLevel.info,this,"Arrived at the tunnel endpoint."); tPacket.Tracking.AddMessage(DebugLevel.info,this,NB.Translate("ND_ProcessArrival_Arrived"));
tPacket.Tracking.Status = "Arrived at the tunnel endpoint."; tPacket.Tracking.Status = NB.Translate("ND_ProcessArrival_Arrived");
//We If the encryption matches, we succeed. Otherwise, we fail //If the encryption matches, we succeed. Otherwise, we fail
tPacket.MyStatus = PacketStatus.finished_ok; //It stops here tPacket.MyStatus = PacketStatus.finished_ok; //It stops here
nPacket = tPacket.payloadPacket; nPacket = tPacket.payloadPacket;
@ -1485,8 +1485,8 @@ namespace EduNetworkBuilder
{ {
if(nPacket.destMAC != nc.MAC) if(nPacket.destMAC != nc.MAC)
{ {
nPacket.Tracking.Status = "No VPN nic to recieve packet. Check VPN IP"; nPacket.Tracking.Status = NB.Translate("ND_ProcessArrival_IPError1");
nPacket.Tracking.AddMessage(DebugLevel.info, this, "No corresponding IP on vpn. Packet dropped."); nPacket.Tracking.AddMessage(DebugLevel.info, this, NB.Translate("ND_ProcessArrival_IPError2"));
nPacket.MyStatus = PacketStatus.finished_failed; nPacket.MyStatus = PacketStatus.finished_failed;
myNet.addPacket(nPacket); //so it gets pulled out apropriately myNet.addPacket(nPacket); //so it gets pulled out apropriately
tPacket.payloadPacket = null; tPacket.payloadPacket = null;
@ -1499,15 +1499,15 @@ namespace EduNetworkBuilder
nPacket.MyStatus = PacketStatus.processing; nPacket.MyStatus = PacketStatus.processing;
nPacket.WhereAmI = this; nPacket.WhereAmI = this;
nPacket.Tracking.AddMessage(DebugLevel.info, this, "Packet coming out from tunnel."); nPacket.Tracking.AddMessage(DebugLevel.info, this, NB.Translate("ND_ProcessArrival_CommingOut"));
myNet.addPacket(nPacket); myNet.addPacket(nPacket);
tPacket.payloadPacket = null; tPacket.payloadPacket = null;
return; return;
} }
else else
{ {
nPacket.Tracking.Status = "Encryption failed. Unable to decrypt. Packet dropped."; nPacket.Tracking.Status = NB.Translate("ND_ProcessArrival_EncryptErr1");
nPacket.Tracking.AddMessage(DebugLevel.info, this, "Encryption key mismatch. Packet dropped."); nPacket.Tracking.AddMessage(DebugLevel.info, this, NB.Translate("ND_ProcessArrival_EncryptErr2"));
nPacket.MyStatus = PacketStatus.finished_failed; nPacket.MyStatus = PacketStatus.finished_failed;
myNet.addPacket(nPacket); //so it gets pulled out apropriately myNet.addPacket(nPacket); //so it gets pulled out apropriately
tPacket.payloadPacket = null; tPacket.payloadPacket = null;
@ -1517,8 +1517,8 @@ namespace EduNetworkBuilder
else else
{ {
//There is no nic that matches the incoming IP //There is no nic that matches the incoming IP
nPacket.Tracking.Status = "No VPN nic to recieve packet. Check VPN IP"; nPacket.Tracking.Status = NB.Translate("ND_ProcessArrival_VPNNicErr1");
nPacket.Tracking.AddMessage(DebugLevel.info, this, "No corresponding IP on vpn. Packet dropped."); nPacket.Tracking.AddMessage(DebugLevel.info, this, NB.Translate("ND_ProcessArrival_VPNNicErr2"));
nPacket.MyStatus = PacketStatus.finished_failed; nPacket.MyStatus = PacketStatus.finished_failed;
myNet.addPacket(nPacket); //so it gets pulled out apropriately myNet.addPacket(nPacket); //so it gets pulled out apropriately
return; return;
@ -1536,7 +1536,7 @@ namespace EduNetworkBuilder
nPacket.isFresh = true; //So it starts from here nPacket.isFresh = true; //So it starts from here
nPacket.Tracking = new PacketMessage(); nPacket.Tracking = new PacketMessage();
myNet.addPacket(nPacket); myNet.addPacket(nPacket);
tPacket.AddMessage(DebugLevel.info, "Success! The ping reached the destination."); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReached1"));
tPacket.Tracking.Status = hostname + ":\tPing success: The ping reached the destination." + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString(); tPacket.Tracking.Status = hostname + ":\tPing success: The ping reached the destination." + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString();
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
IPAddress tip = nPacket.sourceIP; IPAddress tip = nPacket.sourceIP;
@ -1579,7 +1579,7 @@ namespace EduNetworkBuilder
else else
{ {
tPacket.AddMessage(DebugLevel.info, "The broadcast ping reached a destination that was not on the same network"); tPacket.AddMessage(DebugLevel.info, "The broadcast ping reached a destination that was not on the same network");
tPacket.Tracking.Status = hostname + ":\tThe broadcast ping reached a destination that was not on the same network" + tPacket.sourceIP.GetIP.ToIpString() + " -> " + hostname; tPacket.Tracking.Status = hostname + ":\t" + "The broadcast ping reached a destination that was not on the same network" + tPacket.sourceIP.GetIP.ToIpString() + " -> " + hostname;
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
} }
return; return;
@ -1598,7 +1598,7 @@ namespace EduNetworkBuilder
} }
else else
{ {
tPacket.AddMessage(DebugLevel.info, "Success! The ping returned from its destination."); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PingReturn1"));
tPacket.Tracking.Status = hostname + ":\tPing success: The ping returned from its destination" + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString(); tPacket.Tracking.Status = hostname + ":\tPing success: The ping returned from its destination" + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString();
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
if (tPacket.sourceIP.GetIP != 0) if (tPacket.sourceIP.GetIP != 0)
@ -1613,7 +1613,7 @@ namespace EduNetworkBuilder
} }
else else
{ {
tPacket.AddMessage(DebugLevel.info, "ERROR! A packet returned to a machine that we were not expecting it from."); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PackReturnErr1"));
tPacket.Tracking.Status = hostname + ":\tPing failed: Arrived at a machine that was not expecting it and was rejected." + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString(); tPacket.Tracking.Status = hostname + ":\tPing failed: Arrived at a machine that was not expecting it and was rejected." + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString();
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
@ -1665,7 +1665,7 @@ namespace EduNetworkBuilder
nPacket.MyType = PacketType.arp_answer; nPacket.MyType = PacketType.arp_answer;
nPacket.MyStatus = PacketStatus.processing; nPacket.MyStatus = PacketStatus.processing;
tPacket.AddMessage(DebugLevel.info, "Success! The arp request reached the destination."); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_ArpReached1"));
tPacket.Tracking.Status = hostname + ":\tArp Request found IP: " + tPacket.sourceIP.GetIPString + " on MAC: "+ nPacket.sourceMAC; tPacket.Tracking.Status = hostname + ":\tArp Request found IP: " + tPacket.sourceIP.GetIPString + " on MAC: "+ nPacket.sourceMAC;
tPacket.MyStatus = PacketStatus.finished_ok; tPacket.MyStatus = PacketStatus.finished_ok;
} }
@ -1690,7 +1690,7 @@ namespace EduNetworkBuilder
} }
else else
{ {
tPacket.AddMessage(DebugLevel.info, "ERROR! A packet returned to a machine that we were not expecting it from."); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_PackReturnErr1"));
tPacket.Tracking.Status = hostname + ":\tARP failed: Arrived at a machine that was not expecting it and was rejected." + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString(); tPacket.Tracking.Status = hostname + ":\tARP failed: Arrived at a machine that was not expecting it and was rejected." + tPacket.sourceIP.GetIP.ToIpString() + " -> " + tPacket.destIP.GetIP.ToIpString();
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
} }
@ -1733,7 +1733,7 @@ namespace EduNetworkBuilder
nPacket.OutboundIP = null; nPacket.OutboundIP = null;
nPacket.MyStatus = PacketStatus.processing; nPacket.MyStatus = PacketStatus.processing;
tPacket.AddMessage(DebugLevel.info, "Success! The DHCP request reached a DHCP Server."); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_ProcessArrival_DHCPReach1"));
string IP = ""; string IP = "";
if (nPacket.sourceIP != null) IP = nPacket.sourceIP.GetIPString; if (nPacket.sourceIP != null) IP = nPacket.sourceIP.GetIPString;
if(IP == "" && nPacket.WhereAmI != null) { if(IP == "" && nPacket.WhereAmI != null) {
@ -1768,7 +1768,7 @@ namespace EduNetworkBuilder
} }
else if(!tPacket.isFresh && !ForwardsPackets()) else if(!tPacket.isFresh && !ForwardsPackets())
{ {
tPacket.AddMessage(DebugLevel.info, "ERROR! A packet returned to a machine that we were not expecting it from."); tPacket.AddMessage(DebugLevel.info, "ND_ProcessArrival_PackReturnErr1");
string sIP = "?.?.?.?"; string sIP = "?.?.?.?";
if (tPacket.sourceIP != null) if (tPacket.sourceIP != null)
sIP = tPacket.sourceIP.GetIP.ToIpString(); sIP = tPacket.sourceIP.GetIP.ToIpString();
@ -2191,7 +2191,7 @@ namespace EduNetworkBuilder
tPacket.PacketDump(hostname, DebugPausePoint.packet_in); tPacket.PacketDump(hostname, DebugPausePoint.packet_in);
if(nc == null) if(nc == null)
{ {
tPacket.AddMessage(DebugLevel.info, "The packet failed to hit a Card. We should not be here!"); tPacket.AddMessage(DebugLevel.info, NB.Translate("ND_DoInputFromLink_CardFail1"));
tPacket.Tracking.Status = hostname + " Failed: no card available to use."; tPacket.Tracking.Status = hostname + " Failed: no card available to use.";
tPacket.MyStatus = PacketStatus.finished_failed; tPacket.MyStatus = PacketStatus.finished_failed;
return; return;

View File

@ -777,6 +777,66 @@
<data name="H_WirelessSSID_Title" xml:space="preserve"> <data name="H_WirelessSSID_Title" xml:space="preserve">
<value>Wireless SSID</value> <value>Wireless SSID</value>
</data> </data>
<data name="ND_DoInputFromLink_CardFail1" xml:space="preserve">
<value>The packet failed to hit a Card. We should not be here!</value>
<comment>ND_DoInputFromLink_CardFail1 = The packet failed to hit a Card. We should not be here!</comment>
</data>
<data name="ND_ProcessArrival_ArpReached1" xml:space="preserve">
<value>Success! The arp request reached the destination.</value>
<comment>ND_ProcessArrival_ArpReached1 = Success! The arp request reached the destination.</comment>
</data>
<data name="ND_ProcessArrival_Arrived" xml:space="preserve">
<value>Arrived at the tunnel endpoint.</value>
<comment>ND_ProcessArrival_Arrived = Arrived at the tunnel endpoint.</comment>
</data>
<data name="ND_ProcessArrival_CommingOut" xml:space="preserve">
<value>Packet coming out from tunnel.</value>
<comment>ND_ProcessArrival_CommingOut = Packet coming out from tunnel.</comment>
</data>
<data name="ND_ProcessArrival_DHCPReach1" xml:space="preserve">
<value>Success! The DHCP request reached a DHCP Server.</value>
<comment>ND_ProcessArrival_DHCPReach1 = Success! The DHCP request reached a DHCP Server.</comment>
</data>
<data name="ND_ProcessArrival_EncryptErr1" xml:space="preserve">
<value>Encryption failed. Unable to decrypt. Packet dropped.</value>
<comment>ND_ProcessArrival_EncryptErr1 = Encryption failed. Unable to decrypt. Packet dropped.</comment>
</data>
<data name="ND_ProcessArrival_EncryptErr2" xml:space="preserve">
<value>Encryption key mismatch. Packet dropped.</value>
<comment>ND_ProcessArrival_EncryptErr2 = Encryption key mismatch. Packet dropped.</comment>
</data>
<data name="ND_ProcessArrival_IPError1" xml:space="preserve">
<value>No VPN nic to recieve packet. Check VPN IP</value>
<comment>ND_ProcessArrival_IPError1 = No VPN nic to recieve packet. Check VPN IP</comment>
</data>
<data name="ND_ProcessArrival_IPError2" xml:space="preserve">
<value>No corresponding IP on vpn. Packet dropped.</value>
<comment>ND_ProcessArrival_IPError2 = No corresponding IP on vpn. Packet dropped.</comment>
</data>
<data name="ND_ProcessArrival_PackReturnErr1" xml:space="preserve">
<value>ERROR! A packet returned to a machine that we were not expecting it from.</value>
<comment>ND_ProcessArrival_PackReturnErr1 = ERROR! A packet returned to a machine that we were not expecting it from.</comment>
</data>
<data name="ND_ProcessArrival_PingErr1" xml:space="preserve">
<value>The broadcast ping reached a destination that was not on the same network</value>
<comment>ND_ProcessArrival_PingErr1 = The broadcast ping reached a destination that was not on the same network</comment>
</data>
<data name="ND_ProcessArrival_PingReached1" xml:space="preserve">
<value>Success! The ping reached the destination.</value>
<comment>ND_ProcessArrival_Success1 = Success! The ping reached the destination.</comment>
</data>
<data name="ND_ProcessArrival_PingReturn1" xml:space="preserve">
<value>Success! The ping returned from its destination.</value>
<comment>ND_ProcessArrival_PingReturn1 = Success! The ping returned from its destination.</comment>
</data>
<data name="ND_ProcessArrival_VPNNicErr1" xml:space="preserve">
<value>No VPN nic to recieve packet. Check VPN IP</value>
<comment>ND_ProcessArrival_VPNNicErr1 = No VPN nic to recieve packet. Check VPN IP</comment>
</data>
<data name="ND_ProcessArrival_VPNNicErr2" xml:space="preserve">
<value>No corresponding IP on vpn. Packet dropped.</value>
<comment>ND_ProcessArrival_VPNNicErr2 = No corresponding IP on vpn. Packet dropped.</comment>
</data>
<data name="ND_TunnelPacketFromHere_Error" xml:space="preserve"> <data name="ND_TunnelPacketFromHere_Error" xml:space="preserve">
<value>Packet sent out tunnel but no endpoint set. Dropping</value> <value>Packet sent out tunnel but no endpoint set. Dropping</value>
<comment>ND_TunnelPacketFromHere_Error = Packet sent out tunnel but no endpoint set. Dropping</comment> <comment>ND_TunnelPacketFromHere_Error = Packet sent out tunnel but no endpoint set. Dropping</comment>