mpls_route_impl¶
Warning
doxygenfile: Cannot find file “eos/mpls_route_impl.h
Type definitions in mpls_route_impl¶
-
namespace
eos
-
class
mpls_route_key_impl_t
- #include <mpls_route_impl.h>
An MPLS route key is used for MPLS RIB configuration.
Public Functions
-
mpls_route_key_impl_t
()
-
mpls_route_key_impl_t
(mpls_label_t top_label, mpls_route_metric_t metric) Constructor taking an ingress MPLS route label and a metric.
- Parameters
mpls_label_t
-The MPLS label to match on ingress for this route.
mpls_route_metric_t
-A metric value between 0 and 255. If it is set to 0, the routing agent will assume a default metric value of 100.
-
mpls_route_key_impl_t
(std::vector< mpls_label_t > const & labels, mpls_route_metric_t metric) Constructor taking a list of ingress MPLS route labels and a metric.
- Parameters
const
-std::vector<mpls_label_t> The MPLS labels to match on ingress for this route.
mpls_route_metric_t
-A metric value between 0 and 255. If it is set to 0, the routing agent will assume a default metric value of 100.
-
std::vector< mpls_label_t > const &
labels
() const 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.
-
void
labels_is
(std::vector< mpls_label_t > const & labels) Setter for ‘labels’.
-
void
label_set
(uint32_t index, mpls_label_t const & value)
-
void
label_del
(uint32_t index)
-
mpls_route_metric_t
metric
() const Getter for ‘metric’: the MPLS route metric. Lower metric routes are preferred.
-
void
metric_is
(mpls_route_metric_t metric) Setter for ‘metric’.
-
mpls_label_t
top_label
() const Getter for the label to match on ingress route lookup. This API exists for legacy reasons, from when only one label could be matched.
-
void
top_label_is
(mpls_label_t top_label) Replaces the label stack with a new vector only containing the given top_label.
-
bool
operator==
(mpls_route_key_impl_t const & other) const
-
bool
operator!=
(mpls_route_key_impl_t const & other) const
-
bool
operator<
(mpls_route_key_impl_t const & other) const
-
uint32_t
hash
() const The hash function for type mpls_route_key_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type mpls_route_key_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of mpls_route_key_t to the ostream.
-
-
class
mpls_route_impl_t
- #include <mpls_route_impl.h>
An MPLS v4/v6 static route.
Public Functions
-
mpls_route_impl_t
() Default value constructor.
-
mpls_route_impl_t
(mpls_route_key_t key) MPLS route constructor taking an MPLS route key.
-
mpls_route_key_t
key
() const Getter for ‘key’: the MPLS route key.
-
void
key_is
(mpls_route_key_t key) Setter for ‘key’.
-
bool
operator==
(mpls_route_impl_t const & other) const
-
bool
operator!=
(mpls_route_impl_t const & other) const
-
uint32_t
hash
() const The hash function for type mpls_route_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type mpls_route_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
mpls_route_key_t
key_
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of mpls_route_t to the ostream.
-
-
class
mpls_route_via_impl_t
- #include <mpls_route_impl.h>
An MPLS route via, defining the action to take for a given MPLS route.
Public Functions
-
mpls_route_via_impl_t
()
-
mpls_route_via_impl_t
(mpls_route_key_t route_key)
-
mpls_route_via_impl_t
(mpls_route_key_t route_key, mpls_action_t label_action)
-
mpls_route_key_t
route_key
() const
-
void
route_key_is
(mpls_route_key_t route_key)
-
ip_addr_t
hop
() const Getter for ‘hop’: IP v4/v6 nexthop address (for decap and IP forward).
-
void
hop_is
(ip_addr_t const & hop) Setter for ‘hop’.
-
intf_id_t
intf
() const Getter for ‘intf’: sets the nexthop interface. Use the named interface if not a default intf_id_t.
-
void
intf_is
(intf_id_t const & intf) Setter for ‘intf’.
-
mpls_label_t
pushswap_label
() const Getter for ‘pushswap_label’: push or swap this label.
-
void
pushswap_label_is
(mpls_label_t pushswap_label) Setter for ‘pushswap_label’.
-
mpls_action_t
label_action
() const Getter for ‘label_action’: perform this MPLS operation.
-
void
label_action_is
(mpls_action_t label_action) Setter for ‘label_action’.
-
mpls_ttl_mode_t
ttl_mode
() const Getter for ‘ttl_mode’: applies to push and pop.
-
void
ttl_mode_is
(mpls_ttl_mode_t ttl_mode) Setter for ‘ttl_mode’.
-
mpls_payload_type_t
payload_type
() const Getter for ‘payload_type’: used to assign ethertype after final pop.
-
void
payload_type_is
(mpls_payload_type_t payload_type) Setter for ‘payload_type’.
-
bool
skip_egress_acl
() const Getter for ‘skip_egress_acl’: set if matching packets should ignore the egress ACL.
-
void
skip_egress_acl_is
(bool skip_egress_acl) Setter for ‘skip_egress_acl’.
-
std::string
nexthop_group
() const Getter for ‘nexthop_group’: set when packets are forwarded into a nexthop- group.
-
void
nexthop_group_is
(std::string nexthop_group) Setter for ‘nexthop_group’.
-
bool
operator==
(mpls_route_via_impl_t const & other) const
-
bool
operator!=
(mpls_route_via_impl_t const & other) const
-
uint32_t
hash
() const The hash function for type mpls_route_via_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type mpls_route_via_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
mpls_route_key_t
route_key_
-
ip_addr_t
hop_
-
intf_id_t
intf_
-
mpls_label_t
pushswap_label_
-
mpls_action_t
label_action_
-
mpls_ttl_mode_t
ttl_mode_
-
mpls_payload_type_t
payload_type_
-
bool
skip_egress_acl_
-
std::string
nexthop_group_
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of mpls_route_via_t to the ostream.
-
-
class
mpls_fec_id_impl_t
- #include <mpls_route_impl.h>
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
-
mpls_fec_id_impl_t
()
-
mpls_fec_id_impl_t
(uint64_t id)
-
uint64_t
id
() const Getter for ‘id’: the internal ID of this FEC. A value of 0 denotes that the FEC ID is not set.
-
void
id_is
(uint64_t id) Setter for ‘id’.
-
bool
operator==
(mpls_fec_id_impl_t const & other) const
-
bool
operator!=
(mpls_fec_id_impl_t const & other) const
-
bool
operator<
(mpls_fec_id_impl_t const & other) const
-
uint32_t
hash
() const The hash function for type mpls_fec_id_t.
-
void
mix_me
(hash_mix & h) const The hash mix function for type mpls_fec_id_t.
-
std::string
to_string
() const Returns a string representation of the current object’s values.
Private Members
-
uint64_t
id_
Friends
-
friend std::ostream &
operator<<
A utility stream operator that adds a string representation of mpls_fec_id_t to the ostream.
-
-
class