Kea 2.7.5
Methods are used to handle commands.

Functions

static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticGetAllHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-get-all command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticGetHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-get command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticRemoveAllHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-remove-all command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticRemoveHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-remove command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticResetAllHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-reset-all command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticResetHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-reset command.
 
isc::data::ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleAgeAllHandler (const isc::data::ConstElementPtr &params)
 Handles statistic-sample-age-set-all command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleAgeHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-sample-age-set command.
 
isc::data::ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleCountAllHandler (const isc::data::ConstElementPtr &params)
 Handles statistic-sample-count-set-all command.
 
static isc::data::ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleCountHandler (const std::string &name, const isc::data::ConstElementPtr &params)
 Handles statistic-sample-count-set command.
 

Detailed Description

The following methods are used to handle commands:

Function Documentation

◆ statisticGetAllHandler()

ConstElementPtr isc::stats::StatsMgr::statisticGetAllHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-get-all command.

This method handles statistic-get-all command, which returns values of all statistics. Params parameter is ignored.

Parameters
namename of the command (ignored, should be "statistic-get-all")
paramsignored
Returns
answer containing values of all statistic

Definition at line 434 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().

+ Here is the call graph for this function:

◆ statisticGetHandler()

ConstElementPtr isc::stats::StatsMgr::statisticGetHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-get command.

This method handles statistic-get command, which returns value of a given statistic). It expects one parameter stored in params map: name: name of the statistic

Example params structure: { "name": "packets-received" }

Parameters
namename of the command (ignored, should be "statistic-get")
paramsstructure containing a map that contains "name"
Returns
answer containing details of specified statistic

Definition at line 381 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::get(), and isc::stats::StatsMgr::instance().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().

+ Here is the call graph for this function:

◆ statisticRemoveAllHandler()

ConstElementPtr isc::stats::StatsMgr::statisticRemoveAllHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-remove-all command.

Note
The statistic-remove-all command was deprecated.

This method handles statistic-remove-all command, which removes all statistics. Params parameter is ignored.

Parameters
namename of the command (ignored, should be "statistic-remove-all")
paramsignored
Returns
answer confirming success of this operation

Definition at line 425 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().

+ Here is the call graph for this function:

◆ statisticRemoveHandler()

ConstElementPtr isc::stats::StatsMgr::statisticRemoveHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-remove command.

This method handles statistic-reset command, which removes a given statistic completely. It expects one parameter stored in params map: name: name of the statistic

Example params structure: { "name": "packets-received" }

Parameters
namename of the command (ignored, should be "statistic-remove")
paramsstructure containing a map that contains "name" element
Returns
answer containing confirmation

Definition at line 408 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::del(), and isc::stats::StatsMgr::instance().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().

+ Here is the call graph for this function:

◆ statisticResetAllHandler()

ConstElementPtr isc::stats::StatsMgr::statisticResetAllHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-reset-all command.

This method handles statistic-reset-all command, which sets values of all statistics back to zero. Params parameter is ignored.

Parameters
namename of the command (ignored, should be "statistic-reset-all")
paramsignored
Returns
answer confirming success of this operation

Definition at line 441 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().

+ Here is the call graph for this function:

◆ statisticResetHandler()

ConstElementPtr isc::stats::StatsMgr::statisticResetHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-reset command.

This method handles statistic-reset command, which resets value of a given statistic. It expects one parameter stored in params map: name: name of the statistic

Example params structure: { "name": "packets-received" }

Parameters
namename of the command (ignored, should be "statistic-reset")
paramsstructure containing a map that contains "name"
Returns
answer containing confirmation

Definition at line 392 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::reset().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Controller::registerCommands().

+ Here is the call graph for this function:

◆ statisticSetMaxSampleAgeAllHandler()

ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleAgeAllHandler ( const isc::data::ConstElementPtr & params)

Handles statistic-sample-age-set-all command.

This method handles statistic-sample-age-set-all command, which sets max_sample_age_ limit to all statistics and the default. It expects one parameter stored in params map: duration: limit expressed as a number of seconds

Example params structure: { "duration": 1245 }

Parameters
paramsstructure containing a map that contains "duration"
Returns
answer confirming success of this operation

Definition at line 449 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().

+ Here is the call graph for this function:

◆ statisticSetMaxSampleAgeHandler()

ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleAgeHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-sample-age-set command.

This method handles statistic-sample-age-set command, which sets max_sample_age_ limit of a given statistic and leaves max_sample_count_ disabled. It expects two parameters stored in params map: name: name of the statistic duration: time limit expressed as a number of seconds

Example params structure: { "name": "packets-received", "duration": 1245 }

Parameters
namename of the command (ignored, should be "statistic-sample-age-set")
paramsstructure containing a map that contains "name" and "duration"
Returns
answer containing information about successfully setup limit of statistic

Definition at line 341 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::setMaxSampleAge().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().

+ Here is the call graph for this function:

◆ statisticSetMaxSampleCountAllHandler()

ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleCountAllHandler ( const isc::data::ConstElementPtr & params)

Handles statistic-sample-count-set-all command.

This method handles statistic-sample-count-set-all command, which sets max_sample_count_ limit of all statistics and the default. It expects one parameter stored in params map: max-samples: count limit The value 0 is out of range.

Example params structure: { "max-samples": 15 }

Parameters
paramsstructure containing a map that contains "max-samples"
Returns
answer confirming success of this operation

Definition at line 464 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::stats::StatsMgr::instance().

+ Here is the call graph for this function:

◆ statisticSetMaxSampleCountHandler()

ConstElementPtr isc::stats::StatsMgr::statisticSetMaxSampleCountHandler ( const std::string & name,
const isc::data::ConstElementPtr & params )
static

Handles statistic-sample-count-set command.

This method handles statistic-sample-count-set command, which sets max_sample_count_ limit of a given statistic and leaves max_sample_age_ disabled. It expects two parameters stored in params map: name: name of the statistic max-samples: count limit

Example params structure: { "name": "packets-received", "max-samples": 15 }

Parameters
namename of the command (ignored, should be "statistic-sample-count-set")
paramsstructure containing a map that contains "name" and "max-samples"
Returns
answer containing information about successfully setup limit of statistic

Definition at line 361 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), isc::stats::StatsMgr::instance(), and isc::stats::StatsMgr::setMaxSampleCount().

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), and isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv().

+ Here is the call graph for this function: