DHCP as action
This commit is contained in:
parent
3ba3023ef0
commit
bc1c994bbd
@ -225,18 +225,24 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
break;
|
||||
case NBAction.dhcp:
|
||||
if(source != null)
|
||||
source.DHCPRequestFromHere();
|
||||
break;
|
||||
case NBAction.arp:
|
||||
source.AskArpFromHere(Destination);
|
||||
if (source != null)
|
||||
source.AskArpFromHere(Destination);
|
||||
break;
|
||||
case NBAction.cleararp:
|
||||
source.ClearArps();
|
||||
if (source != null)
|
||||
source.ClearArps();
|
||||
break;
|
||||
case NBAction.ping:
|
||||
source.PingFromHere(Destination) ;
|
||||
case NBAction.ping:
|
||||
if (source != null)
|
||||
source.PingFromHere(Destination) ;
|
||||
break;
|
||||
case NBAction.traceroute:
|
||||
source.TracerouteFromHere(Destination);
|
||||
if (source != null)
|
||||
source.TracerouteFromHere(Destination);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1435,6 +1435,17 @@ namespace EduNetworkBuilder
|
||||
|
||||
AC.DoAction();
|
||||
|
||||
}
|
||||
public static void DoActionDHCP(int HostID)
|
||||
{
|
||||
ActionClass AC = new ActionClass();
|
||||
AC.Action = NBAction.dhcp;
|
||||
AC.SourceID = HostID;
|
||||
|
||||
RegisterAction(AC);
|
||||
|
||||
AC.DoAction();
|
||||
|
||||
}
|
||||
public static void DoActionArpDevice(int HostID, NB_IPAddress Destination)
|
||||
{
|
||||
|
@ -1329,7 +1329,8 @@ namespace EduNetworkBuilder
|
||||
|
||||
private void pbNetworkView_DHCPRequest_Click(object sender, EventArgs e)
|
||||
{
|
||||
ItemClickedOn.DHCPRequestFromHere();
|
||||
//ItemClickedOn.DHCPRequestFromHere();
|
||||
NB.DoActionDHCP(ItemClickedOn.GetUniqueIdentifier);
|
||||
myNetwork.ProcessPackets();
|
||||
UpdateMessages();
|
||||
pbNetworkView.Update();
|
||||
|
Loading…
Reference in New Issue
Block a user