Kea 3.1.1
isc::lease_query::BulkLeaseQuery6 Class Reference

Provides control flow for processing a bulk query. More...

#include <bulk_lease_query6.h>

+ Inheritance diagram for isc::lease_query::BulkLeaseQuery6:

Public Member Functions

 BulkLeaseQuery6 (BlqQueryPtr query, const BlqPostCb &post, const BlqPushToSendCb &push_to_send, const BlqQueryCompleteCb &query_complete)
 Constructor.
 
virtual ~BulkLeaseQuery6 ()
 Destructor.
 
const asiolink::IOAddressgetLinkAddress () const
 Get the link address.
 
size_t getPageSize () const
 Get the page size.
 
dhcp::Pkt6Ptr getQuery6 () const
 Get the DHCPv6 query.
 
asiolink::IOAddress getStartAddress () const
 Get the current start address.
 
virtual void init ()
 Initialization.
 
const dhcp::SubnetIDSetlinks () const
 Get the links set.
 
virtual void start ()
 Start processing.
 
- Public Member Functions inherited from isc::lease_query::BulkLeaseQuery
 BulkLeaseQuery (BlqQueryPtr query, const BlqPostCb &post, const BlqPushToSendCb &push_to_send, const BlqQueryCompleteCb &query_complete)
 Constructor.
 
virtual ~BulkLeaseQuery ()
 Destructor.
 
BlqQueryPtr getQuery ()
 Get the query.
 
uint8_t getQueryType () const
 Get the query type.
 
Xid getXid () const
 Get the transaction id of the query.
 
bool isProcessed () const
 Processing finished predicate.
 
bool isProcessing () const
 Processing in progress predicate.
 

Static Public Member Functions

static std::string leaseQueryLabel (const BlqMsgPtr &msg)
 Convenience method for generating per packet logging info.
 
- Static Public Member Functions inherited from isc::lease_query::BulkLeaseQuery
static void processStart (BulkLeaseQueryPtr ptr)
 Class/static start processing.
 

Protected Member Functions

void bulkQueryByClientId ()
 Start processing of a by client id bulk query.
 
void bulkQueryByIpAddress ()
 Start processing of a by ip address bulk query.
 
void bulkQueryByLinkAddress ()
 Start processing of a by link address bulk query.
 
void bulkQueryByLinkAddressNext ()
 Subsequent processing of a by link address bulk query.
 
void bulkQueryByRelayId ()
 Start processing of a by relay id bulk query.
 
void bulkQueryByRelayIdNext ()
 Subsequent processing of a by relay id bulk query.
 
void bulkQueryByRemoteId ()
 Start processing of a by remote id bulk query.
 
void bulkQueryByRemoteIdNext ()
 Subsequent processing of a by remote id bulk query.
 
dhcp::OptionCustomPtr getLeaseQueryOption () const
 Get the lease query option.
 
dhcp::DuidPtr getQueryClientId () const
 Get the query client id for a by client id bulk query.
 
dhcp::Option6IAAddrPtr getQueryIpAddress () const
 Get the query ip address for a by ip address bulk query.
 
dhcp::DuidPtr getQueryRelayId () const
 Get the query relay id for a by relay id bulk query.
 
dhcp::OptionPtr getQueryRemoteId () const
 Get the query remote id for a by remote id bulk query.
 
virtual void send (dhcp::Pkt6Ptr response) const
 Send a response.
 
virtual void sendReply (dhcp::OptionPtr status)
 Send a final reply.
 
- Protected Member Functions inherited from isc::lease_query::BulkLeaseQuery
virtual void setDone ()
 Set the done flag.
 

Static Protected Member Functions

static void doBulkQueryByLinkAddressNext (BulkLeaseQuery6Ptr ptr)
 Class/static subsequent processing of a by link address bulk query.
 
static void doBulkQueryByRelayIdNext (BulkLeaseQuery6Ptr ptr)
 Class/static subsequent processing of a by relay id bulk query.
 
static void doBulkQueryByRemoteIdNext (BulkLeaseQuery6Ptr ptr)
 Class/static subsequent processing of a by remote id bulk query.
 

Protected Attributes

asiolink::IOAddress link_addr_
 The link address.
 
dhcp::SubnetIDSet links_
 The links the link address (when not ::) belongs to.
 
dhcp::OptionCustomPtr lq_option_
 The lease query option.
 
size_t page_size_
 The page size (for paged processing, taken from the MT Lease query manager or defaults to 10).
 
dhcp::Pkt6Ptr query6_
 The DHCPv6 query.
 
dhcp::DuidPtr query_client_id_
 The query client id (for a by client id bulk query).
 
dhcp::Option6IAAddrPtr query_iaaddr_
 The query ip address (for a by ip address bulk query).
 
dhcp::DuidPtr query_relay_id_
 The query relay id (for a by relay id bulk query).
 
dhcp::OptionPtr query_remote_id_
 The remote id (for a by remote id bulk query).
 
asiolink::IOAddress start_addr_
 The start address (for paged processing).
 
- Protected Attributes inherited from isc::lease_query::BulkLeaseQuery
bool done_
 The processing finished.
 
BlqPostCb post_
 The post callback.
 
BlqPushToSendCb push_to_send_
 The pushToSend callback.
 
BlqQueryPtr query_
 The query.
 
BlqQueryCompleteCb query_complete_
 The queryComplete callback.
 
uint8_t query_type_
 The query type.
 
bool started_
 The processing is in progress.
 

Detailed Description

Provides control flow for processing a bulk query.

Definition at line 28 of file bulk_lease_query6.h.

Constructor & Destructor Documentation

◆ BulkLeaseQuery6()

isc::lease_query::BulkLeaseQuery6::BulkLeaseQuery6 ( BlqQueryPtr query,
const BlqPostCb & post,
const BlqPushToSendCb & push_to_send,
const BlqQueryCompleteCb & query_complete )
inline

Constructor.

Parameters
queryThe query.
postThe post callback.
push_to_sendThe pushToSend callback.
query_completeThe queryComplete callback.
Exceptions
BadValueif the query is invalid for a number reasons.

Definition at line 38 of file bulk_lease_query6.h.

References isc::lease_query::BulkLeaseQuery::BulkLeaseQuery(), init(), link_addr_, links_, lq_option_, page_size_, query6_, query_client_id_, query_iaaddr_, query_relay_id_, query_remote_id_, and start_addr_.

+ Here is the call graph for this function:

◆ ~BulkLeaseQuery6()

virtual isc::lease_query::BulkLeaseQuery6::~BulkLeaseQuery6 ( )
inlinevirtual

Destructor.

Definition at line 53 of file bulk_lease_query6.h.

Member Function Documentation

◆ bulkQueryByClientId()

void BulkLeaseQuery6::bulkQueryByClientId ( )
protected

Start processing of a by client id bulk query.

Definition at line 230 of file bulk_lease_query6.cc.

References isc::lease_query::LeaseQueryImpl6::initData(), isc::lease_query::LeaseQueryImpl6::initDone(), isc::lease_query::LeaseQueryImpl6::initReply(), isc_throw, link_addr_, isc::lease_query::LeaseQueryImpl6::makeClientOption(), query6_, query_client_id_, isc::lease_query::LeaseQueryImpl6::queryByClientId(), send(), sendReply(), and isc::lease_query::BulkLeaseQuery::setDone().

Referenced by start().

+ Here is the call graph for this function:

◆ bulkQueryByIpAddress()

void BulkLeaseQuery6::bulkQueryByIpAddress ( )
protected

◆ bulkQueryByLinkAddress()

void BulkLeaseQuery6::bulkQueryByLinkAddress ( )
protected

◆ bulkQueryByLinkAddressNext()

void BulkLeaseQuery6::bulkQueryByLinkAddressNext ( )
protected

Subsequent processing of a by link address bulk query.

Definition at line 504 of file bulk_lease_query6.cc.

References doBulkQueryByLinkAddressNext(), isc::lease_query::LeaseQueryImpl6::initData(), isc::lease_query::LeaseQueryImpl6::initDone(), links_, isc::lease_query::LeaseQueryImpl6::makeClientOption(), page_size_, isc::lease_query::BulkLeaseQuery::post_, query6_, isc::lease_query::LeaseQueryImpl6::queryByLinkNext(), send(), isc::lease_query::BulkLeaseQuery::setDone(), and start_addr_.

+ Here is the call graph for this function:

◆ bulkQueryByRelayId()

void BulkLeaseQuery6::bulkQueryByRelayId ( )
protected

◆ bulkQueryByRelayIdNext()

void BulkLeaseQuery6::bulkQueryByRelayIdNext ( )
protected

Subsequent processing of a by relay id bulk query.

Definition at line 329 of file bulk_lease_query6.cc.

References doBulkQueryByRelayIdNext(), isc::lease_query::LeaseQueryImpl6::initData(), isc::lease_query::LeaseQueryImpl6::initDone(), isc_throw, links_, isc::lease_query::LeaseQueryImpl6::makeClientOption(), page_size_, isc::lease_query::BulkLeaseQuery::post_, query6_, query_relay_id_, isc::lease_query::LeaseQueryImpl6::queryByRelayIdNext(), send(), isc::lease_query::BulkLeaseQuery::setDone(), and start_addr_.

+ Here is the call graph for this function:

◆ bulkQueryByRemoteId()

void BulkLeaseQuery6::bulkQueryByRemoteId ( )
protected

◆ bulkQueryByRemoteIdNext()

void BulkLeaseQuery6::bulkQueryByRemoteIdNext ( )
protected

Subsequent processing of a by remote id bulk query.

Definition at line 418 of file bulk_lease_query6.cc.

References doBulkQueryByRemoteIdNext(), isc::lease_query::LeaseQueryImpl6::initData(), isc::lease_query::LeaseQueryImpl6::initDone(), isc_throw, links_, isc::lease_query::LeaseQueryImpl6::makeClientOption(), page_size_, isc::lease_query::BulkLeaseQuery::post_, query6_, query_remote_id_, isc::lease_query::LeaseQueryImpl6::queryByRemoteIdNext(), send(), isc::lease_query::BulkLeaseQuery::setDone(), and start_addr_.

+ Here is the call graph for this function:

◆ doBulkQueryByLinkAddressNext()

static void isc::lease_query::BulkLeaseQuery6::doBulkQueryByLinkAddressNext ( BulkLeaseQuery6Ptr ptr)
inlinestaticprotected

Class/static subsequent processing of a by link address bulk query.

Parameters
ptrPointer to a BulkLeaseQuery6 object (must not be null).

Definition at line 146 of file bulk_lease_query6.h.

Referenced by bulkQueryByLinkAddress(), and bulkQueryByLinkAddressNext().

◆ doBulkQueryByRelayIdNext()

static void isc::lease_query::BulkLeaseQuery6::doBulkQueryByRelayIdNext ( BulkLeaseQuery6Ptr ptr)
inlinestaticprotected

Class/static subsequent processing of a by relay id bulk query.

Parameters
ptrPointer to a BulkLeaseQuery6 object (must not be null).

Definition at line 118 of file bulk_lease_query6.h.

Referenced by bulkQueryByRelayId(), and bulkQueryByRelayIdNext().

◆ doBulkQueryByRemoteIdNext()

static void isc::lease_query::BulkLeaseQuery6::doBulkQueryByRemoteIdNext ( BulkLeaseQuery6Ptr ptr)
inlinestaticprotected

Class/static subsequent processing of a by remote id bulk query.

Parameters
ptrPointer to a BulkLeaseQuery6 object (must not be null).

Definition at line 132 of file bulk_lease_query6.h.

Referenced by bulkQueryByRemoteId(), and bulkQueryByRemoteIdNext().

◆ getLeaseQueryOption()

dhcp::OptionCustomPtr isc::lease_query::BulkLeaseQuery6::getLeaseQueryOption ( ) const
inlineprotected

Get the lease query option.

Definition at line 165 of file bulk_lease_query6.h.

References lq_option_.

◆ getLinkAddress()

const asiolink::IOAddress & isc::lease_query::BulkLeaseQuery6::getLinkAddress ( ) const
inline

Get the link address.

Definition at line 77 of file bulk_lease_query6.h.

References link_addr_.

◆ getPageSize()

size_t isc::lease_query::BulkLeaseQuery6::getPageSize ( ) const
inline

Get the page size.

Definition at line 92 of file bulk_lease_query6.h.

References page_size_.

◆ getQuery6()

dhcp::Pkt6Ptr isc::lease_query::BulkLeaseQuery6::getQuery6 ( ) const
inline

Get the DHCPv6 query.

Definition at line 72 of file bulk_lease_query6.h.

References query6_.

◆ getQueryClientId()

dhcp::DuidPtr isc::lease_query::BulkLeaseQuery6::getQueryClientId ( ) const
inlineprotected

Get the query client id for a by client id bulk query.

Returns
The query client id for a by client id bulk query or null.

Definition at line 179 of file bulk_lease_query6.h.

References query_client_id_.

◆ getQueryIpAddress()

dhcp::Option6IAAddrPtr isc::lease_query::BulkLeaseQuery6::getQueryIpAddress ( ) const
inlineprotected

Get the query ip address for a by ip address bulk query.

Returns
The query ip address for a by ip address bulk query or null.

Definition at line 172 of file bulk_lease_query6.h.

References query_iaaddr_.

◆ getQueryRelayId()

dhcp::DuidPtr isc::lease_query::BulkLeaseQuery6::getQueryRelayId ( ) const
inlineprotected

Get the query relay id for a by relay id bulk query.

Returns
The query relay id for a by relay id bulk query or null.

Definition at line 186 of file bulk_lease_query6.h.

References query_relay_id_.

◆ getQueryRemoteId()

dhcp::OptionPtr isc::lease_query::BulkLeaseQuery6::getQueryRemoteId ( ) const
inlineprotected

Get the query remote id for a by remote id bulk query.

Returns
The remote id for a by remote id bulk query or null.

Definition at line 193 of file bulk_lease_query6.h.

References query_remote_id_.

◆ getStartAddress()

asiolink::IOAddress isc::lease_query::BulkLeaseQuery6::getStartAddress ( ) const
inline

Get the current start address.

Definition at line 87 of file bulk_lease_query6.h.

References start_addr_.

◆ init()

void BulkLeaseQuery6::init ( )
virtual

◆ leaseQueryLabel()

std::string BulkLeaseQuery6::leaseQueryLabel ( const BlqMsgPtr & msg)
static

Convenience method for generating per packet logging info.

Parameters
msgLease query message.

Definition at line 39 of file bulk_lease_query6.cc.

References isc::lease_query::LeaseQueryImpl6::leaseQueryLabel().

Referenced by isc::lease_query::LeaseQueryConnection::popPendingQuery(), isc::lease_query::LeaseQueryConnection::requestReceived(), isc::lease_query::LeaseQueryConnection::sendNextResponse(), and isc::lease_query::LeaseQueryConnection::startQuery().

+ Here is the call graph for this function:

◆ links()

const dhcp::SubnetIDSet & isc::lease_query::BulkLeaseQuery6::links ( ) const
inline

Get the links set.

Definition at line 82 of file bulk_lease_query6.h.

References links_.

◆ send()

void BulkLeaseQuery6::send ( dhcp::Pkt6Ptr response) const
protectedvirtual

◆ sendReply()

void BulkLeaseQuery6::sendReply ( dhcp::OptionPtr status)
protectedvirtual

Send a final reply.

Parameters
statusThe status code option.

Definition at line 545 of file bulk_lease_query6.cc.

References isc::lease_query::LeaseQueryImpl6::initReply(), query6_, send(), and isc::lease_query::BulkLeaseQuery::setDone().

Referenced by bulkQueryByClientId(), bulkQueryByIpAddress(), bulkQueryByLinkAddress(), bulkQueryByRelayId(), bulkQueryByRemoteId(), and init().

+ Here is the call graph for this function:

◆ start()

void BulkLeaseQuery6::start ( )
virtual

Start processing.

Implements isc::lease_query::BulkLeaseQuery.

Definition at line 165 of file bulk_lease_query6.cc.

References bulkQueryByClientId(), bulkQueryByIpAddress(), bulkQueryByLinkAddress(), bulkQueryByRelayId(), bulkQueryByRemoteId(), isc_throw, LQ6QT_BY_ADDRESS, LQ6QT_BY_CLIENTID, LQ6QT_BY_LINK_ADDRESS, LQ6QT_BY_RELAY_ID, LQ6QT_BY_REMOTE_ID, isc::lease_query::BulkLeaseQuery::query_type_, and isc::lease_query::BulkLeaseQuery::started_.

+ Here is the call graph for this function:

Member Data Documentation

◆ link_addr_

asiolink::IOAddress isc::lease_query::BulkLeaseQuery6::link_addr_
protected

◆ links_

dhcp::SubnetIDSet isc::lease_query::BulkLeaseQuery6::links_
protected

◆ lq_option_

dhcp::OptionCustomPtr isc::lease_query::BulkLeaseQuery6::lq_option_
protected

The lease query option.

Definition at line 214 of file bulk_lease_query6.h.

Referenced by BulkLeaseQuery6(), getLeaseQueryOption(), and init().

◆ page_size_

size_t isc::lease_query::BulkLeaseQuery6::page_size_
protected

The page size (for paged processing, taken from the MT Lease query manager or defaults to 10).

Definition at line 211 of file bulk_lease_query6.h.

Referenced by BulkLeaseQuery6(), bulkQueryByLinkAddress(), bulkQueryByLinkAddressNext(), bulkQueryByRelayId(), bulkQueryByRelayIdNext(), bulkQueryByRemoteId(), bulkQueryByRemoteIdNext(), getPageSize(), and init().

◆ query6_

◆ query_client_id_

dhcp::DuidPtr isc::lease_query::BulkLeaseQuery6::query_client_id_
protected

The query client id (for a by client id bulk query).

Definition at line 220 of file bulk_lease_query6.h.

Referenced by BulkLeaseQuery6(), bulkQueryByClientId(), getQueryClientId(), and init().

◆ query_iaaddr_

dhcp::Option6IAAddrPtr isc::lease_query::BulkLeaseQuery6::query_iaaddr_
protected

The query ip address (for a by ip address bulk query).

Definition at line 217 of file bulk_lease_query6.h.

Referenced by BulkLeaseQuery6(), bulkQueryByIpAddress(), getQueryIpAddress(), and init().

◆ query_relay_id_

dhcp::DuidPtr isc::lease_query::BulkLeaseQuery6::query_relay_id_
protected

The query relay id (for a by relay id bulk query).

Definition at line 223 of file bulk_lease_query6.h.

Referenced by BulkLeaseQuery6(), bulkQueryByRelayId(), bulkQueryByRelayIdNext(), getQueryRelayId(), and init().

◆ query_remote_id_

dhcp::OptionPtr isc::lease_query::BulkLeaseQuery6::query_remote_id_
protected

The remote id (for a by remote id bulk query).

Definition at line 226 of file bulk_lease_query6.h.

Referenced by BulkLeaseQuery6(), bulkQueryByRemoteId(), bulkQueryByRemoteIdNext(), getQueryRemoteId(), and init().

◆ start_addr_

asiolink::IOAddress isc::lease_query::BulkLeaseQuery6::start_addr_
protected

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