The MPLS route handler.
This class provides handler APIs to react to a MPLS route’s addition/deletion in the hardware.
Public Functions
Register to receive a notification when any MPLS route in the hardware gets deleted or added.
Legacy method to register to receive a notification when a particular single-label MPLS route with the given label is added to or removed from hardware.
Register to receive a notification when a particular MPLS route with the given label stack is added to or removed from hardware.
Legacy handler for when a single-label MPLS route is to be programmed into hardware or when it is assigned a new FEC ID. Note: Only one of the on_mpls_route_set methods should be implemented.
Handler when an MPLS route is to be programmed into hardware or when it is assigned a new FEC ID. Note: Only one of the on_mpls_route_set methods should be implemented.
Legacy handler for when a single-label MPLS route is deleted from hardware. Note: Only one of the on_mpls_route_del methods should be implemented.
Handler when an MPLS route is deleted from hardware. Note: Only one of the on_mpls_route_del methods should be implemented.
Handler that describes when an MPLS FEC is created or updated in hardware. This FEC represents a set of vias that one or more routes points to.
Handler called when an MPLS FEC is removed.
An iterator over configured MPLS routes.
Private Functions
Friends
An iterator over configured MPLS route vias.
Private Functions
Friends
An iterator over MPLS routes in hardware.
Private Functions
Friends
An iterator over MPLS route vias in hardware.
Private Functions
Friends
The IP static route manager.
Public Functions
Begin resync mode.
Complete resync mode, ready for regular updates.
Returns an iterator over configured MPLS routes.
Returns an iterator for MPLS routes in hardware.
Returns a configured MPLS vias iterator for a given route (key).
Legacy method that returns an iterator for MPLS vias in hardware for a given label.
Returns an iterator for MPLS vias in hardware for a given route key.
Returns an iterator for MPLS vias in hardware for a given MPLS FEC. The vias returned from this iterator are unbound, meaning they have an empty mpls_route_key_t.
Tests for existence of any routes matching the route key in the switch config.
Tests if the given via exists in the switch config.
MPLS route management functions.
Inserts or updates MPLS static route in the switch configuration
Removes the MPLS route and all vias matching the route key.
Adds a via to an mpls_route_t.
Removes a via from an mpls_route_t. When all vias are removed, the route still exists with no nexthop information.
Legacy method that returns the FEC ID corresponding to the given MPLS label if this route is programmed in hardware, or an empty mpls_fec_id_t otherwise.
Returns the FEC ID corresponding to the given MPLS route key if this route is programmed in hardware, or an empty mpls_fec_id_t otherwise. Note: The metric value in the route key is not used
Legacy method that returns the active metric that is being used in hardware to forward traffic for the given label, or 0 if the label does not have any active vias programmed.
Returns the active metric that is being used in hardware to forward traffic for the given MPLS route key, or 0 if the route key does not have any active vias programmed. Note: The metric value in the route key is not used
Protected Functions
Private Members
Friends
Typedefs
1..255; default/null is 0.
An MPLS route key is used for MPLS RIB configuration.
Public Functions
Constructor taking an ingress MPLS route label and a metric.
The MPLS label to match on ingress for this route.
A metric value between 0 and 255. If it is set to 0, the routing agent will assume a default metric value of 100.
Constructor taking a list of ingress MPLS route labels and a metric.
std::vector<mpls_label_t> The MPLS labels to match on ingress for this route.
A metric value between 0 and 255. If it is set to 0, the routing agent will assume a default metric value of 100.
Getter for ‘labels’: a list of labels ( [ TOP, ..., BOT ] ) to match on ingress route lookup. 0 is the null metric; valid MPLS routes must have a metric in range 1..255.
Setter for ‘labels’.
Getter for ‘metric’: the MPLS route metric. Lower metric routes are preferred.
Setter for ‘metric’.
Getter for the label to match on ingress route lookup. This API exists for legacy reasons, from when only one label could be matched.
Replaces the label stack with a new vector only containing the given top_label.
The hash function for type mpls_route_key_t.
Returns a string representation of the current object’s values.
Friends
A utility stream operator that adds a string representation of mpls_route_key_t to the ostream.
An MPLS v4/v6 static route.
Public Functions
Default value constructor.
MPLS route constructor taking an MPLS route key.
Getter for ‘key’: the MPLS route key.
Setter for ‘key’.
The hash function for type mpls_route_t.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of mpls_route_t to the ostream.
An MPLS route via, defining the action to take for a given MPLS route.
Public Functions
Getter for ‘hop’: IP v4/v6 nexthop address (for decap and IP forward).
Setter for ‘hop’.
Getter for ‘intf’: sets the nexthop interface. Use the named interface if not a default intf_id_t.
Setter for ‘intf’.
Getter for ‘pushswap_label’: push or swap this label.
Setter for ‘pushswap_label’.
Getter for ‘label_action’: perform this MPLS operation.
Setter for ‘label_action’.
Getter for ‘ttl_mode’: applies to push and pop.
Setter for ‘ttl_mode’.
Getter for ‘payload_type’: used to assign ethertype after final pop.
Setter for ‘payload_type’.
Getter for ‘skip_egress_acl’: set if matching packets should ignore the egress ACL.
Setter for ‘skip_egress_acl’.
Getter for ‘nexthop_group’: set when packets are forwarded into a nexthop- group.
Setter for ‘nexthop_group’.
The hash function for type mpls_route_via_t.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of mpls_route_via_t to the ostream.
Represents a forward equivalency class (FEC) for an MPLS route. One or more routes points to a FEC, and the FEC corresponds to a set of MPLS vias that are programmed into hardware.
Public Functions
Getter for ‘id’: the internal ID of this FEC. A value of 0 denotes that the FEC ID is not set.
Setter for ‘id’.
The hash function for type mpls_fec_id_t.
Returns a string representation of the current object’s values.
Private Members
Friends
A utility stream operator that adds a string representation of mpls_fec_id_t to the ostream.