xorp

XrlCliNode Class Reference

Inheritance diagram for XrlCliNode:
XrlStdRouter XrlCliTargetBase XrlRouter XrlDispatcher XrlSender FinderClientObserver XrlCmdMap NONCOPYABLE

List of all members.

Public Member Functions

 XrlCliNode (EventLoop &eventloop, const string &class_name, const string &finder_hostname, uint16_t finder_port, const string &finder_target, CliNode &cli_node)
int enable_cli ()
int disable_cli ()
int start_cli ()
int stop_cli ()
XrlRouterxrl_router ()
 Get a reference to the XrlRouter instance.
const XrlRouterxrl_router () const
 Get a const reference to the XrlRouter instance.

Protected Member Functions

virtual XrlCmdError common_0_1_get_target_name (string &name)
 Get name of Xrl Target.
virtual XrlCmdError common_0_1_get_version (string &version)
 Get version string from Xrl Target.
virtual XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)
 Get status from Xrl Target.
virtual XrlCmdError common_0_1_shutdown ()
 Shutdown cleanly.
virtual XrlCmdError common_0_1_startup ()
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError cli_manager_0_1_enable_cli (const bool &enable)
 Enable/disable/start/stop the CLI.
virtual XrlCmdError cli_manager_0_1_start_cli ()
virtual XrlCmdError cli_manager_0_1_stop_cli ()
virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)
 Add a subnet address to the list of subnet addresses enabled for CLI access.
virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)
virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)
 Delete a subnet address from the list of subnet addresses enabled for CLI access.
virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)
virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)
 Add a subnet address to the list of subnet addresses disabled for CLI access.
virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)
virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet4 (const IPv4Net &subnet_addr)
 Delete a subnet address from the list of subnet addresses disabled for CLI access.
virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet6 (const IPv6Net &subnet_addr)
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)
 Add a CLI command to the CLI manager.
virtual XrlCmdError cli_manager_0_1_delete_cli_command (const string &processor_name, const string &command_name)
 Delete a CLI command from the CLI manager.
void send_process_command (const string &target, const string &processor_name, const string &cli_term_name, uint32_t cli_session_id, const vector< string > &command_global_name, const vector< string > &command_argv)
void recv_process_command_output (const XrlError &xrl_error, const string *processor_name, const string *cli_term_name, const uint32_t *cli_session_id, const string *command_output)

Private Member Functions

virtual void finder_connect_event ()
 Called when Finder connection is established.
virtual void finder_disconnect_event ()
 Called when Finder disconnect occurs.
CliNodecli_node () const

Private Attributes

EventLoop_eventloop
CliNode_cli_node
XrlCliProcessorV0p1Client _xrl_cli_processor_client
bool _is_finder_alive

Member Function Documentation

XrlCmdError XrlCliNode::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, virtual]

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.

Implements XrlCliTargetBase.

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

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.

Implements XrlCliTargetBase.

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

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.

Implements XrlCliTargetBase.

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

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.

Implements XrlCliTargetBase.

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

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

Parameters:
subnet_addrthe subnet address to delete.

Implements XrlCliTargetBase.

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

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

Parameters:
subnet_addrthe subnet address to delete.

Implements XrlCliTargetBase.

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

Enable/disable/start/stop the CLI.

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

Implements XrlCliTargetBase.

virtual XrlCmdError XrlCliNode::common_0_1_startup ( ) [inline, protected, virtual]

Pure-virtual function that needs to be implemented to:

Request a startup of Xrl Target

Implements XrlCliTargetBase.

void XrlCliNode::finder_connect_event ( ) [private, virtual]

Called when Finder connection is established.

Note that this method overwrites an XrlRouter virtual method.

Reimplemented from XrlRouter.

void XrlCliNode::finder_disconnect_event ( ) [private, virtual]

Called when Finder disconnect occurs.

Note that this method overwrites an XrlRouter virtual method.

Reimplemented from XrlRouter.

XrlRouter& XrlCliNode::xrl_router ( ) [inline]

Get a reference to the XrlRouter instance.

Returns:
a reference to the XrlRouter (XrlRouter) instance.
const XrlRouter& XrlCliNode::xrl_router ( ) const [inline]

Get a const reference to the XrlRouter instance.

Returns:
a const reference to the XrlRouter (XrlRouter) instance.

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