public class StoreBasedDhcpService extends AbstractDhcpService
DhcpStore| Constructor and Description |
|---|
StoreBasedDhcpService(DhcpStore dhcpStore) |
| Modifier and Type | Method and Description |
|---|---|
private Lease |
getExistingLease(java.net.InetSocketAddress clientAddress,
DhcpMessage request)
Try to get an existing lease.
|
private Lease |
getLeaseOffer(java.net.InetSocketAddress clientAddress,
DhcpMessage request)
Determine a lease to offer in response to a DHCPDISCOVER message.
|
protected DhcpMessage |
handleDISCOVER(java.net.InetSocketAddress localAddress,
java.net.InetSocketAddress clientAddress,
DhcpMessage request)
Handle DHCPDISCOVER message.
|
protected DhcpMessage |
handleRELEASE(java.net.InetSocketAddress localAddress,
java.net.InetSocketAddress clientAddress,
DhcpMessage request)
Handle DHCPRELEASE message.
|
protected DhcpMessage |
handleREQUEST(java.net.InetSocketAddress localAddress,
java.net.InetSocketAddress clientAddress,
DhcpMessage request)
Handle DHCPREQUEST message.
|
determineSelectionBase, getReplyFor, handleINFORM, handleOFFER, handleUnknownMessage, initGeneralReply, stripUnwantedOptionsprivate final DhcpStore dhcpStore
public StoreBasedDhcpService(DhcpStore dhcpStore)
private Lease getExistingLease(java.net.InetSocketAddress clientAddress, DhcpMessage request) throws DhcpException
clientAddress - request - DhcpExceptionprivate Lease getLeaseOffer(java.net.InetSocketAddress clientAddress, DhcpMessage request) throws DhcpException
When a server receives a DHCPDISCOVER message from a client, the server chooses a network address for the requesting client. If no address is available, the server may choose to report the problem to the system administrator. If an address is available, the new address SHOULD be chosen as follows:
clientAddress - request - DhcpExceptionprotected DhcpMessage handleRELEASE(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress clientAddress, DhcpMessage request) throws DhcpException
AbstractDhcpServicehandleRELEASE in class AbstractDhcpServicerequest - the request messagenull to ignore (don't reply to)
it.DhcpExceptionprotected DhcpMessage handleDISCOVER(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress clientAddress, DhcpMessage request) throws DhcpException
AbstractDhcpServicehandleDISCOVER in class AbstractDhcpServicerequest - the request messagenull to ignore (don't reply to)
it.DhcpExceptionprotected DhcpMessage handleREQUEST(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress clientAddress, DhcpMessage request) throws DhcpException
AbstractDhcpServicehandleREQUEST in class AbstractDhcpServicerequest - the request messagenull to ignore (don't reply to)
it.DhcpException