|
SatCat5
|
Generic container for a group of DhcpAddress objects.
Most users should use DhcpPoolStatic, but more complex use cases such as non-contiguous ranges may need a custom implementation.
#include <ip_dhcp.h>
Public Member Functions | |
| virtual unsigned | addr2idx (const satcat5::ip::Addr &addr) const =0 |
| Find index associated with the given IP address. More... | |
| virtual satcat5::ip::Addr | idx2addr (unsigned idx) const =0 |
| Fetch IP-address for Nth object in the pool. More... | |
| virtual satcat5::ip::DhcpAddress * | idx2meta (unsigned idx)=0 |
| 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. | |
|
pure virtual |
Find index associated with the given IP address.
If none is found, return any out-of-bounds index. Child classes MUST override this method.
Implemented in satcat5::ip::DhcpPoolStatic< SIZE >.
|
pure virtual |
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.
Implemented in satcat5::ip::DhcpPoolStatic< SIZE >.
|
pure virtual |
Fetch metadata for Nth object in the pool.or Returns NULL if the index is out of bounds.
Child classes MUST override this method.
Implemented in satcat5::ip::DhcpPoolStatic< SIZE >.