make initial functions for nonvisual packet processing.

This commit is contained in:
Tim Young 2017-08-25 15:05:12 -05:00
parent c3fcecdba0
commit fb1fb82cf4

View File

@ -1870,6 +1870,25 @@ namespace EduNetworkBuilder
return HomeworkSolvedStatus.NeverChecked; //for now. We want to change this later. Just so we keep re-testing return HomeworkSolvedStatus.NeverChecked; //for now. We want to change this later. Just so we keep re-testing
} }
public void NonVisualPingOneHost(string source, string dest)
{
NB.RegisterInvisibleNetwork(this);
NetworkDevice src = GetDeviceFromName(source);
if (src == null) return;
IPAddress destination = DNSLookup(src, dest);
src.PingFromHere(destination);
NonVisualProcessPacketsOnce();
NB.UnregisterInvisibleNetwork();
}
public void NonVisualDoDHCPOnAll()
{
NB.RegisterInvisibleNetwork(this);
DoAllDHCP();
NonVisualProcessPacketsOnce();
NB.UnregisterInvisibleNetwork();
}
public void NonVisualProcessPacketsOnce() public void NonVisualProcessPacketsOnce()
{ {
int counter = 0; int counter = 0;