public interface DhcpStore
Modifier and Type | Method and Description |
---|---|
Lease |
getExistingLease(HardwareAddress hardwareAddress,
InetAddress requestedAddress,
InetAddress selectionBase,
long requestedLeaseTime,
OptionsField options)
Retrieve an existing lease from the dhcp store.
|
Lease |
getLeaseOffer(HardwareAddress hardwareAddress,
InetAddress requestedAddress,
InetAddress selectionBase,
long requestedLeaseTime,
OptionsField options)
Find a lease to offer in response to a DHCPDISCOVER request.
|
void |
releaseLease(Lease lease)
Release the specified lease.
|
Lease getLeaseOffer(HardwareAddress hardwareAddress, InetAddress requestedAddress, InetAddress selectionBase, long requestedLeaseTime, OptionsField options) throws DhcpException
The lease to offer should be determined by an algorithme like the following:
If the requestedLeaseTime is >= 0, the validity duration of the returned lease must be updated, so that the lease is valid for at least the specified time. The duration may, however, be constrained by a configured maximum lease time.
hardwareAddress
- hardwareAddress the hardware address of the client requesting
the lease.requestedAddress
- the address requested by the client or null
if
the client did not request a specific address.selectionBase
- the address on which to base the selection of a lease from a
pool, i.e. either the address of the interface on which the
request was received or the address of a DHCP relay agent.requestedLeaseTime
- the lease time in milliseconds as requested by the client, or
-1 if the client did not request a specific lease time.options
- the supplied DHCP options. Lease selection may be refined by
using those optionsnull
if no matching lease was found.DhcpException
Lease getExistingLease(HardwareAddress hardwareAddress, InetAddress requestedAddress, InetAddress selectionBase, long requestedLeaseTime, OptionsField options) throws DhcpException
hardwareAddress
- requestedAddress
- selectionBase
- requestedLeaseTime
- options
- DhcpException
void releaseLease(Lease lease)
lease
- Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.