Kea  2.1.7-git
command_interpreter.h File Reference

This file contains several functions and constants that are used for handling commands and responses sent over control channel. More...

#include <cc/data.h>
#include <string>
+ Include dependency graph for command_interpreter.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  isc::config::CtrlChannelError
 A standard control channel exception that is thrown if a function is there is a problem with one of the messages. More...
 

Namespaces

 isc
 Defines the logger used by the top-level component of kea-lfc.
 
 isc::config
 

Functions

std::string isc::config::answerToText (const isc::data::ConstElementPtr &msg)
 Converts answer to printable text. More...
 
isc::data::ConstElementPtr isc::config::combineCommandsLists (const isc::data::ConstElementPtr &response1, const isc::data::ConstElementPtr &response2)
 Combines lists of commands carried in two responses. More...
 
ConstElementPtr isc::config::createAnswer ()
 Creates a standard config/command level success answer message (i.e. More...
 
ConstElementPtr isc::config::createAnswer (const int status_code, const std::string &status_text)
 Creates a standard config/command level answer message (i.e. More...
 
isc::data::ConstElementPtr isc::config::createAnswer (const int status_code, const isc::data::ConstElementPtr &arg)
 Creates a standard config/command level answer message (i.e. More...
 
isc::data::ConstElementPtr isc::config::createAnswer (const int status_code, const std::string &status, const isc::data::ConstElementPtr &arg)
 Creates a standard config/command level answer message. More...
 
isc::data::ConstElementPtr isc::config::createCommand (const std::string &command, isc::data::ConstElementPtr arg)
 Creates a standard command message with the given argument (of the form { "command": "my_command", "arguments": arg }. More...
 
ConstElementPtr isc::config::createCommand (const std::string &command)
 Creates a standard command message with no argument (of the form { "command": "my_command" }) More...
 
ConstElementPtr isc::config::createCommand (const std::string &command, const std::string &service)
 Creates a standard config/command command message with no argument and with the given service (of the form { "command": "my_command", "service": [ service ] }) More...
 
isc::data::ConstElementPtr isc::config::createCommand (const std::string &command, isc::data::ConstElementPtr arg, const std::string &service)
 Creates a standard config/command command message with the given argument and given service (of the form { "command": "my_command", "arguments": arg, "service": [ service ] }. More...
 
isc::data::ConstElementPtr isc::config::parseAnswer (int &status_code, const isc::data::ConstElementPtr &msg)
 Parses a standard config/command level answer message. More...
 
std::string isc::config::parseCommand (isc::data::ConstElementPtr &arg, isc::data::ConstElementPtr command)
 Parses the given command into a string containing the actual command and an ElementPtr containing the optional argument. More...
 
std::string isc::config::parseCommandWithArgs (isc::data::ConstElementPtr &arg, isc::data::ConstElementPtr command)
 Parses the given command into a string containing the command name and an ElementPtr containing the mandatory argument. More...
 

Variables

const int isc::config::CONTROL_RESULT_COMMAND_UNSUPPORTED = 2
 Status code indicating that the specified command is not supported. More...
 
const int isc::config::CONTROL_RESULT_EMPTY = 3
 Status code indicating that the specified command was completed correctly, but failed to produce any results. More...
 
const int isc::config::CONTROL_RESULT_ERROR = 1
 Status code indicating a general failure. More...
 
const int isc::config::CONTROL_RESULT_SUCCESS = 0
 Status code indicating a successful operation. More...
 

Detailed Description

This file contains several functions and constants that are used for handling commands and responses sent over control channel.

The design is described here: https://gitlab.isc.org/isc-projects/kea/wikis/Stats-design, but also in Control Channel section in the Developer's Guide.

Definition in file command_interpreter.h.