Property | Type | Description | |
---|---|---|---|
_current_ip | MemBlock | ||
_current_quarter_lifetime | System.DateTime | ||
_dht | IDht | ||
_multicast | bool |
Method | Description | |
---|---|---|
DhtDhcpServer ( IDht dht, |
Creates a DhtDhcpLeaseController for a specific namespace
|
|
GetDhcpConfig ( IDht dht, string ipop_namespace ) : |
||
GetDhtDhcpServer ( IDht dht, string ipop_namespace, bool enable_multicast ) : |
||
RequestLease ( byte RequestedAddr, bool Renew, string node_address ) : byte[] |
This provides a mechanism for a node to get a lease by using the Dht. This uses Dht.Create which provides an atomic operation on the Dht, where this node is the first to store a value at a specific key. The idea being that, this node being the first to store the IP, all nodes doing a lookup for that IP Address would be directed to this node. Working with the Dht is a little tricky as transient errors could be misrepresented as a failed Create. It is that reason why there is a Renew parameter. If that is set, the algorithm for obtaining an address is slightly changed with more weight on reobtaining the RequestedAddr. |
public DhtDhcpServer ( IDht dht, |
||
dht | IDht | The dht object use to store lease information. |
config | The DHCPConfig used to define the Lease parameters. | |
EnableMulticast | bool | Defines if Multicast is to be enabled during the lease. |
return | Brunet |
public static GetDhcpConfig ( IDht dht, string ipop_namespace ) : |
||
dht | IDht | |
ipop_namespace | string | |
return |
public static GetDhtDhcpServer ( IDht dht, string ipop_namespace, bool enable_multicast ) : |
||
dht | IDht | |
ipop_namespace | string | |
enable_multicast | bool | |
return |
public RequestLease ( byte RequestedAddr, bool Renew, string node_address ) : byte[] | ||
RequestedAddr | byte | Optional parameter if the node would like to request a specific address. |
Renew | bool | Is the RequestedAddr a renewal? |
node_address | string | The Brunet.Address where the DhtIpopNode resides |
return | byte[] |
protected DateTime,System _current_quarter_lifetime | ||
return | System.DateTime |