FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
ipsec_gre.c File Reference

L2-GRE over IPSec packet processing. More...

+ Include dependency graph for ipsec_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  ipsec_gre_tx_trace_t
 Packet trace. More...
 

Functions

u8format_ipsec_gre_tx_trace (u8 *s, va_list *args)
 
static uword ipsec_gre_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 IPSec-GRE tunnel interface tx function. More...
 
static clib_error_tipsec_gre_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static u8format_ipsec_gre_tunnel_name (u8 *s, va_list *args)
 
static u8format_ipsec_gre_device (u8 *s, va_list *args)
 
 VNET_DEVICE_CLASS (ipsec_gre_device_class)
 
 VLIB_DEVICE_TX_FUNCTION_MULTIARCH (ipsec_gre_device_class, ipsec_gre_interface_tx)
 
static clib_error_tipsec_gre_init (vlib_main_t *vm)
 
ipsec_gre_main_tipsec_gre_get_main (vlib_main_t *vm)
 

Variables

ipsec_gre_main_t ipsec_gre_main
 

Detailed Description

L2-GRE over IPSec packet processing.

Add GRE header to thr packet and send it to the esp-encrypt node.

Definition in file ipsec_gre.c.

Function Documentation

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

Definition at line 343 of file ipsec_gre.c.

+ Here is the call graph for this function:

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

Definition at line 336 of file ipsec_gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ipsec_gre_tx_trace ( u8 s,
va_list *  args 
)

Definition at line 57 of file ipsec_gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ipsec_gre_main_t* ipsec_gre_get_main ( vlib_main_t vm)

Definition at line 395 of file ipsec_gre.c.

+ Here is the call graph for this function:

static clib_error_t* ipsec_gre_init ( vlib_main_t vm)
static

Definition at line 372 of file ipsec_gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* ipsec_gre_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 323 of file ipsec_gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

IPSec-GRE tunnel interface tx function.

Add GRE header to the packet.

Parameters
vmvlib_main_t corresponding to the current thread.
nodevlib_node_runtime_t data for this node.
framevlib_frame_t whose contents should be dispatched.
Graph mechanics: buffer metadata, next index usage

Uses:

  • node->runtime_data
    • Match tunnel by rd->dev_instance in IPSec-GRE tunnels pool.

Sets:

  • vnet_buffer(b)->output_features.ipsec_sad_index
    • Set IPSec Security Association for packet encryption.
  • vnet_buffer(b)->sw_if_index[VLIB_TX]
    • Reset output sw_if_index.

Nexd Index:

  • Dispatches the packet to the esp-encrypt node.

Definition at line 96 of file ipsec_gre.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_DEVICE_TX_FUNCTION_MULTIARCH ( ipsec_gre_device_class  ,
ipsec_gre_interface_tx   
)

Definition at line 362 of file ipsec_gre.c.

VNET_DEVICE_CLASS ( ipsec_gre_device_class  )

+ Here is the caller graph for this function:

Variable Documentation

ipsec_gre_main_t ipsec_gre_main

Definition at line 25 of file ipsec_gre.c.