|
join 1.0
lightweight network framework library
|
a DHCP server handing out addresses from a pool. More...


Public Member Functions | |
| Server (const std::string &device, const IpAddress &first, uint32_t count, const DhcpOption &options) | |
| create the server instance. | |
Protected Member Functions | |
| void | onDiscover (const DhcpPacket &request) override |
| offer an address to a client asking for one. | |
| void | onRequest (const DhcpPacket &request) override |
| acknowledge the address a client asks to keep. | |
| void | onRelease (const DhcpPacket &request) override |
| give the address of a client back to the pool. | |
| void | onDecline (const DhcpPacket &request) override |
| drop an address a client reported as already in use. | |
| void | onInform (const DhcpPacket &request) override |
| answer a client asking only for the parameters. | |
| IpAddress | allocate (const DhcpPacket &request) |
| pick an address for the given client. | |
Protected Attributes | |
| const uint32_t | _first |
| first address of the pool, in host order. | |
| const uint32_t | _count |
| number of addresses in the pool. | |
| const DhcpOption | _options |
| options advertised to the clients. | |
| std::map< MacAddress, IpAddress > | _leases |
| addresses handed out, indexed by client hardware address. | |
a DHCP server handing out addresses from a pool.
|
inline |
create the server instance.
| device | interface to serve. |
| first | first address of the pool. |
| count | number of addresses in the pool. |
| options | options to advertise to the clients. |
|
inlineprotected |
pick an address for the given client.
| request | message received. |
|
inlineoverrideprotected |
drop an address a client reported as already in use.
| request | message received. |
|
inlineoverrideprotected |
offer an address to a client asking for one.
| request | message received. |
|
inlineoverrideprotected |
answer a client asking only for the parameters.
| request | message received. |
|
inlineoverrideprotected |
give the address of a client back to the pool.
| request | message received. |
|
inlineoverrideprotected |
acknowledge the address a client asks to keep.
| request | message received. |
|
protected |
number of addresses in the pool.
|
protected |
first address of the pool, in host order.
|
protected |
addresses handed out, indexed by client hardware address.
|
protected |
options advertised to the clients.