| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.store.service.StorageService |
storageService |
| Constructor and Description |
|---|
DistributedDhcpStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate() |
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.
|
protected void |
deactivate() |
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 macID)
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.
|
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Activate protected void activate()
@Deactivate protected void deactivate()
public org.onlab.packet.Ip4Address suggestIP(org.onosproject.net.HostId hostId,
org.onlab.packet.Ip4Address requestedIP)
DhcpStorepublic boolean assignIP(org.onosproject.net.HostId hostId,
IpAssignment ipAssignment)
DhcpStorepublic org.onlab.packet.Ip4Address releaseIP(org.onosproject.net.HostId hostId)
DhcpStorepublic void setDefaultTimeoutForPurge(int timeInSeconds)
DhcpStoresetDefaultTimeoutForPurge in interface DhcpStoretimeInSeconds - default time for IP mappings to be validpublic Map<org.onosproject.net.HostId,IpAssignment> listAssignedMapping()
DhcpStorelistAssignedMapping in interface DhcpStorepublic Map<org.onosproject.net.HostId,IpAssignment> listAllMapping()
DhcpStorelistAllMapping in interface DhcpStorepublic boolean assignStaticIP(org.onlab.packet.MacAddress macAddress,
IpAssignment ipAssignment)
DhcpStoreassignStaticIP in interface DhcpStoremacAddress - mac address of the clientipAssignment - ip address and dhcp options requested for the clientpublic boolean removeStaticIP(org.onlab.packet.MacAddress macID)
DhcpStoreremoveStaticIP in interface DhcpStoremacID - mac address of the clientpublic Iterable<org.onlab.packet.Ip4Address> getAvailableIPs()
DhcpStoregetAvailableIPs in interface DhcpStorepublic void populateIPPoolfromRange(org.onlab.packet.Ip4Address startIP,
org.onlab.packet.Ip4Address endIP)
DhcpStorepopulateIPPoolfromRange in interface DhcpStorestartIP - Start IP for the rangeendIP - End IP for the rangepublic IpAssignment getIpAssignmentFromAllocationMap(org.onosproject.net.HostId hostId)
DhcpStoregetIpAssignmentFromAllocationMap in interface DhcpStorehostId - host identification