FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  gre_rx_trace_t
 
struct  gre_input_runtime_t
 

Macros

#define foreach_gre_input_next
 
#define gre_error(n, s)   s,
 

Enumerations

enum  gre_input_next_t { GRE_INPUT_N_NEXT }
 

Functions

u8format_gre_rx_trace (u8 *s, va_list *args)
 
static void gre_trace (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, u32 tun_sw_if_index, const ip6_header_t *ip6, const ip4_header_t *ip4, int is_ipv6)
 
static void gre_tunnel_get (const gre_main_t *gm, vlib_node_runtime_t *node, vlib_buffer_t *b, u16 *next, const gre_tunnel_key_t *key, gre_tunnel_key_t *cached_key, u32 *tun_sw_if_index, u32 *cached_tun_sw_if_index, int is_ipv6)
 
static uword gre_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, const int is_ipv6)
 
VLIB_NODE_FN() gre4_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() gre6_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
void gre_register_input_protocol (vlib_main_t *vm, gre_protocol_t protocol, u32 node_index, gre_tunnel_type_t tunnel_type)
 
static void gre_setup_node (vlib_main_t *vm, u32 node_index)
 
static clib_error_tgre_input_init (vlib_main_t *vm)
 

Variables

static char * gre_error_strings []
 
vlib_node_registration_t gre4_input_node
 (constructor) VLIB_REGISTER_NODE (gre4_input_node) More...
 
vlib_node_registration_t gre6_input_node
 (constructor) VLIB_REGISTER_NODE (gre6_input_node) More...
 

Macro Definition Documentation

◆ foreach_gre_input_next

#define foreach_gre_input_next
Value:
_(PUNT, "error-punt") \
_(DROP, "error-drop") \
_(ETHERNET_INPUT, "ethernet-input") \
_(IP4_INPUT, "ip4-input") \
_(IP6_INPUT, "ip6-input") \
_(MPLS_INPUT, "mpls-input")

Definition at line 24 of file node.c.

◆ gre_error

#define gre_error (   n,
 
)    s,

Enumeration Type Documentation

◆ gre_input_next_t

Enumerator
GRE_INPUT_N_NEXT 

Definition at line 32 of file node.c.

Function Documentation

◆ format_gre_rx_trace()

u8 * format_gre_rx_trace ( u8 s,
va_list *  args 
)

Definition at line 52 of file node.c.

◆ gre4_input_node()

VLIB_NODE_FN() gre4_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 438 of file node.c.

+ Here is the call graph for this function:

◆ gre6_input_node()

VLIB_NODE_FN() gre6_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 445 of file node.c.

+ Here is the call graph for this function:

◆ gre_input()

static uword gre_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
const int  is_ipv6 
)
inlinestatic

Definition at line 127 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gre_input_init()

static clib_error_t* gre_input_init ( vlib_main_t vm)
static

Definition at line 545 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gre_register_input_protocol()

void gre_register_input_protocol ( vlib_main_t vm,
gre_protocol_t  protocol,
u32  node_index,
gre_tunnel_type_t  tunnel_type 
)

Definition at line 504 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gre_setup_node()

static void gre_setup_node ( vlib_main_t vm,
u32  node_index 
)
static

Definition at line 534 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gre_trace()

static void gre_trace ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t b,
u32  tun_sw_if_index,
const ip6_header_t ip6,
const ip4_header_t ip4,
int  is_ipv6 
)
inlinestatic

Definition at line 74 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gre_tunnel_get()

static void gre_tunnel_get ( const gre_main_t gm,
vlib_node_runtime_t node,
vlib_buffer_t b,
u16 next,
const gre_tunnel_key_t key,
gre_tunnel_key_t cached_key,
u32 tun_sw_if_index,
u32 cached_tun_sw_if_index,
int  is_ipv6 
)
inlinestatic

Definition at line 100 of file node.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ gre4_input_node

vlib_node_registration_t gre4_input_node
Initial value:
= {
.name = "gre4-input",
.vector_size = sizeof (u32),
.n_errors = GRE_N_ERROR,
.error_strings = gre_error_strings,
.n_next_nodes = GRE_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_gre_rx_trace,
.unformat_buffer = unformat_gre_header,
}

(constructor) VLIB_REGISTER_NODE (gre4_input_node)

Definition at line 459 of file node.c.

◆ gre6_input_node

vlib_node_registration_t gre6_input_node
Initial value:
= {
.name = "gre6-input",
.vector_size = sizeof (u32),
.runtime_data_bytes = sizeof (gre_input_runtime_t),
.n_errors = GRE_N_ERROR,
.error_strings = gre_error_strings,
.n_next_nodes = GRE_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_gre_rx_trace,
.unformat_buffer = unformat_gre_header,
}

(constructor) VLIB_REGISTER_NODE (gre6_input_node)

Definition at line 479 of file node.c.

◆ gre_error_strings

char* gre_error_strings[]
static
Initial value:
= {
#define gre_error(n,s)
}

Definition at line 452 of file node.c.

DROP
DROP
Definition: error.def:41
gre_input_runtime_t
Definition: node.c:66
format_gre_rx_trace
u8 * format_gre_rx_trace(u8 *s, va_list *args)
Definition: node.c:52
GRE_N_ERROR
@ GRE_N_ERROR
Definition: gre.h:37
unformat_gre_header
unformat_function_t unformat_gre_header
Definition: gre.h:354
gre_error_strings
static char * gre_error_strings[]
Definition: node.c:452
foreach_gre_input_next
#define foreach_gre_input_next
Definition: node.c:24
u32
unsigned int u32
Definition: types.h:88
GRE_INPUT_N_NEXT
@ GRE_INPUT_N_NEXT
Definition: node.c:37
format_gre_header_with_length
format_function_t format_gre_header_with_length
Definition: gre.h:340