Interface DhcpService


  • public interface DhcpService
    DHCP Service Interface.
    • Method Detail

      • listMapping

        java.util.Map<HostId,​IpAssignment> listMapping()
        Returns a collection of all the MacAddress to IPAddress mapping.
        Returns:
        collection of mappings.
      • getLeaseTime

        int getLeaseTime()
        Returns the default lease time granted by the DHCP Server.
        Returns:
        lease time
      • getRenewalTime

        int getRenewalTime()
        Returns the default renewal time granted by the DHCP Server.
        Returns:
        renewal time
      • getRebindingTime

        int getRebindingTime()
        Returns the default rebinding time granted by the DHCP Server.
        Returns:
        rebinding time
      • setStaticMapping

        boolean setStaticMapping​(MacAddress macAddress,
                                 IpAssignment ipRequest)
        Registers a static IP mapping with the DHCP Server.
        Parameters:
        macAddress - mac address to have a given ip assignment
        ipRequest - ip address and dhcp options
        Returns:
        true if the mapping was successfully added, false otherwise
      • removeStaticMapping

        boolean removeStaticMapping​(MacAddress macID)
        Removes a static IP mapping with the DHCP Server.
        Parameters:
        macID - macID of the client
        Returns:
        true if the mapping was successfully removed, false otherwise
      • getAvailableIPs

        java.lang.Iterable<Ip4Address> getAvailableIPs()
        Returns the list of all the available IPs with the server.
        Returns:
        list of available IPs