@Service public class DhcpManager extends Object implements DhcpService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.net.config.NetworkConfigRegistry |
cfgService |
protected org.onosproject.cfg.ComponentConfigService |
componentConfigService |
protected org.onosproject.core.CoreService |
coreService |
protected DhcpStore |
dhcpStore |
protected org.onosproject.net.host.HostProviderRegistry |
hostProviderRegistry |
protected org.onosproject.net.host.HostProviderService |
hostProviderService |
protected org.onosproject.net.packet.PacketService |
packetService |
protected org.jboss.netty.util.Timeout |
timeout |
protected static int |
timerDelay |
| Constructor and Description |
|---|
DhcpManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate() |
protected void |
deactivate() |
Iterable<org.onlab.packet.Ip4Address> |
getAvailableIPs()
Returns the list of all the available IPs with the server.
|
int |
getLeaseTime()
Returns the default lease time granted by the DHCP Server.
|
int |
getRebindingTime()
Returns the default rebinding time granted by the DHCP Server.
|
int |
getRenewalTime()
Returns the default renewal time granted by the DHCP Server.
|
Map<org.onosproject.net.HostId,IpAssignment> |
listMapping()
Returns a collection of all the MacAddress to IPAddress mapping.
|
protected void |
modified(org.osgi.service.component.ComponentContext context) |
boolean |
removeStaticMapping(org.onlab.packet.MacAddress macID)
Removes a static IP mapping with the DHCP Server.
|
boolean |
setStaticMapping(org.onlab.packet.MacAddress macAddress,
IpAssignment ipAssignment)
Registers a static IP mapping with the DHCP Server.
|
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.config.NetworkConfigRegistry cfgService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.packet.PacketService packetService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
@Reference(cardinality=MANDATORY_UNARY) protected DhcpStore dhcpStore
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.net.host.HostProviderRegistry hostProviderRegistry
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cfg.ComponentConfigService componentConfigService
protected org.onosproject.net.host.HostProviderService hostProviderService
protected org.jboss.netty.util.Timeout timeout
protected static int timerDelay
@Activate protected void activate()
@Deactivate protected void deactivate()
@Modified protected void modified(org.osgi.service.component.ComponentContext context)
public Map<org.onosproject.net.HostId,IpAssignment> listMapping()
DhcpServicelistMapping in interface DhcpServicepublic int getLeaseTime()
DhcpServicegetLeaseTime in interface DhcpServicepublic int getRenewalTime()
DhcpServicegetRenewalTime in interface DhcpServicepublic int getRebindingTime()
DhcpServicegetRebindingTime in interface DhcpServicepublic boolean setStaticMapping(org.onlab.packet.MacAddress macAddress,
IpAssignment ipAssignment)
DhcpServicesetStaticMapping in interface DhcpServicemacAddress - mac address to have a given ip assignmentipAssignment - ip address and dhcp optionspublic boolean removeStaticMapping(org.onlab.packet.MacAddress macID)
DhcpServiceremoveStaticMapping in interface DhcpServicemacID - macID of the clientpublic Iterable<org.onlab.packet.Ip4Address> getAvailableIPs()
DhcpServicegetAvailableIPs in interface DhcpService