|
xorp
|
The XORP Policy target. More...
#include <policy_target.hh>
Public Member Functions | |
| PolicyTarget (XrlStdRouter &rtr) | |
| bool | running () |
| void | shutdown () |
| Shutdown the process. | |
| void | create_term (const string &policy, const ConfigNodeId &order, const string &term) |
| Attempts to create a term. | |
| void | delete_term (const string &policy, const string &term) |
| Attempts to delete a term. | |
| void | update_term_block (const string &policy, const string &term, const uint32_t &block, const ConfigNodeId &order, const string &statement) |
| Update the source/dest/action block of a term in a policy. | |
| void | create_policy (const string &policy) |
| Attempts to create a policy. | |
| void | delete_policy (const string &policy) |
| Attempts to delete a policy. | |
| void | create_set (const string &name) |
| Attempts to create a policy. | |
| void | update_set (const string &type, const string &name, const string &elements) |
| Attempts to update set elements. | |
| void | delete_set (const string &name) |
| Attempts to delete a set. | |
| void | add_to_set (const string &type, const string &name, const string &element) |
| Add an element to a set. | |
| void | delete_from_set (const string &type, const string &name, const string &element) |
| Delete an element from a set. | |
| void | update_import (const string &protocol, const string &policies, const string &modifier) |
| Updates the import policy list for a protocol and triggers a delayed commit. | |
| void | update_export (const string &protocol, const string &policies, const string &modifier) |
| Updates the export policy list for a protocol and triggers a delayed commit. | |
| void | add_varmap (const string &protocol, const string &variable, const string &type, const string &access, const VarRW::Id &id) |
| void | commit (uint32_t msec) |
| Commit all configuration changes, but trigger a delayed update to the actual policy filters. | |
| string | dump_state (uint32_t id) |
| Dump internal state. | |
| void | birth (const string &tclass, const string &tinstance) |
| Announce birth of a XORP process. | |
| void | death (const string &tclass, const string &tinstance) |
| Announce death of a XORP process. | |
| void | set_proto_target (const string &protocol, const string &target) |
| Update the protocol -> XRL target map. | |
| string | cli_command (const string &command) |
| string | test_policy (const string &arg) |
| string | show (const string &arg) |
| void | show (const string &type, const string &name, RESOURCES &res) |
| bool | test_policy (const string &policy, const string &prefix, const string &attributes, string &mods) |
| bool | test_policy (const string &policy, const RATTR &attrs, RATTR &mods) |
Static Public Attributes | |
| static string | policy_target_name = "policy" |
Private Member Functions | |
| void | parse_attributes (const string &attr, RATTR &out) |
Private Attributes | |
| bool | _running |
| uint32_t | _commit_delay |
| ProtocolMap | _pmap |
| ProcessWatch | _process_watch |
| Configuration | _conf |
| FilterManager | _filter_manager |
The XORP Policy target.
This is the class that will be called to perform operation from the xrl target.
| PolicyTarget::PolicyTarget | ( | XrlStdRouter & | rtr | ) |
| rtr | Xrl router used by this XORP process. |
| void PolicyTarget::add_to_set | ( | const string & | type, |
| const string & | name, | ||
| const string & | element | ||
| ) |
| void PolicyTarget::birth | ( | const string & | tclass, |
| const string & | tinstance | ||
| ) |
Announce birth of a XORP process.
| tclass | target class. |
| tinstance | target instance of class. |
| void PolicyTarget::commit | ( | uint32_t | msec | ) |
Commit all configuration changes, but trigger a delayed update to the actual policy filters.
| msec | milliseconds after which policy filters should be updated. |
| void PolicyTarget::create_policy | ( | const string & | policy | ) |
Attempts to create a policy.
Exception is thrown on error.
| policy | name of policy to create. |
| void PolicyTarget::create_set | ( | const string & | name | ) |
Attempts to create a policy.
Exception is thrown on error.
| name | name of set to create. |
| void PolicyTarget::create_term | ( | const string & | policy, |
| const ConfigNodeId & | order, | ||
| const string & | term | ||
| ) |
Attempts to create a term.
Terms are appended in existing policies [currently no way of inserting a term in a specific position].
Exception is thrown on error.
| policy | policy in which term should be created. |
| order | node ID with position of term. |
| term | name of term to create. |
| void PolicyTarget::death | ( | const string & | tclass, |
| const string & | tinstance | ||
| ) |
Announce death of a XORP process.
| tclass | target class. |
| tinstance | target instance of class. |
| void PolicyTarget::delete_from_set | ( | const string & | type, |
| const string & | name, | ||
| const string & | element | ||
| ) |
| void PolicyTarget::delete_policy | ( | const string & | policy | ) |
Attempts to delete a policy.
Exception is thrown on error.
| policy | name of policy to delete. |
| void PolicyTarget::delete_set | ( | const string & | name | ) |
Attempts to delete a set.
Exception is thrown on error.
| name | name of set to create. |
| void PolicyTarget::delete_term | ( | const string & | policy, |
| const string & | term | ||
| ) |
Attempts to delete a term.
Exception is thrown on error.
| policy | policy in which term should be deleted. |
| term | name of the term. |
| string PolicyTarget::dump_state | ( | uint32_t | id | ) |
Dump internal state.
Use only for debugging.
| id | which part of the state to dump. |
| bool PolicyTarget::running | ( | ) |
| void PolicyTarget::set_proto_target | ( | const string & | protocol, |
| const string & | target | ||
| ) |
| void PolicyTarget::update_export | ( | const string & | protocol, |
| const string & | policies, | ||
| const string & | modifier | ||
| ) |
Updates the export policy list for a protocol and triggers a delayed commit.
| protocol | protocol for which to update imports. |
| policies | comma separated policy list. |
| void PolicyTarget::update_import | ( | const string & | protocol, |
| const string & | policies, | ||
| const string & | modifier | ||
| ) |
Updates the import policy list for a protocol and triggers a delayed commit.
| protocol | protocol for which to update imports. |
| policies | comma separated policy list. |
| void PolicyTarget::update_set | ( | const string & | type, |
| const string & | name, | ||
| const string & | elements | ||
| ) |
| void PolicyTarget::update_term_block | ( | const string & | policy, |
| const string & | term, | ||
| const uint32_t & | block, | ||
| const ConfigNodeId & | order, | ||
| const string & | statement | ||
| ) |