class Term

A term is an atomic policy unit. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Public Static Methods


Detailed Description

It is a complete specification of how a route needs to be matched, and what actions must be taken.

enum BLOCKS { SOURCE = 0, DEST, ACTION, LAST_BLOCK }

BLOCKS

typedef ConfigNodeIdMap<Node*> Nodes

Nodes

term_syntax_error (class)

term_syntax_error

 Term (const string& name)

Term

Parameters:

nameterm name.
 ~Term ()

~Term

const string&  name ()

name

[const]

Returns: name of the term.

void  set_term_end ()

set_term_end

Perform operations at the end of the term.

void  set_block (const uint32_t& block, const ConfigNodeId& order, const string& statement)

set_block

Updates the source/dest/action block of a term.

Parameters:

blockthe block to update (0:source, 1:dest, 2:action).
ordernode ID with position of term.
statementthe statement to insert.
void  del_block (const uint32_t& block, const ConfigNodeId& order)

del_block

Deletes statements in the location specified by order and block.

Parameters:

blockthe block to update (0:source, 1:dest, 2:action).
ordernode ID with position of term.
void  set_block_end (uint32_t block)

set_block_end

Perform operations at the end of the block.

Parameters:

blockthe block to perform operations on (0:source, 1:dest, 2:action).
const Element*  accept (Visitor& v)

accept

Visitor implementation.

Parameters:

vvisitor used to visit this term.
Nodes&  source_nodes ()

source_nodes

Returns: parse tree of source block.

Nodes&  dest_nodes ()

dest_nodes

Returns: parse tree of dest block.

Nodes&  action_nodes ()

action_nodes

Returns: parse tree of action block.

string  block2str (uint32_t num)

block2str

[static]

Convert block number to human readable form.

Parameters:

numthe block number.

Returns: human readable representation of block name.

const string&  from_protocol ()

from_protocol

[const]

Get the protocol name (in the "from" block).

Returns: the protocol name (in the "from" block) if set, otherwise an empty string.

void  set_from_protocol (const string& v)

set_from_protocol

Set the protocol name (in the "from" block).

Parameters:

vthe protocol name (in the "from" block).

Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:02 2009, using kdoc 2.0a54+XORP.