34 const size_t )
const {
103 const uint8_t* identifier_begin,
104 const size_t identifier_len)
const {
105 return (
impl_->get4(subnet_id, identifier_type, identifier_begin,
124 const uint8_t* identifier_begin,
125 const size_t identifier_len)
const {
126 return (
impl_->get6(subnet_id, identifier_type, identifier_begin,
132 const uint8_t )
const {
190 return (
impl_->xcount4_);
195 return (
impl_->xcount6_);
207 const uint8_t* identifier_begin,
208 const size_t identifier_len) {
223 .arg(
dumpAsHex(identifier_begin, identifier_len))
231 const uint8_t* identifier_begin,
232 const size_t identifier_len) {
247 .arg(
dumpAsHex(identifier_begin, identifier_len))
The IOAddress class represents an IP addresses (version agnostic).
Wraps value holding size of the page with host reservations.
static std::string getIdentifierName(const IdentifierType &type)
Returns name of the identifier of a specified type.
IdentifierType
Type of the host identifier.
static bool check()
Check if the current thread is in hook code or not.
Implementation of host backend for Radius.
size_t xcount4_
Unexpected call counter - IPv4.
size_t xcount6_
Unexpected call counter - IPv6.
isc::dhcp::ConstHostPtr get6(const isc::dhcp::SubnetID &subnet_id, const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Returns a host connected to the IPv6 subnet.
isc::dhcp::ConstHostPtr get4(const isc::dhcp::SubnetID &subnet_id, const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len)
Host backend method in not const variant.
virtual ~RadiusBackendImpl()
Destructor.
RadiusBackendImpl()
Constructor.
virtual ~RadiusBackend()
Destructor.
virtual isc::dhcp::ConstHostCollection getAllbyHostname4(const std::string &hostname, const isc::dhcp::SubnetID &subnet_id) const override
Return all hosts with a hostname in a DHCPv4 subnet.
virtual isc::dhcp::ConstHostCollection getAllbyHostname6(const std::string &hostname, const isc::dhcp::SubnetID &subnet_id) const override
Return all hosts with a hostname in a DHCPv6 subnet.
virtual isc::dhcp::ConstHostCollection getAllbyHostname(const std::string &hostname) const override
Return all hosts with a hostname.
virtual isc::dhcp::ConstHostCollection getPage6(const isc::dhcp::SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const dhcp::HostPageSize &page_size) const override
Return range of hosts in a specified DHCPv6 subnet.
RadiusBackend()
Constructor.
boost::shared_ptr< RadiusBackendImpl > impl_
Implementation.
virtual void add(const isc::dhcp::HostPtr &host) override
Adds a new host to the collection.
virtual bool del6(const isc::dhcp::SubnetID &subnet_id, const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) override
Attempts to delete a host by (subnet-id6, identifier, identifier-type).
virtual isc::dhcp::ConstHostCollection getAll6(const isc::dhcp::SubnetID &subnet_id) const override
Return all hosts in a specified DHCPv6 subnet.
virtual isc::dhcp::ConstHostCollection getAll(const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const override
From base class.
virtual isc::dhcp::ConstHostPtr get4(const isc::dhcp::SubnetID &subnet_id, const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const override
Returns a host connected to the IPv4 subnet.
size_t getUnexpected4() const
Return unexpected calls for IPv4.
virtual bool del4(const isc::dhcp::SubnetID &subnet_id, const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) override
Attempts to delete a host by (subnet-id4, identifier, identifier-type).
virtual bool setIPReservationsUnique(const bool unique) override
Controls whether IP reservations are unique or non-unique.
virtual bool del(const isc::dhcp::SubnetID &subnet_id, const isc::asiolink::IOAddress &addr) override
Attempts to delete a host by (subnet-id, address).
virtual isc::dhcp::ConstHostPtr get6(const isc::dhcp::SubnetID &subnet_id, const isc::dhcp::Host::IdentifierType &identifier_type, const uint8_t *identifier_begin, const size_t identifier_len) const override
Returns a host connected to the IPv6 subnet.
virtual isc::dhcp::ConstHostCollection getAll4(const isc::dhcp::SubnetID &subnet_id) const override
Return all hosts in a specified DHCPv4 subnet.
virtual isc::dhcp::ConstHostCollection getPage4(const isc::dhcp::SubnetID &subnet_id, size_t &source_index, uint64_t lower_host_id, const dhcp::HostPageSize &page_size) const override
Return range of hosts in a specified DHCPv4 subnet.
size_t getUnexpected6() const
Return unexpected calls for IPv6.
static RadiusImpl & instance()
RadiusImpl is a singleton class.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
std::vector< ConstHostPtr > ConstHostCollection
Collection of the const Host objects.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
boost::shared_ptr< const Host > ConstHostPtr
Const pointer to the Host object.
const int RADIUS_DBG_TRACE
Radius logging levels.
const isc::log::MessageID RADIUS_BACKEND_GET6
isc::log::Logger radius_logger("radius-hooks")
Radius Logger.
const isc::log::MessageID RADIUS_BACKEND_GET4
string dumpAsHex(const uint8_t *data, size_t length)
Dumps a buffer of bytes as a string of hexadecimal digits.
Defines the logger used by the top-level component of kea-lfc.