FD.io VPP  v17.01-9-ge7dcee4
Vector Packet Processing
vxlan_gpe.h File Reference

VXLAN GPE definitions. More...

+ Include dependency graph for vxlan_gpe.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vxlan_gpe_tunnel_t
 Struct for VXLAN GPE tunnel. More...
 
struct  vxlan_gpe_main_t
 Struct for VXLAN GPE node state. More...
 
struct  vnet_vxlan_gpe_add_del_tunnel_args_t
 Struct for VXLAN GPE add/del args. More...
 

Macros

#define VXLAN_GPE_TUNNEL_IS_IPV4   1
 Flags for vxlan_gpe_tunnel_t. More...
 
#define foreach_vxlan_gpe_input_next
 next nodes for VXLAN GPE input More...
 
#define vxlan_gpe_error(n, s)   VXLAN_GPE_ERROR_##n,
 

Enumerations

enum  vxlan_gpe_input_next_t { VXLAN_GPE_INPUT_N_NEXT }
 struct for next nodes for VXLAN GPE input More...
 
enum  vxlan_gpe_input_error_t { vxlan_gpe_error, vxlan_gpe_error }
 struct for VXLAN GPE errors More...
 
enum  vxlan_gpe_encap_next_t { VXLAN_GPE_ENCAP_NEXT_IP4_LOOKUP, VXLAN_GPE_ENCAP_NEXT_IP6_LOOKUP, VXLAN_GPE_ENCAP_NEXT_DROP, VXLAN_GPE_ENCAP_N_NEXT }
 Struct for defining VXLAN GPE next nodes. More...
 

Functions

typedef CLIB_PACKED (struct{ip4_header_t ip4;udp_header_t udp;vxlan_gpe_header_t vxlan;}) ip4_vxlan_gpe_header_t
 VXLAN GPE header struct. More...
 
typedef CLIB_PACKED (struct{ip6_header_t ip6;udp_header_t udp;vxlan_gpe_header_t vxlan;}) ip6_vxlan_gpe_header_t
 
typedef CLIB_PACKED (struct{union{struct{u32 local;u32 remote;u32 vni;u32 pad;};u64 as_u64[2];};}) vxlan4_gpe_tunnel_key_t
 Key struct for IPv4 VXLAN GPE tunnel. More...
 
typedef CLIB_PACKED (struct{ip6_address_t local;ip6_address_t remote;u32 vni;}) vxlan6_gpe_tunnel_key_t
 Key struct for IPv6 VXLAN GPE tunnel. More...
 
u8format_vxlan_gpe_encap_trace (u8 *s, va_list *args)
 Trace of packets encapsulated in VXLAN GPE. More...
 
int vnet_vxlan_gpe_add_del_tunnel (vnet_vxlan_gpe_add_del_tunnel_args_t *a, u32 *sw_if_indexp)
 Add or Del a VXLAN GPE tunnel. More...
 
int vxlan4_gpe_rewrite (vxlan_gpe_tunnel_t *t, u32 extension_size, u8 protocol_override, uword encap_next_node)
 Calculate IPv4 VXLAN GPE rewrite header. More...
 
int vxlan6_gpe_rewrite (vxlan_gpe_tunnel_t *t, u32 extension_size, u8 protocol_override, uword encap_next_node)
 Calculate IPv6 VXLAN GPE rewrite header. More...
 
void vxlan_gpe_unregister_decap_protocol (u8 protocol_id, uword next_node_index)
 
void vxlan_gpe_register_decap_protocol (u8 protocol_id, uword next_node_index)
 

Variables

vxlan_gpe_main_t vxlan_gpe_main
 
vlib_node_registration_t vxlan_gpe_encap_node
 (constructor) VLIB_REGISTER_NODE (vxlan_gpe_encap_node) More...
 
vlib_node_registration_t vxlan4_gpe_input_node
 (constructor) VLIB_REGISTER_NODE (vxlan4_gpe_input_node) More...
 
vlib_node_registration_t vxlan6_gpe_input_node
 (constructor) VLIB_REGISTER_NODE (vxlan6_gpe_input_node) More...
 

Detailed Description

VXLAN GPE definitions.

Definition in file vxlan_gpe.h.

Macro Definition Documentation

#define foreach_vxlan_gpe_input_next
Value:
_(DROP, "error-drop") \
_(IP4_INPUT, "ip4-input") \
_(IP6_INPUT, "ip6-input") \
_(ETHERNET_INPUT, "ethernet-input")
DROP
Definition: error.def:41

next nodes for VXLAN GPE input

Definition at line 129 of file vxlan_gpe.h.

#define vxlan_gpe_error (   n,
 
)    VXLAN_GPE_ERROR_##n,

Definition at line 145 of file vxlan_gpe.h.

#define VXLAN_GPE_TUNNEL_IS_IPV4   1

Flags for vxlan_gpe_tunnel_t.

Definition at line 126 of file vxlan_gpe.h.

Enumeration Type Documentation

Struct for defining VXLAN GPE next nodes.

Enumerator
VXLAN_GPE_ENCAP_NEXT_IP4_LOOKUP 
VXLAN_GPE_ENCAP_NEXT_IP6_LOOKUP 
VXLAN_GPE_ENCAP_NEXT_DROP 
VXLAN_GPE_ENCAP_N_NEXT 

Definition at line 208 of file vxlan_gpe.h.

struct for VXLAN GPE errors

Enumerator
vxlan_gpe_error 
vxlan_gpe_error 

Definition at line 144 of file vxlan_gpe.h.

struct for next nodes for VXLAN GPE input

Enumerator
VXLAN_GPE_INPUT_N_NEXT 

Definition at line 136 of file vxlan_gpe.h.

Function Documentation

typedef CLIB_PACKED ( struct{ip4_header_t ip4;udp_header_t udp;vxlan_gpe_header_t vxlan;}  )

VXLAN GPE header struct.

typedef CLIB_PACKED ( struct{ip6_header_t ip6;udp_header_t udp;vxlan_gpe_header_t vxlan;}  )
typedef CLIB_PACKED ( struct{union{struct{u32 local;u32 remote;u32 vni;u32 pad;};u64 as_u64[2];};}  )

Key struct for IPv4 VXLAN GPE tunnel.

Key fields: local remote, vni all fields in NET byte order VNI shifted 8 bits

typedef CLIB_PACKED ( struct{ip6_address_t local;ip6_address_t remote;u32 vni;}  )

Key struct for IPv6 VXLAN GPE tunnel.

Key fields: local remote, vni all fields in NET byte order VNI shifted 8 bits

u8* format_vxlan_gpe_encap_trace ( u8 s,
va_list *  args 
)

Trace of packets encapsulated in VXLAN GPE.

Parameters
*s
*args
Returns
*s

Definition at line 66 of file encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_vxlan_gpe_add_del_tunnel ( vnet_vxlan_gpe_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Add or Del a VXLAN GPE tunnel.

Parameters
*a
*sw_if_index
Returns
rc

Definition at line 292 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vxlan4_gpe_rewrite ( vxlan_gpe_tunnel_t t,
u32  extension_size,
u8  protocol_override,
uword  encap_next_node 
)

Calculate IPv4 VXLAN GPE rewrite header.

Parameters
*t
Returns
rc

Definition at line 176 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vxlan6_gpe_rewrite ( vxlan_gpe_tunnel_t t,
u32  extension_size,
u8  protocol_override,
uword  encap_next_node 
)

Calculate IPv6 VXLAN GPE rewrite header.

Parameters
*t
Returns
rc

Definition at line 233 of file vxlan_gpe.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vxlan_gpe_register_decap_protocol ( u8  protocol_id,
uword  next_node_index 
)

Definition at line 645 of file decap.c.

+ Here is the caller graph for this function:

void vxlan_gpe_unregister_decap_protocol ( u8  protocol_id,
uword  next_node_index 
)

Definition at line 653 of file decap.c.

Variable Documentation

vlib_node_registration_t vxlan4_gpe_input_node

(constructor) VLIB_REGISTER_NODE (vxlan4_gpe_input_node)

Definition at line 689 of file decap.c.

vlib_node_registration_t vxlan6_gpe_input_node

(constructor) VLIB_REGISTER_NODE (vxlan6_gpe_input_node)

Definition at line 712 of file decap.c.

vlib_node_registration_t vxlan_gpe_encap_node

(constructor) VLIB_REGISTER_NODE (vxlan_gpe_encap_node)

Definition at line 370 of file encap.c.

vxlan_gpe_main_t vxlan_gpe_main

Definition at line 176 of file vxlan_gpe.h.