![]() |
Kea 2.2.0
|
Wrapper class around reservation command handlers. More...
Inheritance diagram for isc::lease_cmds::LeaseCmdsImpl:Classes | |
| class | Parameters |
| Parameters specified for lease commands. More... | |
Public Member Functions | |
| ElementPtr | createFailedLeaseMap (const Lease::Type &lease_type, const IOAddress &lease_address, const DuidPtr &duid, const int control_result, const std::string &error_message) const |
| Returns a map holding brief information about a lease which failed to be deleted, updated or added. More... | |
| Lease6Ptr | getIPv6LeaseForDelete (const Parameters ¶meters) const |
| Convenience function fetching IPv6 address to be used to delete a lease. More... | |
| Parameters | getParameters (bool v6, const ConstElementPtr &args) |
| Extracts parameters required for reservation-get and reservation-del. More... | |
| int | lease4DelHandler (CalloutHandle &handle) |
| lease4-del command handler More... | |
| int | lease4ResendDdnsHandler (CalloutHandle &handle) |
| lease4-resend-ddns handler More... | |
| int | lease4UpdateHandler (CalloutHandle &handle) |
| lease4-update handler More... | |
| int | lease4WipeHandler (CalloutHandle &handle) |
| lease4-wipe handler More... | |
| int | lease6BulkApplyHandler (CalloutHandle &handle) |
| lease6-bulk-apply command handler More... | |
| int | lease6DelHandler (CalloutHandle &handle) |
| lease6-del command handler More... | |
| int | lease6ResendDdnsHandler (CalloutHandle &handle) |
| lease6-resend-ddns handler More... | |
| int | lease6UpdateHandler (CalloutHandle &handle) |
| lease6-update handler More... | |
| int | lease6WipeHandler (CalloutHandle &handle) |
| lease6-wipe handler More... | |
| int | leaseAddHandler (CalloutHandle &handle) |
| lease4-add, lease6-add command handler More... | |
| int | leaseGetAllHandler (CalloutHandle &handle) |
| lease4-get-all, lease6-get-all commands handler More... | |
| int | leaseGetByClientIdHandler (hooks::CalloutHandle &handle) |
| lease4-get-by-client-id command handler More... | |
| int | leaseGetByDuidHandler (hooks::CalloutHandle &handle) |
| lease6-get-by-duid command handler More... | |
| int | leaseGetByHostnameHandler (hooks::CalloutHandle &handle) |
| lease4-get-by-hostname and lease6-get-by-hostname commands handler More... | |
| int | leaseGetByHwAddressHandler (hooks::CalloutHandle &handle) |
| lease4-get-by-hw-address command handler More... | |
| int | leaseGetHandler (CalloutHandle &handle) |
| lease4-get, lease6-get command handler More... | |
| int | leaseGetPageHandler (hooks::CalloutHandle &handle) |
| lease4-get-page, lease6-get-page commands handler More... | |
name of the parameter desired | |||||||
Fetches an IP address parameter from a map of parameters
| |||||||
| IOAddress | getAddressParam (ConstElementPtr params, const std::string name, short family=AF_INET) const | ||||||
| static void | updateStatsOnAdd (const Lease4Ptr &lease) | ||||||
| Update stats when adding lease. More... | |||||||
| static void | updateStatsOnAdd (const Lease6Ptr &lease) | ||||||
| Update stats when adding lease. More... | |||||||
| static void | updateStatsOnUpdate (const Lease4Ptr &existing, const Lease4Ptr &lease) | ||||||
| Update stats when updating lease. More... | |||||||
| static void | updateStatsOnUpdate (const Lease6Ptr &existing, const Lease6Ptr &lease) | ||||||
| Update stats when updating lease. More... | |||||||
| static void | updateStatsOnDelete (const Lease4Ptr &lease) | ||||||
| Update stats when deleting lease. More... | |||||||
| static void | updateStatsOnDelete (const Lease6Ptr &lease) | ||||||
| Update stats when deleting lease. More... | |||||||
| static bool | addOrUpdate4 (Lease4Ptr lease, bool force_create) | ||||||
| Add or update lease. More... | |||||||
| static bool | addOrUpdate6 (Lease6Ptr lease, bool force_create) | ||||||
| Add or update lease. More... | |||||||
Wrapper class around reservation command handlers.
Definition at line 52 of file lease_cmds.cc.
|
static |
Add or update lease.
| lease | The lease to be added or updated (if exists). |
| force_create | Flag to indicate if the function should try to create the lease if it does not exists, or simply update and fail in such case. |
Definition at line 645 of file lease_cmds.cc.
References isc_throw, updateStatsOnAdd(), and updateStatsOnUpdate().
Referenced by lease4UpdateHandler().
Here is the call graph for this function:
|
static |
Add or update lease.
| lease | The lease to be added or updated (if exists). |
| force_create | Flag to indicate if the function should try to create the lease if it does not exists, or simply update and fail in such case. |
Definition at line 676 of file lease_cmds.cc.
References isc_throw, updateStatsOnAdd(), and updateStatsOnUpdate().
Referenced by lease6BulkApplyHandler(), and lease6UpdateHandler().
Here is the call graph for this function:| ElementPtr isc::lease_cmds::LeaseCmdsImpl::createFailedLeaseMap | ( | const Lease::Type & | lease_type, |
| const IOAddress & | lease_address, | ||
| const DuidPtr & | duid, | ||
| const int | control_result, | ||
| const std::string & | error_message | ||
| ) | const |
Returns a map holding brief information about a lease which failed to be deleted, updated or added.
The DUID is only included if it is non-null. The address is only included if it is non-zero.
| lease_type | lease type. |
| lease_address | lease address. |
| duid | DUID of the client. |
| control_result | Control result: "empty" of the lease was not found, "error" otherwise. |
| error_message | Error message. |
Definition at line 2194 of file lease_cmds.cc.
References isc::asiolink::IOAddress::isV6Zero(), and isc::asiolink::IOAddress::toText().
Referenced by lease6BulkApplyHandler().
Here is the call graph for this function:| IOAddress isc::lease_cmds::LeaseCmdsImpl::getAddressParam | ( | ConstElementPtr | params, |
| const std::string | name, | ||
| short | family = AF_INET |
||
| ) | const |
Definition at line 2075 of file lease_cmds.cc.
References isc::asiolink::IOAddress::getFamily(), and isc_throw.
Referenced by lease4ResendDdnsHandler(), and lease6ResendDdnsHandler().
Here is the call graph for this function:| Lease6Ptr isc::lease_cmds::LeaseCmdsImpl::getIPv6LeaseForDelete | ( | const Parameters & | parameters | ) | const |
Convenience function fetching IPv6 address to be used to delete a lease.
The returned parameter depends on the query_type value stored in the passed object. Note that the HW address is not allowed and this query type results in an exception. If the query type is of the address type, the address is returned. If the type is set to DUID, this function will try to find the lease for this DUID and return the corresponding address.
| parameters | parameters extracted from the command. |
| InvalidParameter | if the DUID is not found when needed to find the lease or if the query type is by HW address. |
| InvalidOperation | if the query type is unknown. |
Definition at line 2033 of file lease_cmds.cc.
References isc::lease_cmds::LeaseCmdsImpl::Parameters::addr, isc::lease_cmds::LeaseCmdsImpl::Parameters::duid, isc::lease_cmds::LeaseCmdsImpl::Parameters::iaid, isc_throw, isc::lease_cmds::LeaseCmdsImpl::Parameters::lease_type, isc::lease_cmds::LeaseCmdsImpl::Parameters::query_type, isc::lease_cmds::LeaseCmdsImpl::Parameters::subnet_id, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_ADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_DUID, and isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_HWADDR.
Referenced by lease6BulkApplyHandler().
| LeaseCmdsImpl::Parameters isc::lease_cmds::LeaseCmdsImpl::getParameters | ( | bool | v6, |
| const ConstElementPtr & | args | ||
| ) |
Extracts parameters required for reservation-get and reservation-del.
See Parameters class for detailed description of what is expected in the args structure.
| v6 | whether addresses allowed are v4 (false) or v6 (true) |
| args | arguments passed to command |
| BadValue | if input arguments don't make sense. |
Definition at line 811 of file lease_cmds.cc.
References isc::lease_cmds::LeaseCmdsImpl::Parameters::addr, isc::lease_cmds::LeaseCmdsImpl::Parameters::client_id, isc::lease_cmds::LeaseCmdsImpl::Parameters::duid, isc::lease_cmds::LeaseCmdsImpl::Parameters::hwaddr, isc::lease_cmds::LeaseCmdsImpl::Parameters::iaid, isc_throw, isc::asiolink::IOAddress::isV4(), isc::asiolink::IOAddress::isV6(), isc::lease_cmds::LeaseCmdsImpl::Parameters::lease_type, isc::lease_cmds::LeaseCmdsImpl::Parameters::query_type, isc::lease_cmds::LeaseCmdsImpl::Parameters::subnet_id, isc::lease_cmds::LeaseCmdsImpl::Parameters::txtToType(), isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_ADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_CLIENT_ID, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_DUID, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_HWADDR, and isc::lease_cmds::LeaseCmdsImpl::Parameters::updateDDNS.
Referenced by lease4DelHandler(), lease6BulkApplyHandler(), lease6DelHandler(), and leaseGetHandler().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease4DelHandler | ( | CalloutHandle & | handle | ) |
lease4-del command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease4DelHandler
| handle | Callout context - which is expected to contain the delete command JSON text in the "command" argument |
Definition at line 1441 of file lease_cmds.cc.
References isc::lease_cmds::LeaseCmdsImpl::Parameters::addr, isc::dhcp_ddns::CHG_REMOVE, isc::lease_cmds::LeaseCmdsImpl::Parameters::client_id, isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CmdsImpl::extractCommand(), getParameters(), isc::lease_cmds::LeaseCmdsImpl::Parameters::hwaddr, isc_throw, isc::lease_cmds::LeaseCmdsImpl::Parameters::query_type, isc::dhcp::queueNCR(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), isc::lease_cmds::LeaseCmdsImpl::Parameters::subnet_id, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_ADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_CLIENT_ID, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_DUID, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_HWADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::updateDDNS, and updateStatsOnDelete().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease4ResendDdnsHandler | ( | CalloutHandle & | handle | ) |
lease4-resend-ddns handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease4ResendDdnsHandler
| handle | Callout context - which is expected to contain the lease4-resend-ddns command JSON text in the "command" argument |
Definition at line 2104 of file lease_cmds.cc.
References isc::dhcp_ddns::CHG_ADD, isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CmdsImpl::extractCommand(), getAddressParam(), isc::lease_cmds::lease_cmds_logger, LEASE_CMDS_RESEND_DDNS4, LEASE_CMDS_RESEND_DDNS4_FAILED, LOG_ERROR, LOG_INFO, isc::dhcp::queueNCR(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), and isc::asiolink::IOAddress::toText().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease4UpdateHandler | ( | CalloutHandle & | handle | ) |
lease4-update handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease4UpdateHandler
| handle | Callout context - which is expected to contain the update command JSON text in the "command" argument |
Definition at line 1775 of file lease_cmds.cc.
References addOrUpdate4(), isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::extractCommand(), isc_throw, isc::lease_cmds::Lease4Parser::parse(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), and isc::dhcp::ResourceHandler4::tryLock4().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease4WipeHandler | ( | CalloutHandle & | handle | ) |
lease4-wipe handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease4WipeHandler
| handle | Callout context - which is expected to contain the wipe command JSON text in the "command" argument |
Definition at line 1871 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc::data::SimpleParser::getUint32(), isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease6BulkApplyHandler | ( | CalloutHandle & | handle | ) |
lease6-bulk-apply command handler
Provides the implementation for the isc::lease_cmds::LeaseCmds::lease6BulkApplyHandler.
| handle | Callout context - which is expected to contain the add command JSON text in the "command" argument |
Definition at line 1517 of file lease_cmds.cc.
References addOrUpdate6(), isc::lease_cmds::LeaseCmdsImpl::Parameters::addr, isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), createFailedLeaseMap(), isc::lease_cmds::LeaseCmdsImpl::Parameters::duid, isc::config::CmdsImpl::extractCommand(), getIPv6LeaseForDelete(), getParameters(), isc_throw, isc::lease_cmds::LeaseCmdsImpl::Parameters::lease_type, isc::lease_cmds::Lease6Parser::parse(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setResponse(), isc::dhcp::ResourceHandler::tryLock(), and updateStatsOnDelete().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease6DelHandler | ( | CalloutHandle & | handle | ) |
lease6-del command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease6DelHandler
| handle | Callout context - which is expected to contain the delete command JSON text in the "command" argument |
Definition at line 1709 of file lease_cmds.cc.
References isc::lease_cmds::LeaseCmdsImpl::Parameters::addr, isc::dhcp_ddns::CHG_REMOVE, isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::lease_cmds::LeaseCmdsImpl::Parameters::duid, isc::config::CmdsImpl::extractCommand(), getParameters(), isc::lease_cmds::LeaseCmdsImpl::Parameters::iaid, isc_throw, isc::lease_cmds::LeaseCmdsImpl::Parameters::lease_type, isc::lease_cmds::LeaseCmdsImpl::Parameters::query_type, isc::dhcp::queueNCR(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), isc::lease_cmds::LeaseCmdsImpl::Parameters::subnet_id, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_ADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_DUID, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_HWADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::updateDDNS, and updateStatsOnDelete().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease6ResendDdnsHandler | ( | CalloutHandle & | handle | ) |
lease6-resend-ddns handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease6ResendDdnsHandler
| handle | Callout context - which is expected to contain the lease6-resend-ddns command JSON text in the "command" argument |
Definition at line 2149 of file lease_cmds.cc.
References isc::dhcp_ddns::CHG_ADD, isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CmdsImpl::extractCommand(), getAddressParam(), isc::lease_cmds::lease_cmds_logger, LEASE_CMDS_RESEND_DDNS6, LEASE_CMDS_RESEND_DDNS6_FAILED, LOG_ERROR, LOG_INFO, isc::dhcp::queueNCR(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), and isc::asiolink::IOAddress::toText().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease6UpdateHandler | ( | CalloutHandle & | handle | ) |
lease6-update handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease6UpdateHandler
| handle | Callout context - which is expected to contain the update command JSON text in the "command" argument |
Definition at line 1823 of file lease_cmds.cc.
References addOrUpdate6(), isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::extractCommand(), isc_throw, isc::lease_cmds::Lease6Parser::parse(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), and isc::dhcp::ResourceHandler::tryLock().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::lease6WipeHandler | ( | CalloutHandle & | handle | ) |
lease6-wipe handler
Provides the implementation for isc::lease_cmds::LeaseCmds::lease6WipeHandler
| handle | Callout context - which is expected to contain the wipe command JSON text in the "command" argument |
Definition at line 1945 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc::data::SimpleParser::getUint32(), isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseAddHandler | ( | CalloutHandle & | handle | ) |
lease4-add, lease6-add command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::leaseAddHandler
| handle | Callout context - which is expected to contain the add command JSON text in the "command" argument |
Definition at line 708 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::cmd_name_, isc::config::CmdsImpl::extractCommand(), isc_throw, LEASE_CMDS_ADD4, LEASE_CMDS_ADD4_FAILED, LEASE_CMDS_ADD6, LEASE_CMDS_ADD6_FAILED, isc::lease_cmds::lease_cmds_logger, LOG_ERROR, LOG_INFO, isc::lease_cmds::Lease4Parser::parse(), isc::lease_cmds::Lease6Parser::parse(), isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setSuccessResponse(), isc::dhcp::ResourceHandler::tryLock(), isc::dhcp::ResourceHandler4::tryLock4(), and updateStatsOnAdd().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetAllHandler | ( | CalloutHandle & | handle | ) |
lease4-get-all, lease6-get-all commands handler
These commands attempt to retrieve all IPv4 or IPv6 leases, or all IPv4 or all IPv6 leases belonging to the particular subnets. If no subnet identifiers are provided, it returns all IPv4 or IPv6 leases from the database.
| handle | Callout context - which is expected to contain the get command JSON text in the "command" argument |
Definition at line 1019 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::cmd_name_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc_throw, isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetByClientIdHandler | ( | hooks::CalloutHandle & | handle | ) |
lease4-get-by-client-id command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::leaseGetByClientIdHandler
| handle | Callout context - which is expected to contain the get command JSON text in the "command" argument |
Definition at line 1271 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc_throw, isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetByDuidHandler | ( | hooks::CalloutHandle & | handle | ) |
lease6-get-by-duid command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::leaseGetByDuidHandler
| handle | Callout context - which is expected to contain the get command JSON text in the "command" argument |
Definition at line 1321 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc_throw, isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetByHostnameHandler | ( | hooks::CalloutHandle & | handle | ) |
lease4-get-by-hostname and lease6-get-by-hostname commands handler
Provides the implementation for isc::lease_cmds::LeaseCmds::leaseGetByHostnameHandler
| handle | Callout context - which is expected to contain the get command JSON text in the "command" argument |
The 'hostname' argument should not be empty.
Definition at line 1371 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::cmd_name_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc_throw, isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetByHwAddressHandler | ( | hooks::CalloutHandle & | handle | ) |
lease4-get-by-hw-address command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::leaseGetByHwAddressHandler
| handle | Callout context - which is expected to contain the get command JSON text in the "command" argument |
Definition at line 1221 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc_throw, isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetHandler | ( | CalloutHandle & | handle | ) |
lease4-get, lease6-get command handler
Provides the implementation for isc::lease_cmds::LeaseCmds::leaseGetHandler
| handle | Callout context - which is expected to contain the get command JSON text in the "command" argument |
Definition at line 929 of file lease_cmds.cc.
References isc::lease_cmds::LeaseCmdsImpl::Parameters::addr, isc::lease_cmds::LeaseCmdsImpl::Parameters::client_id, isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::cmd_name_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::lease_cmds::LeaseCmdsImpl::Parameters::duid, isc::config::CmdsImpl::extractCommand(), getParameters(), isc::lease_cmds::LeaseCmdsImpl::Parameters::hwaddr, isc::lease_cmds::LeaseCmdsImpl::Parameters::iaid, isc_throw, isc::lease_cmds::LeaseCmdsImpl::Parameters::lease_type, isc::lease_cmds::LeaseCmdsImpl::Parameters::query_type, isc::config::CmdsImpl::setErrorResponse(), isc::config::CmdsImpl::setResponse(), isc::lease_cmds::LeaseCmdsImpl::Parameters::subnet_id, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_ADDR, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_CLIENT_ID, isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_DUID, and isc::lease_cmds::LeaseCmdsImpl::Parameters::TYPE_HWADDR.
Here is the call graph for this function:| int isc::lease_cmds::LeaseCmdsImpl::leaseGetPageHandler | ( | hooks::CalloutHandle & | handle | ) |
lease4-get-page, lease6-get-page commands handler
These commands attempt to retrieve 1 page of leases. The maximum size of the page is specified by the caller. The caller also specifies the last address returned in the previous page. The new page starts from the first address following the address specified by the caller. If the first page should be returned the IPv4 zero address, IPv6 zero address or the keyword "start" should be provided instead of the last address.
| handle | Callout context - which is expected to contain the get commands JSON text in the "command" argument. |
Definition at line 1102 of file lease_cmds.cc.
References isc::config::CmdsImpl::cmd_args_, isc::config::CmdsImpl::cmd_name_, isc::config::CONTROL_RESULT_EMPTY, isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::config::CmdsImpl::extractCommand(), isc_throw, isc::config::CmdsImpl::setErrorResponse(), and isc::config::CmdsImpl::setResponse().
Here is the call graph for this function:
|
static |
Update stats when adding lease.
| lease | Added lease. |
Definition at line 450 of file lease_cmds.cc.
Referenced by addOrUpdate4(), addOrUpdate6(), and leaseAddHandler().
|
static |
Update stats when adding lease.
| lease | Added lease. |
Definition at line 468 of file lease_cmds.cc.
|
static |
Update stats when deleting lease.
| lease | Deleted lease. |
Definition at line 608 of file lease_cmds.cc.
Referenced by lease4DelHandler(), lease6BulkApplyHandler(), and lease6DelHandler().
|
static |
Update stats when deleting lease.
| lease | Deleted lease. |
Definition at line 626 of file lease_cmds.cc.
|
static |
Update stats when updating lease.
| existing | Lease data before update. |
| lease | Lease data after update. |
Definition at line 487 of file lease_cmds.cc.
Referenced by addOrUpdate4(), and addOrUpdate6().
|
static |
Update stats when updating lease.
| existing | Lease data before update. |
| lease | Lease data after update. |
Definition at line 546 of file lease_cmds.cc.