FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  srv6_am_localsid_trace_t
 
struct  srv6_am_rewrite_trace_t
 

Macros

#define foreach_srv6_am_rewrite_counter
 

Enumerations

enum  srv6_am_rewrite_counters { SRV6_AM_REWRITE_N_COUNTERS }
 
enum  srv6_am_localsid_next_t { SRV6_AM_LOCALSID_NEXT_ERROR, SRV6_AM_LOCALSID_NEXT_REWRITE, SRV6_AM_LOCALSID_N_NEXT }
 
enum  srv6_am_rewrite_next_t { SRV6_AM_REWRITE_NEXT_ERROR, SRV6_AM_REWRITE_NEXT_LOOKUP, SRV6_AM_REWRITE_N_NEXT }
 

Functions

static u8format_srv6_am_localsid_trace (u8 *s, va_list *args)
 
static u8format_srv6_am_rewrite_trace (u8 *s, va_list *args)
 
static_always_inline void end_am_processing (vlib_buffer_t *b0, ip6_header_t *ip0, ip6_sr_header_t *sr0, ip6_sr_localsid_t *ls0, u32 *next0)
 SRv6 masquerading. More...
 
static uword srv6_am_localsid_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 Graph node for applying SRv6 masquerading. More...
 
static_always_inline void end_am_rewriting (vlib_node_runtime_t *node, vlib_buffer_t *b0, ip6_header_t *ip0, ip6_sr_header_t *sr0, u32 *next0)
 SRv6 de-masquerading. More...
 
static uword srv6_am_rewrite_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 Graph node for applying SRv6 de-masquerading. More...
 

Variables

vlib_node_registration_t srv6_am_rewrite_node
 (constructor) VLIB_REGISTER_NODE (srv6_am_rewrite_node) More...
 
static char * srv6_am_rewrite_counter_strings []
 
vlib_node_registration_t srv6_am_localsid_node
 (constructor) VLIB_REGISTER_NODE (srv6_am_localsid_node) More...
 

Macro Definition Documentation

◆ foreach_srv6_am_rewrite_counter

#define foreach_srv6_am_rewrite_counter
Value:
_(PROCESSED, "srv6-am rewritten packets") \
_(NO_SRH, "(Error) No SRH.")

Definition at line 62 of file node.c.

Enumeration Type Documentation

◆ srv6_am_localsid_next_t

Enumerator
SRV6_AM_LOCALSID_NEXT_ERROR 
SRV6_AM_LOCALSID_NEXT_REWRITE 
SRV6_AM_LOCALSID_N_NEXT 

Definition at line 83 of file node.c.

◆ srv6_am_rewrite_counters

Enumerator
SRV6_AM_REWRITE_N_COUNTERS 

Definition at line 66 of file node.c.

◆ srv6_am_rewrite_next_t

Enumerator
SRV6_AM_REWRITE_NEXT_ERROR 
SRV6_AM_REWRITE_NEXT_LOOKUP 
SRV6_AM_REWRITE_N_NEXT 

Definition at line 90 of file node.c.

Function Documentation

◆ end_am_processing()

static_always_inline void end_am_processing ( vlib_buffer_t b0,
ip6_header_t ip0,
ip6_sr_header_t sr0,
ip6_sr_localsid_t ls0,
u32 next0 
)

SRv6 masquerading.

Definition at line 104 of file node.c.

+ Here is the caller graph for this function:

◆ end_am_rewriting()

static_always_inline void end_am_rewriting ( vlib_node_runtime_t node,
vlib_buffer_t b0,
ip6_header_t ip0,
ip6_sr_header_t sr0,
u32 next0 
)

SRv6 de-masquerading.

Definition at line 238 of file node.c.

+ Here is the caller graph for this function:

◆ format_srv6_am_localsid_trace()

static u8* format_srv6_am_localsid_trace ( u8 s,
va_list *  args 
)
static

Definition at line 34 of file node.c.

◆ format_srv6_am_rewrite_trace()

static u8* format_srv6_am_rewrite_trace ( u8 s,
va_list *  args 
)
static

Definition at line 44 of file node.c.

◆ srv6_am_localsid_fn()

static uword srv6_am_localsid_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Graph node for applying SRv6 masquerading.

Definition at line 140 of file node.c.

+ Here is the call graph for this function:

◆ srv6_am_rewrite_fn()

static uword srv6_am_rewrite_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Graph node for applying SRv6 de-masquerading.

Definition at line 264 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ srv6_am_localsid_node

vlib_node_registration_t srv6_am_localsid_node
Initial value:
= {
.function = srv6_am_localsid_fn,
.name = "srv6-am-localsid",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AM_LOCALSID_N_NEXT,
.next_nodes = {
[SRV6_AM_LOCALSID_NEXT_REWRITE] = "ip6-rewrite",
[SRV6_AM_LOCALSID_NEXT_ERROR] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (srv6_am_localsid_node)

Definition at line 217 of file node.c.

◆ srv6_am_rewrite_counter_strings

char* srv6_am_rewrite_counter_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 74 of file node.c.

◆ srv6_am_rewrite_node

vlib_node_registration_t srv6_am_rewrite_node
Initial value:
= {
.function = srv6_am_rewrite_fn,
.name = "srv6-am-rewrite",
.vector_size = sizeof (u32),
.n_next_nodes = SRV6_AM_REWRITE_N_NEXT,
.next_nodes = {
[SRV6_AM_REWRITE_NEXT_LOOKUP] = "ip6-lookup",
[SRV6_AM_REWRITE_NEXT_ERROR] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (srv6_am_rewrite_node)

Definition at line 57 of file node.c.

SRV6_AM_LOCALSID_NEXT_ERROR
@ SRV6_AM_LOCALSID_NEXT_ERROR
Definition: node.c:85
SRV6_AM_LOCALSID_N_NEXT
@ SRV6_AM_LOCALSID_N_NEXT
Definition: node.c:87
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
foreach_srv6_am_rewrite_counter
#define foreach_srv6_am_rewrite_counter
Definition: node.c:62
srv6_am_localsid_fn
static uword srv6_am_localsid_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying SRv6 masquerading.
Definition: node.c:140
srv6_am_rewrite_fn
static uword srv6_am_rewrite_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Graph node for applying SRv6 de-masquerading.
Definition: node.c:264
SRV6_AM_LOCALSID_NEXT_REWRITE
@ SRV6_AM_LOCALSID_NEXT_REWRITE
Definition: node.c:86
SRV6_AM_REWRITE_NEXT_ERROR
@ SRV6_AM_REWRITE_NEXT_ERROR
Definition: node.c:92
SRV6_AM_REWRITE_N_NEXT
@ SRV6_AM_REWRITE_N_NEXT
Definition: node.c:94
format_srv6_am_localsid_trace
static u8 * format_srv6_am_localsid_trace(u8 *s, va_list *args)
Definition: node.c:34
SRV6_AM_REWRITE_N_COUNTERS
@ SRV6_AM_REWRITE_N_COUNTERS
Definition: node.c:71
format_srv6_am_rewrite_trace
static u8 * format_srv6_am_rewrite_trace(u8 *s, va_list *args)
Definition: node.c:44
SRV6_AM_REWRITE_NEXT_LOOKUP
@ SRV6_AM_REWRITE_NEXT_LOOKUP
Definition: node.c:93
u32
unsigned int u32
Definition: types.h:88
srv6_am_rewrite_counter_strings
static char * srv6_am_rewrite_counter_strings[]
Definition: node.c:74
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123