xorp

XrlCliTargetBase Class Reference

Inheritance diagram for XrlCliTargetBase:
XrlCliNode

List of all members.

Classes

struct  handler_table

Public Member Functions

 XrlCliTargetBase (XrlCmdMap *cmds=0)
 Constructor.
virtual ~XrlCliTargetBase ()
 Destructor.
bool set_command_map (XrlCmdMap *cmds)
 Set command map.
const string & get_name () const
 Get Xrl instance name associated with command map.
const char * version () const
 Get version string of instance.
 XrlCliTargetBase (XrlCmdMap *cmds=0)
 Constructor.
virtual ~XrlCliTargetBase ()
 Destructor.
bool set_command_map (XrlCmdMap *cmds)
 Set command map.
const string & get_name () const
 Get Xrl instance name associated with command map.
const char * version () const
 Get version string of instance.

Protected Member Functions

virtual XrlCmdError common_0_1_get_target_name (string &name)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_get_version (string &version)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_shutdown ()=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_startup ()=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_enable_cli (const bool &enable)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_start_cli ()=0
virtual XrlCmdError cli_manager_0_1_stop_cli ()=0
virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_add_cli_command (const string &processor_name, const string &command_name, const string &command_help, const bool &is_command_cd, const string &command_cd_prompt, const bool &is_command_processor)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_delete_cli_command (const string &processor_name, const string &command_name)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_get_target_name (string &name)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_get_version (string &version)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_shutdown ()=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_startup ()=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_enable_cli (const bool &enable)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_start_cli ()=0
virtual XrlCmdError cli_manager_0_1_stop_cli ()=0
virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)=0
virtual XrlCmdError cli_manager_0_1_add_cli_command (const string &processor_name, const string &command_name, const string &command_help, const bool &is_command_cd, const string &command_cd_prompt, const bool &is_command_processor)=0
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_delete_cli_command (const string &processor_name, const string &command_name)=0
 Pure-virtual function that needs to be implemented to:

Protected Attributes

XrlCmdMap_cmds

Private Member Functions

XrlCmdRT handle_common_0_1_get_target_name (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_get_version (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_get_status (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_shutdown (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_startup (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_enable_cli (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_start_cli (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_stop_cli (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_enable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_enable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_enable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_enable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_disable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_disable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_disable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_disable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_cli_command (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_cli_command (const XrlArgs &in, XrlCmdOT out)
void add_handlers ()
void remove_handlers ()
XrlCmdRT handle_common_0_1_get_target_name (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_get_version (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_get_status (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_shutdown (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_common_0_1_startup (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_enable_cli (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_start_cli (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_stop_cli (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_enable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_enable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_enable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_enable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_disable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_disable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_disable_cli_access_from_subnet4 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_disable_cli_access_from_subnet6 (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_add_cli_command (const XrlArgs &in, XrlCmdOT out)
XrlCmdRT handle_cli_manager_0_1_delete_cli_command (const XrlArgs &in, XrlCmdOT out)
void add_handlers ()
void remove_handlers ()

Static Private Attributes

static struct handler_table handlers []
static const size_t num_handlers = (sizeof(XrlCliTargetBase::handlers) / sizeof(XrlCliTargetBase::handlers[0]))

Constructor & Destructor Documentation

XrlCliTargetBase::XrlCliTargetBase ( XrlCmdMap cmds = 0)

Constructor.

Parameters:
cmdsan XrlCmdMap that the commands associated with the target should be added to. This is typically the XrlRouter associated with the target.
XrlCliTargetBase::~XrlCliTargetBase ( ) [virtual]

Destructor.

Dissociates instance commands from command map.

XrlCliTargetBase::XrlCliTargetBase ( XrlCmdMap cmds = 0)

Constructor.

Parameters:
cmdsan XrlCmdMap that the commands associated with the target should be added to. This is typically the XrlRouter associated with the target.
virtual XrlCliTargetBase::~XrlCliTargetBase ( ) [virtual]

Destructor.

Dissociates instance commands from command map.


Member Function Documentation

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_add_cli_command ( const string &  processor_name,
const string &  command_name,
const string &  command_help,
const bool &  is_command_cd,
const string &  command_cd_prompt,
const bool &  is_command_processor 
) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Add a CLI command to the CLI manager

Parameters:
processor_namethe name of the module that will process that command.
command_namethe name of the command to add.
command_helpthe help for the command to add.
is_command_cdis true, the string that will replace the CLI prompt after we "cd" to that level of the CLI command-tree.
command_cd_promptif
is_command_processorif true, this is a processing command that would be performed by processor_name.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_add_cli_command ( const string &  processor_name,
const string &  command_name,
const string &  command_help,
const bool &  is_command_cd,
const string &  command_cd_prompt,
const bool &  is_command_processor 
) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Add a CLI command to the CLI manager

Parameters:
processor_namethe name of the module that will process that command.
command_namethe name of the command to add.
command_helpthe help for the command to add.
is_command_cdis true, the string that will replace the CLI prompt after we "cd" to that level of the CLI command-tree.
command_cd_promptif
is_command_processorif true, this is a processing command that would be performed by processor_name.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_add_disable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Add a subnet address to the list of subnet addresses disabled for CLI access. This method can be called more than once to add a number of subnet addresses.

Parameters:
subnet_addrthe subnet address to add.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_add_disable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Add a subnet address to the list of subnet addresses disabled for CLI access. This method can be called more than once to add a number of subnet addresses.

Parameters:
subnet_addrthe subnet address to add.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_add_enable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Add a subnet address to the list of subnet addresses enabled for CLI access. This method can be called more than once to add a number of subnet addresses.

Parameters:
subnet_addrthe subnet address to add.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_add_enable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Add a subnet address to the list of subnet addresses enabled for CLI access. This method can be called more than once to add a number of subnet addresses.

Parameters:
subnet_addrthe subnet address to add.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_delete_cli_command ( const string &  processor_name,
const string &  command_name 
) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Delete a CLI command from the CLI manager

Parameters:
processor_namethe name of the module that sends the request.
command_namethe name of the command to delete.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_delete_cli_command ( const string &  processor_name,
const string &  command_name 
) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Delete a CLI command from the CLI manager

Parameters:
processor_namethe name of the module that sends the request.
command_namethe name of the command to delete.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_delete_disable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Delete a subnet address from the list of subnet addresses disabled for CLI access.

Parameters:
subnet_addrthe subnet address to delete.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_delete_disable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Delete a subnet address from the list of subnet addresses disabled for CLI access.

Parameters:
subnet_addrthe subnet address to delete.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_delete_enable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Delete a subnet address from the list of subnet addresses enabled for CLI access.

Parameters:
subnet_addrthe subnet address to delete.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_delete_enable_cli_access_from_subnet4 ( const IPv4Net subnet_addr) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Delete a subnet address from the list of subnet addresses enabled for CLI access.

Parameters:
subnet_addrthe subnet address to delete.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_enable_cli ( const bool &  enable) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Enable/disable/start/stop the CLI.

Parameters:
enableif true, then enable the CLI, otherwise disable it.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::cli_manager_0_1_enable_cli ( const bool &  enable) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Enable/disable/start/stop the CLI.

Parameters:
enableif true, then enable the CLI, otherwise disable it.

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_get_status ( uint32_t &  status,
string &  reason 
) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Get status of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_get_status ( uint32_t &  status,
string &  reason 
) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Get status of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_get_target_name ( string &  name) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Get name of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_get_target_name ( string &  name) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Get name of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_get_version ( string &  version) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Get version string from Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_get_version ( string &  version) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Get version string from Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_shutdown ( ) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Request clean shutdown of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_shutdown ( ) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Request clean shutdown of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_startup ( ) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Request a startup of Xrl Target

Implemented in XrlCliNode.

virtual XrlCmdError XrlCliTargetBase::common_0_1_startup ( ) [protected, pure virtual]

Pure-virtual function that needs to be implemented to:

Request a startup of Xrl Target

Implemented in XrlCliNode.

bool XrlCliTargetBase::set_command_map ( XrlCmdMap cmds)

Set command map.

Parameters:
cmdspointer to command map to associate commands with. This argument is typically a pointer to the XrlRouter associated with the target.
Returns:
true on success, false if cmds is null or a command map has already been supplied.
bool XrlCliTargetBase::set_command_map ( XrlCmdMap cmds)

Set command map.

Parameters:
cmdspointer to command map to associate commands with. This argument is typically a pointer to the XrlRouter associated with the target.
Returns:
true on success, false if cmds is null or a command map has already been supplied.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations