FD.io VPP  v19.04.4-rc0-5-ge88582fac
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

static u8format_ipsec_gre_tx_trace (u8 *s, va_list *args)
 
VNET_DEVICE_CLASS_TX_FN() ipsec_gre_device_class (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)
 
 VNET_HW_INTERFACE_CLASS (ipsec_gre_hw_interface_class)
 
static clib_error_tipsec_gre_init (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

◆ format_ipsec_gre_device()

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

Definition at line 339 of file ipsec_gre.c.

+ Here is the call graph for this function:

◆ format_ipsec_gre_tunnel_name()

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

Definition at line 332 of file ipsec_gre.c.

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

◆ format_ipsec_gre_tx_trace()

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

Definition at line 61 of file ipsec_gre.c.

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

◆ ipsec_gre_device_class()

VNET_DEVICE_CLASS_TX_FN() ipsec_gre_device_class ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

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.

Next Index:

  • Dispatches the packet to the esp-encrypt node.

Definition at line 99 of file ipsec_gre.c.

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

◆ ipsec_gre_init()

static clib_error_t* ipsec_gre_init ( vlib_main_t vm)
static

Definition at line 366 of file ipsec_gre.c.

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

◆ ipsec_gre_interface_admin_up_down()

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

Definition at line 319 of file ipsec_gre.c.

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

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( ipsec_gre_device_class  )
+ Here is the caller graph for this function:

◆ VNET_HW_INTERFACE_CLASS()

VNET_HW_INTERFACE_CLASS ( ipsec_gre_hw_interface_class  )
+ Here is the caller graph for this function:

Variable Documentation

◆ ipsec_gre_main

ipsec_gre_main_t ipsec_gre_main

Definition at line 28 of file ipsec_gre.c.