Kea  2.1.7-git
Methods are used to handle commands.

The following methods are used to handle commands: More...

Functions

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

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 527 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, and isc::config::createAnswer().

Referenced by isc::stats::StatsMgr::generateName().

+ 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 474 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::stats::StatsMgr::generateName().

+ 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 518 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, and isc::config::createAnswer().

Referenced by isc::stats::StatsMgr::generateName().

+ 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 501 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::stats::StatsMgr::generateName().

+ 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 534 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_SUCCESS, and isc::config::createAnswer().

Referenced by isc::stats::StatsMgr::generateName().

+ 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 485 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::stats::StatsMgr::generateName().

+ 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 542 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::dhcp::ControlledDhcpv6Srv::cleanup(), isc::stats::StatsMgr::generateName(), and isc::dhcp::ControlledDhcpv4Srv::loadConfigFile().

+ 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 434 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::stats::StatsMgr::generateName().

+ 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 563 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::dhcp::ControlledDhcpv6Srv::cleanup(), isc::stats::StatsMgr::generateName(), and isc::dhcp::ControlledDhcpv4Srv::loadConfigFile().

+ 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 454 of file lib/stats/stats_mgr.cc.

References isc::config::CONTROL_RESULT_ERROR, isc::config::CONTROL_RESULT_SUCCESS, isc::config::createAnswer(), and isc::db::error.

Referenced by isc::stats::StatsMgr::generateName().

+ Here is the call graph for this function: