Fix networkCard strings for translation
This commit is contained in:
parent
4f0a437e84
commit
1a7258a84e
@ -431,12 +431,12 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
if(nPacket.destMAC == "")
|
if(nPacket.destMAC == "")
|
||||||
{
|
{
|
||||||
nPacket.AddMessage(DebugLevel.debug, " No Machine matching that IP address on this subnet. " + nPacket.destIP.GetIPString);
|
nPacket.AddMessage(DebugLevel.debug, string.Format(" No Machine matching that IP address on this subnet. {0}", nPacket.destIP.GetIPString));
|
||||||
Network mynet = NB.GetNetwork();
|
Network mynet = NB.GetNetwork();
|
||||||
NetworkDevice nd = mynet.GetDeviceFromID(myID);
|
NetworkDevice nd = mynet.GetDeviceFromID(myID);
|
||||||
string hostname = NB.Translate("NC_NoHost");
|
string hostname = NB.Translate("NC_NoHost");
|
||||||
if (nd != null) hostname = nd.hostname;
|
if (nd != null) hostname = nd.hostname;
|
||||||
nPacket.Tracking.Status = hostname + " No Machine matching that IP address on this subnet. " + nPacket.destIP.GetIPString;
|
nPacket.Tracking.Status = string.Format("{0} No Machine matching that IP address on this subnet. ", hostname, nPacket.destIP.GetIPString);
|
||||||
nPacket.MyStatus = PacketStatus.finished_failed;
|
nPacket.MyStatus = PacketStatus.finished_failed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -476,7 +476,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);
|
||||||
//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, "MASQ: Changing outbound IP to: " + nf.myIP.GetIPString);
|
nPacket.Tracking.AddMessage(DebugLevel.natting, WhereFrom.hostname, string.Format("MASQ: Changing outbound IP to: {0}", nf.myIP.GetIPString));
|
||||||
nPacket.sourceIP = nf.myIP;
|
nPacket.sourceIP = nf.myIP;
|
||||||
}
|
}
|
||||||
nPacket.TsourceIP = nf.myIP;
|
nPacket.TsourceIP = nf.myIP;
|
||||||
@ -486,12 +486,12 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
if (nPacket.destMAC == "")
|
if (nPacket.destMAC == "")
|
||||||
{
|
{
|
||||||
nPacket.AddMessage(DebugLevel.debug, " No Machine matching that IP address on this subnet. " + nPacket.destIP.GetIPString);
|
nPacket.AddMessage(DebugLevel.debug, string.Format(" No Machine matching that IP address on this subnet. {0}", nPacket.destIP.GetIPString));
|
||||||
Network mynet = NB.GetNetwork();
|
Network mynet = NB.GetNetwork();
|
||||||
NetworkDevice nd = mynet.GetDeviceFromID(myID);
|
NetworkDevice nd = mynet.GetDeviceFromID(myID);
|
||||||
string hostname = NB.Translate("NC_NoHost");
|
string hostname = NB.Translate("NC_NoHost");
|
||||||
if (nd != null) hostname = nd.hostname;
|
if (nd != null) hostname = nd.hostname;
|
||||||
nPacket.Tracking.Status = hostname + " No Machine matching that IP address on this subnet. " + nPacket.destIP.GetIPString;
|
nPacket.Tracking.Status = hostname + string.Format(" No Machine matching that IP address on this subnet. {0}", nPacket.destIP.GetIPString);
|
||||||
nPacket.MyStatus = PacketStatus.finished_failed;
|
nPacket.MyStatus = PacketStatus.finished_failed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -552,12 +552,12 @@ namespace EduNetworkBuilder
|
|||||||
|
|
||||||
if (nPacket.destMAC == "")
|
if (nPacket.destMAC == "")
|
||||||
{
|
{
|
||||||
nPacket.AddMessage(DebugLevel.debug, " No Machine matching that IP address on this subnet. " + nPacket.destIP.GetIPString);
|
nPacket.AddMessage(DebugLevel.debug, String.Format(" No Machine matching that IP address on this subnet. {0}", nPacket.destIP.GetIPString));
|
||||||
Network mynet = NB.GetNetwork();
|
Network mynet = NB.GetNetwork();
|
||||||
NetworkDevice nd = mynet.GetDeviceFromID(myID);
|
NetworkDevice nd = mynet.GetDeviceFromID(myID);
|
||||||
string hostname = NB.Translate("NC_NoHost");
|
string hostname = NB.Translate("NC_NoHost");
|
||||||
if (nd != null) hostname = nd.hostname;
|
if (nd != null) hostname = nd.hostname;
|
||||||
nPacket.Tracking.Status = hostname + " No Machine matching that IP address on this subnet. " + nPacket.destIP.GetIPString;
|
nPacket.Tracking.Status = hostname + String.Format(" No Machine matching that IP address on this subnet. {0}", nPacket.destIP.GetIPString);
|
||||||
nPacket.MyStatus = PacketStatus.finished_failed;
|
nPacket.MyStatus = PacketStatus.finished_failed;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -646,7 +646,7 @@ namespace EduNetworkBuilder
|
|||||||
IPAddress oAddress = nd.PacketMasqueradeSource(tPacket);
|
IPAddress oAddress = nd.PacketMasqueradeSource(tPacket);
|
||||||
if(oAddress != null)
|
if(oAddress != null)
|
||||||
{
|
{
|
||||||
tPacket.Tracking.AddMessage(DebugLevel.natting, nd.hostname, "MASQ: Changing source IP back to: " + oAddress.GetIPString);
|
tPacket.Tracking.AddMessage(DebugLevel.natting, nd.hostname, string.Format("MASQ: Changing source IP back to: {0}", oAddress.GetIPString));
|
||||||
tPacket.destIP = oAddress;
|
tPacket.destIP = oAddress;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,7 +658,7 @@ namespace EduNetworkBuilder
|
|||||||
nd = mynet.GetDeviceFromID(myID);
|
nd = mynet.GetDeviceFromID(myID);
|
||||||
string hostname = NB.Translate("NC_NoHost");
|
string hostname = NB.Translate("NC_NoHost");
|
||||||
if (nd != null) hostname = nd.hostname;
|
if (nd != null) hostname = nd.hostname;
|
||||||
tPacket.Tracking.Status = hostname + " The packet was rejected by the firewall.. Dropped.";
|
tPacket.Tracking.Status = string.Format("{0} The packet was rejected by the firewall.. Dropped.", hostname) ;
|
||||||
tPacket.MyStatus = PacketStatus.finished_failed;
|
tPacket.MyStatus = PacketStatus.finished_failed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user