Class map manipulation.
This module provides access to the management of class maps. Classification or “class” maps, provide a way for the network operator to classify packets arriving on an interface. Together with the policy_map_mgr in policy_map.h, classified traffic can drive policy features, such as PBR.
An iterator providing forwards only iteration over collections of class maps.
Private Functions
Friends
EOS class map manager.
This manager provides access to EOS traffic classifiers, or “class maps”. Class maps are referred to by policy maps (policy_map.h) to classify traffic that should be subject to the policy’s actions.
Public Functions
Resync mediates class map configuration into a known good state.
To start a resync, call resync_init() and then use the functions in the module to manipulate class maps like normal, setting them with class_map_is(). After all entries have been set, call resync_complete(), which will delete existing class_maps that were not added or modified during resync.
During resync, this manager will act like it is referencing a temporary table that starts off empty. Thus, methods like exist, del, and getters will act only on that temporary table, regardless of the real values in Sysdb. The one exception is iteration; they will traverse the table stored in Sysdb, regardless of whether or not the manager is in resync mode.
Completes any underway resync operation.
Returns true if and only if the provided key exists in the system config.
Returns the class map for the provided class map key. If there is no class map for the key, returns a default class_map_t
Sets a class map and commits its configuration.
Provides iteration over the configured class maps for a feature.
Deletes the class map specified.
Protected Functions
Private Members
Typedefs
Variables
A special class map name which means “match all MPLS traffic.”
Use as follows when defining a class_map_key_t:
eos::class_map_key_t key(eos::CLASS_MAP_MPLS_ANY, eos::POLICY_FEATURE_PBR); eos::class_map_t cm(key);
Only one such rule can be set on any one policy map.
A class map match rule uses an ACL to match classified traffic. Values of this type are returned from the class_map_rule_iter, to program class maps, either supply one of these or the acl_key_t directly to class_map_mgr’s class_map_rule_set().
Public Functions
Getter for ‘acl_key’: the ACL name and type to use as a class map match rule.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of class_map_rule_t to the ostream.
A class map classifies traffic to apply policy features to.
A class map can match IP or MPLS traffic. To match IP traffic, specify a class map matching one or more IPv4 ACLs (for PBR).
Public Functions
Getter for ‘key’: the class map key.
Setter for ‘key’.
Getter for ‘rules’: the sequence of class map rules.
Setter for ‘rules’.
inserts key/value pair to the map.
deletes the key/value pair from the map.
Getter for ‘persistent’: the persistence state for this class map.
When true, the class map will be stored in the running and startup configuration.
Setter for ‘persistent’.
Returns a string representation of the current object’s values.
Friends
A utility stream operator that adds a string representation of class_map_t to the ostream.