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 notification when any MPLS route in the hardware gets deleted or added.
Register to receive notification when a particular MPLS route is added to or removed from hardware.
Handler when a MPLS route is to be programmed into hardware or when it is assigned a new FEC ID.
Handler when a MPLS route is deleted from hardware.
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).
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.
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.
Given an MPLS label, this method returns the active metric that is being used in hardware to forward traffic, or 0 if the given label does not have any active vias programmed.
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.
Getter for ‘top_label’: the label to match on ingress route lookup. 0 is the null metric; valid MPLS routes must have a metric in range 1..255.
Setter for ‘top_label’.
Getter for ‘metric’: the MPLS route metric. Lower metric routes are preferred.
Setter for ‘metric’.
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’.
Getter for ‘persistent’: if true, this route is persisted in the startup- config.
Setter for ‘persistent’.
The hash function for type mpls_route_t.
Returns a string representation of the current object’s values.
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’.
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.