aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java')
-rw-r--r--framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java b/framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java
index 4e2d67d6..c9fade9e 100644
--- a/framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java
+++ b/framework/src/onos/apps/dhcp/src/main/java/org/onosproject/dhcp/DhcpStore.java
@@ -17,6 +17,7 @@ package org.onosproject.dhcp;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.MacAddress;
+import org.onosproject.net.HostId;
import java.util.Map;
@@ -36,21 +37,21 @@ public interface DhcpStore {
/**
* Returns an IP Address for a Mac ID, in response to a DHCP DISCOVER message.
*
- * @param macID Mac ID of the client requesting an IP
+ * @param hostId Host ID of the client requesting an IP
* @param requestedIP requested IP address
* @return IP address assigned to the Mac ID
*/
- Ip4Address suggestIP(MacAddress macID, Ip4Address requestedIP);
+ Ip4Address suggestIP(HostId hostId, Ip4Address requestedIP);
/**
* Assigns the requested IP to the Mac ID, in response to a DHCP REQUEST message.
*
- * @param macID Mac Id of the client requesting an IP
+ * @param hostId Host Id of the client requesting an IP
* @param ipAddr IP Address being requested
* @param leaseTime Lease time offered by the server for this mapping
* @return returns true if the assignment was successful, false otherwise
*/
- boolean assignIP(MacAddress macID, Ip4Address ipAddr, int leaseTime);
+ boolean assignIP(HostId hostId, Ip4Address ipAddr, int leaseTime);
/**
* Sets the default time for which suggested IP mappings are valid.
@@ -60,25 +61,25 @@ public interface DhcpStore {
void setDefaultTimeoutForPurge(int timeInSeconds);
/**
- * Sets the delay after which the dhcp server will purge expired entries.
+ * Releases the IP assigned to a Mac ID into the free pool.
*
- * @param timeInSeconds default time
+ * @param hostId the host ID for which the mapping needs to be changed
*/
- void setTimerDelay(int timeInSeconds);
+ void releaseIP(HostId hostId);
/**
- * Releases the IP assigned to a Mac ID into the free pool.
+ * Returns a collection of all the MacAddress to IPAddress mapping assigned to the hosts.
*
- * @param macID the macID for which the mapping needs to be changed
+ * @return the collection of the mappings
*/
- void releaseIP(MacAddress macID);
+ Map<HostId, IpAssignment> listAssignedMapping();
/**
* Returns a collection of all the MacAddress to IPAddress mapping.
*
* @return the collection of the mappings
*/
- Map<MacAddress, IpAssignment> listMapping();
+ Map<HostId, IpAssignment> listAllMapping();
/**
* Assigns the requested IP to the MAC ID (if available) for an indefinite period of time.