class CliClient

The class for the CLI client. More...

Definition#include <cli_client.hh>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

There is one CLI client per CLI user (e.g., telnet connection).

 CliClient (CliNode& init_cli_node, int fd)

CliClient

Constructor for a given CLI node and file descriptor.

Parameters:
init_cli_nodethe CliNode CLI node this client belongs to.
fdthe file descriptor for communication with the user.

 ~CliClient ()

~CliClient

[virtual]

Destructor

int  start_connection ()

start_connection

Start the connection.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  cli_print (const string& msg)

cli_print

Print a message to the CLI user.

Parameters:
msgC++ string with the message to display.

Returns: the number of characters printed (not including the trailing '\0').

int  cli_flush ()

cli_flush

Flush the CLI output.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_log_output (bool v)

set_log_output

Add/remove this client for displaying log messages.

Parameters:
vif true, add this client for displaying messages, otherwise remove it.

Returns: XORP_OK on success, otherwise XORP_ERROR.

bool  is_log_output ()

is_log_output

[const]

Test if this client has been added for displaying log messages.

Returns: true if this client has been added for displaying log messages, otherwise false.

int  cli_fd ()

cli_fd

Get the file descriptor for communication with the user.

Returns: the file descriptor for communcation with the user.

bool  is_stdio ()

is_stdio

[const]

Test if this client is for stdio access.

Returns: true if this client is for stdion access, otherwise false.

const char * cli_session_user_name ()

cli_session_user_name

[const]

Get the user name.

Returns: the user name.

const char * cli_session_term_name ()

cli_session_term_name

[const]

Get the terminal name.

Returns: the terminal name.

const IPvX&  cli_session_from_address ()

cli_session_from_address

[const]

Get the user network address.

Returns: the user network address.

const TimeVal&  cli_session_start_time ()

cli_session_start_time

[const]

Get the start time for this connection.

Returns: a reference to TimeVal with the starting time for this connection.

const TimeVal&  cli_session_stop_time ()

cli_session_stop_time

[const]

Get the stop time for this connection.

Returns: a reference to TimeVal with the end time for this connection.

bool  is_cli_session_active ()

is_cli_session_active

[const]

Test if the CLI session is active (i.e., it has been setup and ready to use).

Returns: true if the CLI session is active, otherwise false.

uint32_t  cli_session_session_id ()

cli_session_session_id

[const]

Get the session ID.

Returns: the session ID for this client.

void  set_cli_session_user_name (const char *v)

set_cli_session_user_name

Set the user name.

Parameters:
vthe user name to set.

void  set_cli_session_term_name (const char *v)

set_cli_session_term_name

Set the terminal name.

Parameters:
vthe terminal name to set.

void  set_cli_session_from_address (const IPvX& v)

set_cli_session_from_address

Set the user network address.

Parameters:
vthe user network address to set.

void  set_cli_session_start_time (const TimeVal& v)

set_cli_session_start_time

Set the start time for this connection.

Parameters:
vthe start time for this connection.

void  set_cli_session_stop_time (const TimeVal& v)

set_cli_session_stop_time

Set the stop time for this connection.

Parameters:
vthe stop time for this connection.

void  set_is_cli_session_active (bool v)

set_is_cli_session_active

Set if this session is active.

Parameters:
vif true, the session is set as active, otherwise is set as non-active.

void  set_cli_session_session_id (uint32_t v)

set_cli_session_session_id

Set the session ID.

Parameters:
vthe session ID value to set.

void  post_process_command ()

post_process_command

Perform final processing of a command.

bool  is_waiting_for_data ()

is_waiting_for_data

[const]

Test if waiting for data from command processor.

Returns: true if waiting for data from command processor, otherwise false.

void  set_is_waiting_for_data (bool v)

set_is_waiting_for_data

Set a flag whether is waiting for data from command processor.

Parameters:
vif true, the session is set as waiting for data, otherwise is set as non-waiting.

const char * current_cli_prompt ()

current_cli_prompt

Get the current CLI prompt.

Returns: the current CLI prompt.

void  set_current_cli_prompt (const char *cli_prompt)

set_current_cli_prompt

Set the current CLI prompt.

Parameters:
cli_promptthe current CLI prompt to set.


Generated by: pavlin on possum.icir.org on Mon Jun 9 13:23:52 2003, using kdoc 2.0a54+XORP.