public interface DhcpStore
Modifier and Type | Method and Description |
---|---|
boolean |
assignIP(HostId hostId,
IpAssignment ipAssignment)
Assigns the requested IP to the Mac ID, in response to a DHCP REQUEST message.
|
boolean |
assignStaticIP(MacAddress macAddress,
IpAssignment ipAssignment)
Assigns the requested IP to the MAC ID (if available) for an indefinite period of time.
|
java.lang.Iterable<Ip4Address> |
getAvailableIPs()
Returns the list of all the available IPs with the server.
|
IpAssignment |
getIpAssignmentFromAllocationMap(HostId hostId)
Returns IpAssignment from map.
|
java.util.Map<HostId,IpAssignment> |
listAllMapping()
Returns a collection of all the MacAddress to IPAddress mapping.
|
java.util.Map<HostId,IpAssignment> |
listAssignedMapping()
Returns a collection of all the MacAddress to IPAddress mapping assigned to the hosts.
|
void |
populateIPPoolfromRange(Ip4Address startIP,
Ip4Address endIP)
Appends all the IPs in a given range to the free pool of IPs.
|
Ip4Address |
releaseIP(HostId hostId)
Releases the IP assigned to a Mac ID into the free pool.
|
boolean |
removeStaticIP(MacAddress macAddress)
Removes a static IP mapping associated with the given MAC ID from the DHCP Server.
|
void |
setDefaultTimeoutForPurge(int timeInSeconds)
Sets the default time for which suggested IP mappings are valid.
|
Ip4Address |
suggestIP(HostId hostId,
Ip4Address requestedIP)
Returns an IP Address for a Mac ID, in response to a DHCP DISCOVER message.
|
void populateIPPoolfromRange(Ip4Address startIP, Ip4Address endIP)
startIP
- Start IP for the rangeendIP
- End IP for the rangeIp4Address suggestIP(HostId hostId, Ip4Address requestedIP)
hostId
- Host ID of the client requesting an IPrequestedIP
- requested IP addressboolean assignIP(HostId hostId, IpAssignment ipAssignment)
hostId
- Host Id of the client requesting an IPipAssignment
- ip assignmentvoid setDefaultTimeoutForPurge(int timeInSeconds)
timeInSeconds
- default time for IP mappings to be validIp4Address releaseIP(HostId hostId)
hostId
- the host ID for which the mapping needs to be changedjava.util.Map<HostId,IpAssignment> listAssignedMapping()
java.util.Map<HostId,IpAssignment> listAllMapping()
boolean assignStaticIP(MacAddress macAddress, IpAssignment ipAssignment)
macAddress
- mac address of the clientipAssignment
- ip address and dhcp options requested for the clientboolean removeStaticIP(MacAddress macAddress)
macAddress
- mac address of the clientjava.lang.Iterable<Ip4Address> getAvailableIPs()
IpAssignment getIpAssignmentFromAllocationMap(HostId hostId)
hostId
- host identification