|
SatCat5
|
The simplest possible implementation of DhcpPool, supporting a contiguous range of IP-addresses from BASE to BASE+SIZE-1.
#include <ip_dhcp.h>
Public Member Functions | |
| DhcpPoolStatic (const satcat5::ip::Addr &base) | |
| unsigned | addr2idx (const satcat5::ip::Addr &addr) const override |
| Find index associated with the given IP address. More... | |
| satcat5::ip::Addr | idx2addr (unsigned idx) const override |
| Fetch IP-address for Nth object in the pool. More... | |
| satcat5::ip::DhcpAddress * | idx2meta (unsigned idx) override |
| Fetch metadata for Nth object in the pool.or Returns NULL if the index is out of bounds. More... | |
| bool | contains (const satcat5::ip::Addr &addr) |
| Does this pool contain the designated address? | |
| satcat5::ip::DhcpAddress * | addr2meta (const satcat5::ip::Addr &addr) |
| Two-step lookup of metadata from address. | |
Private Attributes | |
| const satcat5::ip::Addr | m_base |
| satcat5::ip::DhcpAddress | m_array [SIZE] |
|
inlineoverridevirtual |
Find index associated with the given IP address.
If none is found, return any out-of-bounds index. Child classes MUST override this method.
Implements satcat5::ip::DhcpPool.
|
inlineoverridevirtual |
Fetch IP-address for Nth object in the pool.
Returns ip::ADDR_NONE if the index is out of bounds. Child classes MUST override this method.
Implements satcat5::ip::DhcpPool.
|
inlineoverridevirtual |
Fetch metadata for Nth object in the pool.or Returns NULL if the index is out of bounds.
Child classes MUST override this method.
Implements satcat5::ip::DhcpPool.