FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
packet.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mpls_unicast_header_t
 

Macros

#define MPLS_EOS_BITS
 
#define FOR_EACH_MPLS_EOS_BIT(_eos)   for (_eos = MPLS_NON_EOS; _eos <= MPLS_EOS; _eos++)
 
#define MPLS_ENTRY_LABEL_OFFSET   0
 
#define MPLS_ENTRY_LABEL_SHIFT   12
 
#define MPLS_ENTRY_LABEL_MASK   0x000fffff
 
#define MPLS_ENTRY_LABEL_BITS   (MPLS_ENTRY_LABEL_MASK << MPLS_ENTRY_LABEL_SHIFT)
 
#define MPLS_ENTRY_EXP_OFFSET   2 /* byte offset to EXP bits */
 
#define MPLS_ENTRY_EXP_SHIFT   9
 
#define MPLS_ENTRY_EXP_MASK   0x07
 
#define MPLS_ENTRY_EXP(mpls)   (((mpls)>>MPLS_ENTRY_EXP_SHIFT) & MPLS_ENTRY_EXP_MASK)
 
#define MPLS_ENTRY_EXP_BITS   (MPLS_ENTRY_EXP_MASK << MPLS_ENTRY_EXP_SHIFT)
 
#define MPLS_ENTRY_EOS_OFFSET   2 /* byte offset to EOS bit */
 
#define MPLS_ENTRY_EOS_SHIFT   8
 
#define MPLS_ENTRY_EOS_MASK   0x01 /* EOS bit in its byte */
 
#define MPLS_ENTRY_EOS(mpls)   (((mpls) >> MPLS_ENTRY_EOS_SHIFT) & MPLS_ENTRY_EOS_MASK)
 
#define MPLS_ENTRY_EOS_BIT   (MPLS_ENTRY_EOS_MASK << MPLS_ENTRY_EOS_SHIFT)
 
#define MPLS_ENTRY_TTL_OFFSET   3 /* byte offset to ttl field */
 
#define MPLS_ENTRY_TTL_SHIFT   0
 
#define MPLS_ENTRY_TTL_MASK   0xff
 
#define MPLS_ENTRY_TTL(mpls)   (((mpls) >> MPLS_ENTRY_TTL_SHIFT) & MPLS_ENTRY_TTL_MASK)
 
#define MPLS_ENTRY_TTL_BITS   (MPLS_ENTRY_TTL_MASK << MPLS_ENTRY_TTL_SHIFT)
 

Typedefs

typedef u32 mpls_label_t
 A label value only, i.e. More...
 
typedef enum mpls_eos_bit_t_ mpls_eos_bit_t
 

Enumerations

enum  mpls_eos_bit_t_ { MPLS_NON_EOS = 0, MPLS_EOS = 1 }
 

Functions

static u32 vnet_mpls_uc_get_label (mpls_label_t label_exp_s_ttl)
 
static u32 vnet_mpls_uc_get_exp (mpls_label_t label_exp_s_ttl)
 
static u32 vnet_mpls_uc_get_s (mpls_label_t label_exp_s_ttl)
 
static u32 vnet_mpls_uc_get_ttl (mpls_label_t label_exp_s_ttl)
 
static void vnet_mpls_uc_set_label (mpls_label_t *label_exp_s_ttl, u32 value)
 
static void vnet_mpls_uc_set_exp (mpls_label_t *label_exp_s_ttl, u32 exp)
 
static void vnet_mpls_uc_set_s (mpls_label_t *label_exp_s_ttl, u32 eos)
 
static void vnet_mpls_uc_set_ttl (mpls_label_t *label_exp_s_ttl, u32 ttl)
 

Macro Definition Documentation

#define FOR_EACH_MPLS_EOS_BIT (   _eos)    for (_eos = MPLS_NON_EOS; _eos <= MPLS_EOS; _eos++)

Definition at line 45 of file packet.h.

#define MPLS_ENTRY_EOS (   mpls)    (((mpls) >> MPLS_ENTRY_EOS_SHIFT) & MPLS_ENTRY_EOS_MASK)

Definition at line 65 of file packet.h.

#define MPLS_ENTRY_EOS_BIT   (MPLS_ENTRY_EOS_MASK << MPLS_ENTRY_EOS_SHIFT)

Definition at line 67 of file packet.h.

#define MPLS_ENTRY_EOS_MASK   0x01 /* EOS bit in its byte */

Definition at line 64 of file packet.h.

#define MPLS_ENTRY_EOS_OFFSET   2 /* byte offset to EOS bit */

Definition at line 62 of file packet.h.

#define MPLS_ENTRY_EOS_SHIFT   8

Definition at line 63 of file packet.h.

#define MPLS_ENTRY_EXP (   mpls)    (((mpls)>>MPLS_ENTRY_EXP_SHIFT) & MPLS_ENTRY_EXP_MASK)

Definition at line 57 of file packet.h.

#define MPLS_ENTRY_EXP_BITS   (MPLS_ENTRY_EXP_MASK << MPLS_ENTRY_EXP_SHIFT)

Definition at line 59 of file packet.h.

#define MPLS_ENTRY_EXP_MASK   0x07

Definition at line 56 of file packet.h.

#define MPLS_ENTRY_EXP_OFFSET   2 /* byte offset to EXP bits */

Definition at line 54 of file packet.h.

#define MPLS_ENTRY_EXP_SHIFT   9

Definition at line 55 of file packet.h.

#define MPLS_ENTRY_LABEL_BITS   (MPLS_ENTRY_LABEL_MASK << MPLS_ENTRY_LABEL_SHIFT)

Definition at line 51 of file packet.h.

#define MPLS_ENTRY_LABEL_MASK   0x000fffff

Definition at line 50 of file packet.h.

#define MPLS_ENTRY_LABEL_OFFSET   0

Definition at line 48 of file packet.h.

#define MPLS_ENTRY_LABEL_SHIFT   12

Definition at line 49 of file packet.h.

#define MPLS_ENTRY_TTL (   mpls)    (((mpls) >> MPLS_ENTRY_TTL_SHIFT) & MPLS_ENTRY_TTL_MASK)

Definition at line 72 of file packet.h.

#define MPLS_ENTRY_TTL_BITS   (MPLS_ENTRY_TTL_MASK << MPLS_ENTRY_TTL_SHIFT)

Definition at line 74 of file packet.h.

#define MPLS_ENTRY_TTL_MASK   0xff

Definition at line 71 of file packet.h.

#define MPLS_ENTRY_TTL_OFFSET   3 /* byte offset to ttl field */

Definition at line 69 of file packet.h.

#define MPLS_ENTRY_TTL_SHIFT   0

Definition at line 70 of file packet.h.

#define MPLS_EOS_BITS
Value:
{ \
[MPLS_NON_EOS] = "neos", \
[MPLS_EOS] = "eos", \
}

Definition at line 40 of file packet.h.

Typedef Documentation

typedef u32 mpls_label_t

A label value only, i.e.

20bits.

Definition at line 24 of file packet.h.

Enumeration Type Documentation

Enumerator
MPLS_NON_EOS 
MPLS_EOS 

Definition at line 34 of file packet.h.

Function Documentation

static u32 vnet_mpls_uc_get_exp ( mpls_label_t  label_exp_s_ttl)
inlinestatic

Definition at line 82 of file packet.h.

+ Here is the caller graph for this function:

static u32 vnet_mpls_uc_get_label ( mpls_label_t  label_exp_s_ttl)
inlinestatic

Definition at line 77 of file packet.h.

+ Here is the caller graph for this function:

static u32 vnet_mpls_uc_get_s ( mpls_label_t  label_exp_s_ttl)
inlinestatic

Definition at line 87 of file packet.h.

+ Here is the caller graph for this function:

static u32 vnet_mpls_uc_get_ttl ( mpls_label_t  label_exp_s_ttl)
inlinestatic

Definition at line 92 of file packet.h.

+ Here is the caller graph for this function:

static void vnet_mpls_uc_set_exp ( mpls_label_t label_exp_s_ttl,
u32  exp 
)
inlinestatic

Definition at line 104 of file packet.h.

+ Here is the caller graph for this function:

static void vnet_mpls_uc_set_label ( mpls_label_t label_exp_s_ttl,
u32  value 
)
inlinestatic

Definition at line 97 of file packet.h.

+ Here is the caller graph for this function:

static void vnet_mpls_uc_set_s ( mpls_label_t label_exp_s_ttl,
u32  eos 
)
inlinestatic

Definition at line 111 of file packet.h.

+ Here is the caller graph for this function:

static void vnet_mpls_uc_set_ttl ( mpls_label_t label_exp_s_ttl,
u32  ttl 
)
inlinestatic

Definition at line 118 of file packet.h.

+ Here is the caller graph for this function: