public interface DhcpStore
| Modifier and Type | Method and Description |
|---|---|
boolean |
assignIP(org.onosproject.net.HostId hostId,
IpAssignment ipAssignment)
Assigns the requested IP to the Mac ID, in response to a DHCP REQUEST message.
|
boolean |
assignStaticIP(org.onlab.packet.MacAddress macAddress,
IpAssignment ipAssignment)
Assigns the requested IP to the MAC ID (if available) for an indefinite period of time.
|
Iterable<org.onlab.packet.Ip4Address> |
getAvailableIPs()
Returns the list of all the available IPs with the server.
|
IpAssignment |
getIpAssignmentFromAllocationMap(org.onosproject.net.HostId hostId)
Returns IpAssignment from map.
|
Map<org.onosproject.net.HostId,IpAssignment> |
listAllMapping()
Returns a collection of all the MacAddress to IPAddress mapping.
|
Map<org.onosproject.net.HostId,IpAssignment> |
listAssignedMapping()
Returns a collection of all the MacAddress to IPAddress mapping assigned to the hosts.
|
void |
populateIPPoolfromRange(org.onlab.packet.Ip4Address startIP,
org.onlab.packet.Ip4Address endIP)
Appends all the IPs in a given range to the free pool of IPs.
|
org.onlab.packet.Ip4Address |
releaseIP(org.onosproject.net.HostId hostId)
Releases the IP assigned to a Mac ID into the free pool.
|
boolean |
removeStaticIP(org.onlab.packet.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.
|
org.onlab.packet.Ip4Address |
suggestIP(org.onosproject.net.HostId hostId,
org.onlab.packet.Ip4Address requestedIP)
Returns an IP Address for a Mac ID, in response to a DHCP DISCOVER message.
|
void populateIPPoolfromRange(org.onlab.packet.Ip4Address startIP,
org.onlab.packet.Ip4Address endIP)
startIP - Start IP for the rangeendIP - End IP for the rangeorg.onlab.packet.Ip4Address suggestIP(org.onosproject.net.HostId hostId,
org.onlab.packet.Ip4Address requestedIP)
hostId - Host ID of the client requesting an IPrequestedIP - requested IP addressboolean assignIP(org.onosproject.net.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 validorg.onlab.packet.Ip4Address releaseIP(org.onosproject.net.HostId hostId)
hostId - the host ID for which the mapping needs to be changedMap<org.onosproject.net.HostId,IpAssignment> listAssignedMapping()
Map<org.onosproject.net.HostId,IpAssignment> listAllMapping()
boolean assignStaticIP(org.onlab.packet.MacAddress macAddress,
IpAssignment ipAssignment)
macAddress - mac address of the clientipAssignment - ip address and dhcp options requested for the clientboolean removeStaticIP(org.onlab.packet.MacAddress macAddress)
macAddress - mac address of the clientIterable<org.onlab.packet.Ip4Address> getAvailableIPs()
IpAssignment getIpAssignmentFromAllocationMap(org.onosproject.net.HostId hostId)
hostId - host identification