7#ifndef BULK_LEASE_QUERY4_H
8#define BULK_LEASE_QUERY4_H
102 virtual void start();
140 ptr->bulkQueryByRelayId();
151 ptr->bulkQueryByRemoteId();
164 const std::string& message =
"");
The IOAddress class represents an IP addresses (version agnostic)
dhcp::HWAddrPtr query_hwaddr_
The query hardware address (for a by hardware address bulk query).
void bulkQueryByClientId()
Start processing of a by client id bulk query.
uint8_t getQueryMask() const
Get the query mask.
size_t sent_
Sent response counter.
virtual void start()
Start processing.
dhcp::OptionPtr getQueryRelayId() const
Get the query relay id for a by relay id bulk query.
time_t query_start_time_
The query start time.
time_t query_end_time_
The query end time.
virtual void send(dhcp::Pkt4Ptr response)
Send a response.
size_t getPageSize() const
Get the page size.
static std::string leaseQueryLabel(const BlqMsgPtr &msg)
Convenience method for generating per packet logging info.
static void doBulkQueryByRemoteId(BulkLeaseQuery4Ptr ptr)
Class/static subsequent processing of a by remote id bulk query.
void bulkQueryByRelayId()
Start processing of a by relay id bulk query.
dhcp::HWAddrPtr getQueryHWAddr() const
Get the query hardware address for a by hardware address bulk query.
virtual ~BulkLeaseQuery4()
Destructor.
dhcp::OptionPtr query_client_id_
The query client id (for a by client id bulk query).
BulkLeaseQuery4(BlqQueryPtr query, const BlqPostCb &post, const BlqPushToSendCb &push_to_send, const BlqQueryCompleteCb &query_complete)
Constructor.
asiolink::IOAddress start_addr_
The start address (for paged processing).
void bulkQueryByHWAddr()
Start processing of a by harware address bulk query.
size_t page_size_
The page size (for paged processing, taken from the MT Lease query manager or defaults to 10).
uint8_t query_mask_
The query mask.
dhcp::OptionPtr query_remote_id_
The remote id (for a by remote id bulk query).
dhcp::OptionPtr getQueryClientId() const
Get the query client id for a by client id bulk query.
virtual void sendDone(BLQStatusCode status, const std::string &message="")
Send a DHCPLEASEQUERYDONE message.
dhcp::OptionPtr query_relay_id_
The query relay id (for a by relay id bulk query).
dhcp::Pkt4Ptr getQuery4() const
Get the DHCPv4 query.
static void doBulkQueryByRelayId(BulkLeaseQuery4Ptr ptr)
Class/static subsequent processing of a by relay id bulk query.
asiolink::IOAddress getStartAddress() const
Get the current start address.
dhcp::Pkt4Ptr query4_
The DHCPv4 query.
void bulkQueryByRemoteId()
Start processing of a by remote id bulk query.
virtual void sendActive(const dhcp::Lease4Ptr &lease)
Send a DHCPLEASEACTIVE message.
virtual void init()
Initialization.
dhcp::OptionPtr getQueryRemoteId() const
Get the query remote id for a by remote id bulk query.
BulkLeaseQuery(BlqQueryPtr query, const BlqPostCb &post, const BlqPushToSendCb &push_to_send, const BlqQueryCompleteCb &query_complete)
Constructor.
A wrapper interface for the ASIO library.
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
boost::shared_ptr< HWAddr > HWAddrPtr
Shared pointer to a hardware address structure.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
boost::shared_ptr< Option > OptionPtr
@ BLQ_STATE_TRANSITIONING
std::string getStateName(BLQStates state)
Return the name of the state.
std::string getStatusCodeName(BLQStatusCode status)
Return the name of the status code.
std::function< void(const BlqPostCbArg &)> BlqPostCb
Type of BLQ post callback.
std::function< void(Xid)> BlqQueryCompleteCb
Type of BLQ queryComplete callback.
boost::shared_ptr< BulkLeaseQuery4 > BulkLeaseQuery4Ptr
Defines a shared pointer to a BulkLeaseQuery4 object.
boost::shared_ptr< BlqQuery > BlqQueryPtr
Defines a shared pointer to an BlqQuery.
BLQStatusCode
Status Codes.
@ BLQ_STATUS_QueryTerminated
@ BLQ_STATUS_MalformedQuery
boost::shared_ptr< BlqMsg > BlqMsgPtr
Defines a shared pointer to an BlqMsg.
std::function< bool(BlqResponsePtr)> BlqPushToSendCb
Type of BLQ pushToSend callback.
Defines the logger used by the top-level component of kea-lfc.