xorp

XrlPolicyTarget Class Reference

The XORP Xrl target. More...

#include <xrl_target.hh>

Inheritance diagram for XrlPolicyTarget:
XrlPolicyTargetBase

List of all members.

Public Member Functions

 XrlPolicyTarget (XrlStdRouter *r, PolicyTarget &ptarget)
XrlCmdError common_0_1_get_target_name (string &name)
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_get_version (string &version)
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_get_status (uint32_t &status, string &reason)
 Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_shutdown ()
 Pure-virtual function that needs to be implemented to:
virtual XrlCmdError common_0_1_startup ()
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_create_term (const string &policy, const string &order, const string &term)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_delete_term (const string &policy, const string &term)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_update_term_block (const string &policy, const string &term, const uint32_t &block, const string &order, const string &statement)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_create_policy (const string &policy)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_delete_policy (const string &policy)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_create_set (const string &set)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_update_set (const string &type, const string &set, const string &elements)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_delete_set (const string &set)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_add_to_set (const string &type, const string &set, const string &element)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_delete_from_set (const string &type, const string &set, const string &element)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_done_global_policy_conf ()
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_import (const string &protocol, const string &policies, const string &modifier)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_export (const string &protocol, const string &policies, const string &modifier)
XrlCmdError policy_0_1_add_varmap (const string &protocol, const string &variable, const string &type, const string &access, const uint32_t &id)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_dump_state (const uint32_t &id, string &state)
 Pure-virtual function that needs to be implemented to:
XrlCmdError policy_0_1_set_proto_target (const string &protocol, const string &target)
 Pure-virtual function that needs to be implemented to:
XrlCmdError finder_event_observer_0_1_xrl_target_birth (const string &target_class, const string &target_instance)
 Pure-virtual function that needs to be implemented to:
XrlCmdError finder_event_observer_0_1_xrl_target_death (const string &target_class, const string &target_instance)
 Pure-virtual function that needs to be implemented to:
XrlCmdError cli_processor_0_1_process_command (const string &processor_name, const string &cli_term_name, const uint32_t &cli_session_id, const string &command_name, const string &command_args, string &ret_processor_name, string &ret_cli_term_name, uint32_t &ret_cli_session_id, string &ret_command_output)
 Pure-virtual function that needs to be implemented to:

Private Attributes

PolicyTarget_policy_target

Detailed Description

The XORP Xrl target.

This class simply forwards calls to the PolicyTarget.


Constructor & Destructor Documentation

XrlPolicyTarget::XrlPolicyTarget ( XrlStdRouter r,
PolicyTarget ptarget 
)
Parameters:
rXrlRouter to use.
ptargetthe main PolicyTarget.

Member Function Documentation

XrlCmdError XrlPolicyTarget::cli_processor_0_1_process_command ( const string &  processor_name,
const string &  cli_term_name,
const uint32_t &  cli_session_id,
const string &  command_name,
const string &  command_args,
string &  ret_processor_name,
string &  ret_cli_term_name,
uint32_t &  ret_cli_session_id,
string &  ret_command_output 
) [virtual]

Pure-virtual function that needs to be implemented to:

Process a CLI command.

Parameters:
processor_namethe processor name for this command.
cli_term_namethe terminal name the command was entered from.
cli_session_idthe CLI session ID the command was entered from.
command_namethe command name to process.
command_argsthe command arguments to process.
ret_processor_namethe processor name to return back to the CLI.
ret_cli_term_namethe terminal name to return back.
ret_cli_session_idthe CLI session ID to return back.
ret_command_outputthe command output to return back.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::common_0_1_get_status ( uint32_t &  status,
string &  reason 
) [virtual]

Pure-virtual function that needs to be implemented to:

Get status of Xrl Target

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::common_0_1_get_target_name ( string &  name) [virtual]

Pure-virtual function that needs to be implemented to:

Get name of Xrl Target

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::common_0_1_get_version ( string &  version) [virtual]

Pure-virtual function that needs to be implemented to:

Get version string from Xrl Target

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::common_0_1_shutdown ( ) [virtual]

Pure-virtual function that needs to be implemented to:

Request clean shutdown of Xrl Target

Implements XrlPolicyTargetBase.

virtual XrlCmdError XrlPolicyTarget::common_0_1_startup ( ) [inline, virtual]

Pure-virtual function that needs to be implemented to:

Request a startup of Xrl Target

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::finder_event_observer_0_1_xrl_target_birth ( const string &  target_class,
const string &  target_instance 
) [virtual]

Pure-virtual function that needs to be implemented to:

Announce target birth to observer.

Parameters:
target_classthe target class name.
target_instancethe target instance name.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::finder_event_observer_0_1_xrl_target_death ( const string &  target_class,
const string &  target_instance 
) [virtual]

Pure-virtual function that needs to be implemented to:

Announce target death to observer.

Parameters:
target_classthe target class name.
target_instancethe target instance name.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_add_to_set ( const string &  type,
const string &  set,
const string &  element 
) [virtual]

Pure-virtual function that needs to be implemented to:

Add an element to a set.

Parameters:
typethe type of the set.
setname of the set.
elementthe element to add.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_add_varmap ( const string &  protocol,
const string &  variable,
const string &  type,
const string &  access,
const uint32_t &  id 
) [virtual]

Pure-virtual function that needs to be implemented to:

Add a variable to the varmap configuration.

Parameters:
protocolthe protocol this variable is available to.
variablename of the variable.
typethe type of the variable.
accessthe permissions on the variable (r/rw).
idunique id for this var. Scoped by protocol.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_create_policy ( const string &  policy) [virtual]

Pure-virtual function that needs to be implemented to:

Create a policy.

Parameters:
policyname of the policy.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_create_set ( const string &  set) [virtual]

Pure-virtual function that needs to be implemented to:

Create a set.

Parameters:
setname of the set.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_create_term ( const string &  policy,
const string &  order,
const string &  term 
) [virtual]

Pure-virtual function that needs to be implemented to:

Create a term in a policy. The term will be the last term in the policy statement.

Parameters:
policythe name of the policy.
orderposition of term.
termthe name of the term.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_delete_from_set ( const string &  type,
const string &  set,
const string &  element 
) [virtual]

Pure-virtual function that needs to be implemented to:

Delete an element from a set.

Parameters:
typethe type of the set.
setname of the set.
elementthe element to delete.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_delete_policy ( const string &  policy) [virtual]

Pure-virtual function that needs to be implemented to:

Delete a policy.

Parameters:
policyname of the policy.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_delete_set ( const string &  set) [virtual]

Pure-virtual function that needs to be implemented to:

Delete a set.

Parameters:
setname of the set.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_delete_term ( const string &  policy,
const string &  term 
) [virtual]

Pure-virtual function that needs to be implemented to:

Delete a term in a policy.

Parameters:
policythe name of the policy.
termthe name of the term.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_done_global_policy_conf ( ) [virtual]

Pure-virtual function that needs to be implemented to:

Commit the configuration.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_dump_state ( const uint32_t &  id,
string &  state 
) [virtual]

Pure-virtual function that needs to be implemented to:

Dump state of policy manager. To be used ONLY for debugging.

Parameters:
idwhich aspect of the internal state to dump.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_import ( const string &  protocol,
const string &  policies,
const string &  modifier 
) [virtual]

Pure-virtual function that needs to be implemented to:

Replace import/export policies for a protocol. Will normally cause a delayed commit.

Parameters:
protocolprotocol for which policies must be replaced.
policiescomma separated list of policies.
modifiera match statement to insert in each policy.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_set_proto_target ( const string &  protocol,
const string &  target 
) [virtual]

Pure-virtual function that needs to be implemented to:

Update the mapping from protocols to their XRL target name.

Parameters:
protocolprotocol to update.
targetXRL target for the protocol.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_update_set ( const string &  type,
const string &  set,
const string &  elements 
) [virtual]

Pure-virtual function that needs to be implemented to:

Replace elements in a set.

Parameters:
typethe type of the set.
setname of the set.
elementscomma delimited list of set elements.

Implements XrlPolicyTargetBase.

XrlCmdError XrlPolicyTarget::policy_0_1_update_term_block ( const string &  policy,
const string &  term,
const uint32_t &  block,
const string &  order,
const string &  statement 
) [virtual]

Pure-virtual function that needs to be implemented to:

Update the source/dest/action block of a term in a policy. Note: if statement is empty, the previous one in that position will be deleted.

Parameters:
policythe name of the policy.
termthe name of the term.
blockthe block to update (0:source, 1:dest, 2:action).
ordernumerical position (local) of statement.
statementthe statement to insert or delete.

Implements XrlPolicyTargetBase.


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