Kea 3.1.1
isc::lease_query::LeaseQueryImpl Class Referenceabstract

Provides configuration and control flow for processing queries. More...

#include <lease_query_impl.h>

+ Inheritance diagram for isc::lease_query::LeaseQueryImpl:

Public Member Functions

 LeaseQueryImpl (uint16_t family, const isc::data::ConstElementPtr config)
 Constructor.
 
virtual ~LeaseQueryImpl ()
 Destructor.
 
uint16_t getFamily ()
 Returns the protocol family of the impl.
 
isc::asiolink::IOServicePtr getIOService ()
 Get the hook I/O service.
 
size_t getNumRequesters () const
 Returns the number of valid requester.
 
bool isRequester (const isc::asiolink::IOAddress &address) const
 Checks if the given address belongs to a valid requester.
 
virtual void processQuery (isc::dhcp::PktPtr base_query) const =0
 Processes a single client Lease Query.
 
void setIOService (isc::asiolink::IOServicePtr io_service)
 Set the hook I/O service.
 

Static Public Attributes

static const isc::data::SimpleKeywords LEASE_QUERY_KEYWORDS
 Keywords for Lease Query configuration.
 
static size_t PageSize = 100
 Page size to commands.
 
static bool terminated_ = false
 Terminated flag.
 

Detailed Description

Provides configuration and control flow for processing queries.

Definition at line 81 of file lease_query_impl.h.

Constructor & Destructor Documentation

◆ LeaseQueryImpl()

LeaseQueryImpl::LeaseQueryImpl ( uint16_t family,
const isc::data::ConstElementPtr config )

Constructor.

Parameters
familyprotocol family we're handling (AF_INET or AF_INET6)
configinput configuration

Definition at line 49 of file lease_query_impl.cc.

References if(), isc_throw, Element::list, and Element::map.

Referenced by isc::lease_query::LeaseQueryImpl4::LeaseQueryImpl4(), and isc::lease_query::LeaseQueryImpl6::LeaseQueryImpl6().

+ Here is the call graph for this function:

◆ ~LeaseQueryImpl()

LeaseQueryImpl::~LeaseQueryImpl ( )
virtual

Destructor.

Definition at line 84 of file lease_query_impl.cc.

Member Function Documentation

◆ getFamily()

uint16_t isc::lease_query::LeaseQueryImpl::getFamily ( )
inline

Returns the protocol family of the impl.

Definition at line 120 of file lease_query_impl.h.

◆ getIOService()

isc::asiolink::IOServicePtr isc::lease_query::LeaseQueryImpl::getIOService ( )
inline

Get the hook I/O service.

Returns
the hook I/O service.

Definition at line 127 of file lease_query_impl.h.

Referenced by dhcp4_srv_configured(), and dhcp6_srv_configured().

◆ getNumRequesters()

size_t isc::lease_query::LeaseQueryImpl::getNumRequesters ( ) const
inline

Returns the number of valid requester.

Definition at line 100 of file lease_query_impl.h.

◆ isRequester()

bool LeaseQueryImpl::isRequester ( const isc::asiolink::IOAddress & address) const

Checks if the given address belongs to a valid requester.

Parameters
addressaddress to verify
Returns
true if the address is in the list of requesters, false otherwise.

Definition at line 89 of file lease_query_impl.cc.

Referenced by isc::lease_query::LeaseQueryImpl4::processQuery(), and isc::lease_query::LeaseQueryImpl6::processQuery().

◆ processQuery()

virtual void isc::lease_query::LeaseQueryImpl::processQuery ( isc::dhcp::PktPtr base_query) const
pure virtual

Processes a single client Lease Query.

  • Validates query content
  • Determines is the query is permitted
  • Queries matching lease(s)
  • Constructs the reply
  • Sends the reply
Parameters
base_querylease query to process. (Implementations must use dynamic_casting).

Implemented in isc::lease_query::LeaseQueryImpl4, and isc::lease_query::LeaseQueryImpl6.

Referenced by buffer4_receive(), and buffer6_receive().

◆ setIOService()

void isc::lease_query::LeaseQueryImpl::setIOService ( isc::asiolink::IOServicePtr io_service)
inline

Set the hook I/O service.

Parameters
io_servicethe hook I/O service.

Definition at line 134 of file lease_query_impl.h.

Member Data Documentation

◆ LEASE_QUERY_KEYWORDS

const SimpleKeywords LeaseQueryImpl::LEASE_QUERY_KEYWORDS
static
Initial value:
=
{
{ "requesters", Element::list },
{ "advanced", Element::map },
{ "comment", Element::string },
{ "prefix-lengths", Element::list },
}
@ map
Definition data.h:147
@ list
Definition data.h:146
@ string
Definition data.h:144

Keywords for Lease Query configuration.

Definition at line 117 of file lease_query_impl.h.

◆ PageSize

◆ terminated_

bool LeaseQueryImpl::terminated_ = false
static

Terminated flag.

Definition at line 139 of file lease_query_impl.h.

Referenced by isc::lease_query::BulkLeaseQueryService::acceptFilter(), load(), and unload().


The documentation for this class was generated from the following files: