mpls¶
MPLS related type definitions.
- 
namespace eos
- Variables - 
mpls_label_t const mpls_label_explicit_null_v4
- MPLS reserved label definitions (0..15). See http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml 
 - 
mpls_label_t const mpls_label_router_alert
 - 
mpls_label_t const mpls_label_explicit_null_v6
 - 
mpls_label_t const mpls_label_implicit_null
 - 
mpls_label_t const mpls_label_entropy_indicator
 - 
mpls_label_t const mpls_label_gal
 - 
mpls_label_t const mpls_label_oam_alert
 
- 
mpls_label_t const 
Type definitions in mpls¶
- 
namespace eos
- Enums - mpls_action_t enum
- The action to take for an MPLS route. - Values: - MPLS_ACTION_NULL-
- MPLS_ACTION_PUSH-
- MPLS_ACTION_POP-
- MPLS_ACTION_SWAP-
- MPLS_ACTION_FORWARD-
 
 - mpls_ttl_mode_t enum
- Whether to use the pipe or uniform TTL inheritance mode. - Values: - MPLS_TTLMODE_NULL-
- MPLS_TTLMODE_PIPE-- pipe” mode, do not inherit TTL from inner IP. 
- MPLS_TTLMODE_UNIFORM-- uniform” mode, inherit TTL from inner IP. 
 
 - mpls_payload_type_t enum
- The inner payload type. Used in a similar way to ethertype, as MPLS does not provide this in the packet. - Values: - MPLS_PAYLOAD_TYPE_NULL-
- MPLS_PAYLOAD_TYPE_MPLS-
- MPLS_PAYLOAD_TYPE_IPV4-
- MPLS_PAYLOAD_TYPE_IPV6-
- MPLS_PAYLOAD_TYPE_GUESS-
 
 - 
class mpls_label_t
- #include <mpls.h>An MPLS label, per RFC 3032. Note: label id 0 (default value) is the explicit null label. LSRs receiving this label are expected to pop it and perform ultimate IP orwarding. MPLS label numbers are 20 bits in size, covering the range 0..1048575. Public Type - Anonymous enum
- Values: - MIN-
- MAX- = = 0xfffff-
- INVALID- = = 0x100000-
 
 Public Functions - 
mpls_label_t(uint32_t label)
 - 
mpls_label_t()
 - 
uint32_t label() const
- Getter for ‘label’: key for the route that this via is attached to. 
 - 
void label_is(uint32_t label)
- Setter for ‘label’. 
 - 
bool operator!() const
 - 
std::string to_string() const
- Returns a string representation of the MPLS label. 
 - 
bool operator==(mpls_label_t const & other) const
 - 
bool operator!=(mpls_label_t const & other) const
 - 
bool operator<(mpls_label_t const & other) const
 - 
uint32_t hash() const
- The hash function for type mpls_label_t. 
 - 
void mix_me(hash_mix & h) const
- The hash mix function for type mpls_label_t. 
 Private Members - 
uint32_t label_
 Friends - 
friend struct MplsLabelHelper
 - 
friend std::ostream & operator<<
- A utility stream operator that adds a string representation of mpls_label_t to the ostream.