FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
gtpu.h File Reference
+ Include dependency graph for gtpu.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  gtpu_header_t
 
struct  gtpu_tunnel_t
 
struct  gtpu_main_t
 
struct  vnet_gtpu_add_mod_del_tunnel_args_t
 
struct  gtpu_encap_trace_t
 

Macros

#define GTPU_V1_HDR_LEN   8
 
#define GTPU_VER_MASK   (7<<5)
 
#define GTPU_PT_BIT   (1<<4)
 
#define GTPU_E_BIT   (1<<2)
 
#define GTPU_S_BIT   (1<<1)
 
#define GTPU_PN_BIT   (1<<0)
 
#define GTPU_E_S_PN_BIT   (7<<0)
 
#define GTPU_V1_VER   (1<<5)
 
#define GTPU_PT_GTP   (1<<4)
 
#define GTPU_TYPE_GTPU   255
 
#define foreach_gtpu_input_next
 
#define gtpu_error(n, s)   GTPU_ERROR_##n,
 
#define GTPU_DEL_TUNNEL   0
 
#define GTPU_ADD_TUNNEL   1
 
#define GTPU_UPD_TTEID   2
 

Enumerations

enum  gtpu_input_next_t { GTPU_INPUT_N_NEXT }
 
enum  gtpu_input_error_t { GTPU_N_ERROR }
 

Functions

typedef CLIB_PACKED (struct { ip4_header_t ip4;udp_header_t udp;gtpu_header_t gtpu;}) ip4_gtpu_header_t
 
typedef CLIB_PACKED (struct { ip6_header_t ip6;udp_header_t udp;gtpu_header_t gtpu;}) ip6_gtpu_header_t
 
typedef CLIB_PACKED (struct { union { struct { u32 src;u32 teid;};u64 as_u64;};}) gtpu4_tunnel_key_t
 
typedef CLIB_PACKED (struct { ip6_address_t src;u32 teid;}) gtpu6_tunnel_key_t
 
u8format_gtpu_encap_trace (u8 *s, va_list *args)
 
int vnet_gtpu_add_mod_del_tunnel (vnet_gtpu_add_mod_del_tunnel_args_t *a, u32 *sw_if_indexp)
 
void vnet_int_gtpu_bypass_mode (u32 sw_if_index, u8 is_ip6, u8 is_enable)
 
u32 vnet_gtpu_get_tunnel_index (u32 sw_if_index)
 
int vnet_gtpu_add_del_rx_flow (u32 hw_if_index, u32 t_imdex, int is_add)
 

Variables

gtpu_main_t gtpu_main
 
vlib_node_registration_t gtpu4_input_node
 (constructor) VLIB_REGISTER_NODE (gtpu4_input_node) More...
 
vlib_node_registration_t gtpu6_input_node
 (constructor) VLIB_REGISTER_NODE (gtpu6_input_node) More...
 
vlib_node_registration_t gtpu4_encap_node
 (constructor) VLIB_REGISTER_NODE (gtpu4_encap_node) More...
 
vlib_node_registration_t gtpu6_encap_node
 (constructor) VLIB_REGISTER_NODE (gtpu6_encap_node) More...
 
vlib_node_registration_t gtpu4_flow_input_node
 (constructor) VLIB_REGISTER_NODE (gtpu4_flow_input_node) More...
 

Macro Definition Documentation

◆ foreach_gtpu_input_next

#define foreach_gtpu_input_next
Value:
_(DROP, "error-drop") \
_(L2_INPUT, "l2-input") \
_(IP4_INPUT, "ip4-input") \
_(IP6_INPUT, "ip6-input" )

Definition at line 183 of file gtpu.h.

◆ GTPU_ADD_TUNNEL

#define GTPU_ADD_TUNNEL   1

Definition at line 260 of file gtpu.h.

◆ GTPU_DEL_TUNNEL

#define GTPU_DEL_TUNNEL   0

Definition at line 259 of file gtpu.h.

◆ GTPU_E_BIT

#define GTPU_E_BIT   (1<<2)

Definition at line 71 of file gtpu.h.

◆ GTPU_E_S_PN_BIT

#define GTPU_E_S_PN_BIT   (7<<0)

Definition at line 74 of file gtpu.h.

◆ gtpu_error

#define gtpu_error (   n,
 
)    GTPU_ERROR_##n,

Definition at line 199 of file gtpu.h.

◆ GTPU_PN_BIT

#define GTPU_PN_BIT   (1<<0)

Definition at line 73 of file gtpu.h.

◆ GTPU_PT_BIT

#define GTPU_PT_BIT   (1<<4)

Definition at line 70 of file gtpu.h.

◆ GTPU_PT_GTP

#define GTPU_PT_GTP   (1<<4)

Definition at line 78 of file gtpu.h.

◆ GTPU_S_BIT

#define GTPU_S_BIT   (1<<1)

Definition at line 72 of file gtpu.h.

◆ GTPU_TYPE_GTPU

#define GTPU_TYPE_GTPU   255

Definition at line 79 of file gtpu.h.

◆ GTPU_UPD_TTEID

#define GTPU_UPD_TTEID   2

Definition at line 261 of file gtpu.h.

◆ GTPU_V1_HDR_LEN

#define GTPU_V1_HDR_LEN   8

Definition at line 67 of file gtpu.h.

◆ GTPU_V1_VER

#define GTPU_V1_VER   (1<<5)

Definition at line 76 of file gtpu.h.

◆ GTPU_VER_MASK

#define GTPU_VER_MASK   (7<<5)

Definition at line 69 of file gtpu.h.

Enumeration Type Documentation

◆ gtpu_input_error_t

Enumerator
GTPU_N_ERROR 

Definition at line 197 of file gtpu.h.

◆ gtpu_input_next_t

Enumerator
GTPU_INPUT_N_NEXT 

Definition at line 189 of file gtpu.h.

Function Documentation

◆ CLIB_PACKED() [1/4]

typedef CLIB_PACKED ( struct { ip4_header_t ip4;udp_header_t udp;gtpu_header_t gtpu;}  )

◆ CLIB_PACKED() [2/4]

typedef CLIB_PACKED ( struct { ip6_address_t src;u32 teid;}  )

◆ CLIB_PACKED() [3/4]

typedef CLIB_PACKED ( struct { ip6_header_t ip6;udp_header_t udp;gtpu_header_t gtpu;}  )

◆ CLIB_PACKED() [4/4]

typedef CLIB_PACKED ( struct { union { struct { u32 src;u32 teid;};u64 as_u64;};}  )

◆ format_gtpu_encap_trace()

u8* format_gtpu_encap_trace ( u8 s,
va_list *  args 
)

Definition at line 52 of file gtpu.c.

◆ vnet_gtpu_add_del_rx_flow()

int vnet_gtpu_add_del_rx_flow ( u32  hw_if_index,
u32  t_imdex,
int  is_add 
)

Definition at line 1112 of file gtpu.c.

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

◆ vnet_gtpu_add_mod_del_tunnel()

int vnet_gtpu_add_mod_del_tunnel ( vnet_gtpu_add_mod_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Definition at line 353 of file gtpu.c.

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

◆ vnet_gtpu_get_tunnel_index()

u32 vnet_gtpu_get_tunnel_index ( u32  sw_if_index)

Definition at line 1151 of file gtpu.c.

+ Here is the caller graph for this function:

◆ vnet_int_gtpu_bypass_mode()

void vnet_int_gtpu_bypass_mode ( u32  sw_if_index,
u8  is_ip6,
u8  is_enable 
)

Definition at line 943 of file gtpu.c.

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

Variable Documentation

◆ gtpu4_encap_node

vlib_node_registration_t gtpu4_encap_node

(constructor) VLIB_REGISTER_NODE (gtpu4_encap_node)

Definition at line 687 of file gtpu_encap.c.

◆ gtpu4_flow_input_node

vlib_node_registration_t gtpu4_flow_input_node

(constructor) VLIB_REGISTER_NODE (gtpu4_flow_input_node)

Definition at line 1738 of file gtpu_decap.c.

◆ gtpu4_input_node

vlib_node_registration_t gtpu4_input_node
Initial value:
= {
.name = "gtpu4-input",
.vector_size = sizeof (u32),
.n_errors = GTPU_N_ERROR,
.error_strings = gtpu_error_strings,
.n_next_nodes = GTPU_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_gtpu_rx_trace,
}

(constructor) VLIB_REGISTER_NODE (gtpu4_input_node)

Definition at line 747 of file gtpu_decap.c.

◆ gtpu6_encap_node

vlib_node_registration_t gtpu6_encap_node

(constructor) VLIB_REGISTER_NODE (gtpu6_encap_node)

Definition at line 702 of file gtpu_encap.c.

◆ gtpu6_input_node

vlib_node_registration_t gtpu6_input_node
Initial value:
= {
.name = "gtpu6-input",
.vector_size = sizeof (u32),
.n_errors = GTPU_N_ERROR,
.error_strings = gtpu_error_strings,
.n_next_nodes = GTPU_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_gtpu_rx_trace,
}

(constructor) VLIB_REGISTER_NODE (gtpu6_input_node)

Definition at line 767 of file gtpu_decap.c.

◆ gtpu_main

gtpu_main_t gtpu_main

Definition at line 36 of file gtpu.c.

DROP
DROP
Definition: error.def:41
foreach_gtpu_input_next
#define foreach_gtpu_input_next
Definition: gtpu.h:183
GTPU_INPUT_N_NEXT
@ GTPU_INPUT_N_NEXT
Definition: gtpu.h:194
u32
unsigned int u32
Definition: types.h:88
format_gtpu_rx_trace
static u8 * format_gtpu_rx_trace(u8 *s, va_list *args)
Definition: gtpu_decap.c:31
gtpu_error_strings
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:740
GTPU_N_ERROR
@ GTPU_N_ERROR
Definition: gtpu.h:202