Public Types |
| enum | PolicyType { IMPORT,
EXPORT
} |
|
typedef set< uint32_t > | TagSet |
|
typedef map< string, TagSet * > | TagMap |
Public Member Functions |
| | PolicyList (const string &p, PolicyType pt, PolicyMap &pmap, SetMap &smap, VarMap &vmap, string mod) |
| void | push_back (const string &policyname) |
| | Append a policy to the list.
|
| void | compile_policy (PolicyStatement &ps, Code::TargetSet &mod, uint32_t &tagstart, map< string, set< uint32_t > > &ptags) |
| | Compiles a specific policy.
|
| void | compile (Code::TargetSet &mod, uint32_t &tagstart, map< string, set< uint32_t > > &ptags) |
| | Compile all policies which were not previously compiled.
|
| string | str () |
| void | link_code (Code &ret) |
| | Link the all the code avialable in this policy list with code supplied.
|
| void | get_targets (Code::TargetSet &targets) |
| | Return all targets in this policy list.
|
| void | get_redist_tags (const string &protocol, Code::TagSet &ts) |
| | Return the policy tags used by a specific protocol for route redistribution.
|
Private Types |
|
typedef pair< string, CodeList * > | PolicyCode |
|
typedef list< PolicyCode > | PolicyCodeList |
|
typedef set< string > | POLICIES |
Private Member Functions |
| void | semantic_check (PolicyStatement &ps, VisitorSemantic::PolicyType type) |
| | Semantically check the policy for this instantiation.
|
| void | compile_import (PolicyCodeList::iterator &iter, PolicyStatement &ps, Code::TargetSet &modified_targets) |
| | Compile an import policy.
|
| void | compile_export (PolicyCodeList::iterator &iter, PolicyStatement &ps, Code::TargetSet &modified_targets, uint32_t &tagstart, map< string, set< uint32_t > > &ptags) |
| | Compile an export policy.
|
|
Term * | create_mod (Term::BLOCKS block) |
|
void | add_policy_expression (const string &exp) |
Private Attributes |
|
string | _protocol |
|
PolicyType | _type |
|
PolicyCodeList | _policies |
|
PolicyMap & | _pmap |
|
SetMap & | _smap |
|
VarMap & | _varmap |
|
string | _mod |
|
Term * | _mod_term |
|
Term * | _mod_term_import |
|
Term * | _mod_term_export |
|
POLICIES | _pe_policies |
Static Private Attributes |
|
static uint32_t | _pe = 0 |
The list of policies associated with a protocol.
This relates to the import/export directives of protocols.
Depending on what protocols support, they will normally have a single import/export policy list associated with them.
Each policy list is an instantiation of a policy, and thus it hold the specific code for this instantiation.