internal DhcpClientStateBound(DhcpClient client, IPv4 serverAddress, IPv4 hostAddress, SortedList hostOptions) : base(client, "Bound") { this.serverAddress = serverAddress; this.hostAddress = hostAddress; this.hostOptions = hostOptions; }
internal DhcpClientStateRequesting(DhcpClient client, IPv4 serverAddress, IPv4 offeredAddress, SortedList offeredOptions) : base(client, "Requesting") { this.serverAddress = serverAddress; this.offeredAddress = offeredAddress; this.offeredOptions = offeredOptions; }
public bool StopDhcp(IAdapter adapter) { using (dhcpClientsLock.Lock()) { for (int i = 0; i < dhcpClients.Count; i++) { DhcpClient client = (DhcpClient)dhcpClients[i]; if (client.Adapter == adapter) { client.Stop(); dhcpClients.RemoveAt(i); return(true); } } } return(false); }
public bool StartDhcp(IAdapter adapter) { using (dhcpClientsLock.Lock()) { foreach (DhcpClient client in dhcpClients) { if (client.Adapter == adapter) { return(false); } } DhcpClient dc = new DhcpClient(adapter); dc.Start(); dhcpClients.Add(dc); } return(true); }
internal DhcpClientStateInitialize(DhcpClient client) : base(client, "Initialize") { }
internal DhcpClientStateRebinding(DhcpClient client) : base(client, "Rebinding") { }
internal DhcpClientStateRenewing(DhcpClient client, SortedList hostOptions) : base(client, "Renewing") { this.hostOptions = hostOptions; }
internal DhcpClientState(DhcpClient client, string stateName) { this.client = client; this.stateName = stateName; }
internal DhcpClientStateSelecting(DhcpClient client) : base(client, "Selecting") { }