FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
gre.c File Reference
+ Include dependency graph for gre.c:

Go to the source code of this file.

Data Structures

struct  ip4_and_gre_union_t
 IPv4 and GRE header union. More...
 
struct  ip6_and_gre_union_t
 
struct  gre_tx_trace_t
 

Macros

#define is_v4_packet(_h)   ((*(u8*) _h) & 0xF0) == 0x40
 

Functions

u8format_gre_tx_trace (u8 *s, va_list *args)
 
u8format_gre_protocol (u8 *s, va_list *args)
 
u8format_gre_header_with_length (u8 *s, va_list *args)
 
u8format_gre_header (u8 *s, va_list *args)
 
uword unformat_gre_protocol_host_byte_order (unformat_input_t *input, va_list *args)
 
uword unformat_gre_protocol_net_byte_order (unformat_input_t *input, va_list *args)
 
uword unformat_gre_header (unformat_input_t *input, va_list *args)
 
static int gre_proto_from_vnet_link (vnet_link_t link)
 
static u8gre_build_rewrite (vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
 
void gre4_fixup (vlib_main_t *vm, ip_adjacency_t *adj, vlib_buffer_t *b0)
 
void gre6_fixup (vlib_main_t *vm, ip_adjacency_t *adj, vlib_buffer_t *b0)
 
void gre_update_adj (vnet_main_t *vnm, u32 sw_if_index, adj_index_t ai)
 
static uword gre_interface_tx_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 TX function. More...
 
static uword gre_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword gre_teb_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_gre_tunnel_name (u8 *s, va_list *args)
 
static u8format_gre_tunnel_teb_name (u8 *s, va_list *args)
 
static u8format_gre_device (u8 *s, va_list *args)
 
 VNET_DEVICE_CLASS (gre_device_class)
 
 VLIB_DEVICE_TX_FUNCTION_MULTIARCH (gre_device_class, gre_interface_tx)
 
 VLIB_DEVICE_TX_FUNCTION_MULTIARCH (gre_device_teb_class, gre_teb_interface_tx)
 
static void add_protocol (gre_main_t *gm, gre_protocol_t protocol, char *protocol_name)
 
static clib_error_tgre_init (vlib_main_t *vm)
 
gre_main_tgre_get_main (vlib_main_t *vm)
 

Variables

gre_main_t gre_main
 

Macro Definition Documentation

#define is_v4_packet (   _h)    ((*(u8*) _h) & 0xF0) == 0x40

Definition at line 252 of file gre.c.

Function Documentation

static void add_protocol ( gre_main_t gm,
gre_protocol_t  protocol,
char *  protocol_name 
)
static

Definition at line 460 of file gre.c.

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

Definition at line 412 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_gre_header ( u8 s,
va_list *  args 
)

Definition at line 109 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_gre_header_with_length ( u8 s,
va_list *  args 
)

Definition at line 79 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_gre_protocol ( u8 s,
va_list *  args 
)

Definition at line 65 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 400 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 406 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_gre_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 52 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gre4_fixup ( vlib_main_t vm,
ip_adjacency_t adj,
vlib_buffer_t b0 
)

Definition at line 255 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gre6_fixup ( vlib_main_t vm,
ip_adjacency_t adj,
vlib_buffer_t b0 
)

Definition at line 270 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* gre_build_rewrite ( vnet_main_t vnm,
u32  sw_if_index,
vnet_link_t  link_type,
const void *  dst_address 
)
static

Definition at line 196 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

gre_main_t* gre_get_main ( vlib_main_t vm)

Definition at line 517 of file gre.c.

+ Here is the call graph for this function:

static clib_error_t* gre_init ( vlib_main_t vm)
static

Definition at line 478 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 385 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

TX function.

Only called L2. L3 traffic uses the adj-midchains

Definition at line 314 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int gre_proto_from_vnet_link ( vnet_link_t  link)
static

Definition at line 173 of file gre.c.

+ Here is the caller graph for this function:

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

Definition at line 393 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gre_update_adj ( vnet_main_t vnm,
u32  sw_if_index,
adj_index_t  ai 
)

Definition at line 286 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_gre_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 148 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_gre_protocol_host_byte_order ( unformat_input_t input,
va_list *  args 
)

Definition at line 117 of file gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_gre_protocol_net_byte_order ( unformat_input_t input,
va_list *  args 
)

Definition at line 137 of file gre.c.

+ Here is the call graph for this function:

VLIB_DEVICE_TX_FUNCTION_MULTIARCH ( gre_device_class  ,
gre_interface_tx   
)

Definition at line 433 of file gre.c.

+ Here is the call graph for this function:

VLIB_DEVICE_TX_FUNCTION_MULTIARCH ( gre_device_teb_class  ,
gre_teb_interface_tx   
)

Definition at line 448 of file gre.c.

+ Here is the call graph for this function:

VNET_DEVICE_CLASS ( gre_device_class  )

+ Here is the caller graph for this function:

Variable Documentation

gre_main_t gre_main

Definition at line 22 of file gre.c.