mpls¶
MPLS related type definitions.
-
namespace
eos
Variables
-
static mpls_label_t const
mpls_label_explicit_null_v4
= mpls_label_t(0)¶ MPLS reserved label definitions (0..15). See http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml
-
static mpls_label_t const
mpls_label_router_alert
= mpls_label_t(1)¶
-
static mpls_label_t const
mpls_label_explicit_null_v6
= mpls_label_t(2)¶
-
static mpls_label_t const
mpls_label_implicit_null
= mpls_label_t(3)¶
-
static mpls_label_t const
mpls_label_entropy_indicator
= mpls_label_t(7)¶
-
static mpls_label_t const
mpls_label_gal
= mpls_label_t(13)¶
-
static mpls_label_t const
mpls_label_oam_alert
= mpls_label_t(14)¶
-
static mpls_label_t const
Type definitions in mpls¶
-
namespace
eos
Enums
-
enum
mpls_action_t
¶ The action to take for an MPLS route.
Values:
-
enumerator
MPLS_ACTION_NULL
¶
-
enumerator
MPLS_ACTION_PUSH
¶
-
enumerator
MPLS_ACTION_POP
¶
-
enumerator
MPLS_ACTION_SWAP
¶
-
enumerator
MPLS_ACTION_FORWARD
¶
-
enumerator
-
enum
mpls_ttl_mode_t
¶ Whether to use the pipe or uniform TTL inheritance mode.
Values:
-
enumerator
MPLS_TTLMODE_NULL
¶
-
enumerator
MPLS_TTLMODE_PIPE
¶ pipe” mode, do not inherit TTL from inner IP.
-
enumerator
MPLS_TTLMODE_UNIFORM
¶ uniform” mode, inherit TTL from inner IP.
-
enumerator
-
enum
mpls_payload_type_t
¶ The inner payload type. Used in a similar way to ethertype, as MPLS does not provide this in the packet.
Values:
-
enumerator
MPLS_PAYLOAD_TYPE_NULL
¶
-
enumerator
MPLS_PAYLOAD_TYPE_MPLS
¶
-
enumerator
MPLS_PAYLOAD_TYPE_IPV4
¶
-
enumerator
MPLS_PAYLOAD_TYPE_IPV6
¶
-
enumerator
MPLS_PAYLOAD_TYPE_GUESS
¶
-
enumerator
-
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 Functions
-
explicit
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¶
-
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<<
(std::ostream &os, const mpls_label_t &obj)¶ A utility stream operator that adds a string representation of mpls_label_t to the ostream.
-
explicit
-
enum