|
|
This is a specialized version of the import filter CodeGenerator.
It skips dest and action blocks in policies. The action block is replaced with the actual policy tagging.
typedef pair<bool, uint32_t> Taginfo | Taginfo |
typedef vector<Taginfo> Tags | Tags |
NoProtoSpec (class) | NoProtoSpec |
ProtoRedefined (class) | ProtoRedefined |
SourceMatchCodeGenerator (uint32_t tagstart, const VarMap& varmap)
| SourceMatchCodeGenerator |
Parameters:
tagstart | the first policy tag available. |
varmap | the varmap. |
const Element* visit_policy (PolicyStatement& policy)
| visit_policy |
Reimplemented from CodeGenerator.
const Element* visit_term (Term& term)
| visit_term |
Reimplemented from CodeGenerator.
const Element* visit_proto (NodeProto& node)
| visit_proto |
Reimplemented from CodeGenerator.
vector<Code*>& codes ()
| codes |
The targets of source match code may be multiple as different protocols may refer to different source terms. Thus many different code fragments may be generated.
Returns: seturn all the code fragments generated.
const Tags& tags ()
| tags |
[const]
The source match code generator will map source blocks to tags. If a source block is empty, a tag will not be used.
Returns: information about tags used.
uint32_t next_tag ()
| next_tag |
[const]
Returns: The next available policy tag.
const string& protocol ()
| protocol |
[protected]
Reimplemented from CodeGenerator.