FD.io VPP  v19.08.3-2-gbabecb413
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
 
    Bits

Octets 8 7 6 5 4 3 2 1 1 Version PT (*) E S PN 2 Message Type 3 Length (1st Octet) 4 Length (2nd Octet) 5 Tunnel Endpoint Identifier (1st Octet) 6 Tunnel Endpoint Identifier (2nd Octet) 7 Tunnel Endpoint Identifier (3rd Octet) 8 Tunnel Endpoint Identifier (4th Octet) 9 Sequence Number (1st Octet)1) 4) 10 Sequence Number (2nd Octet)1) 4) 11 N-PDU Number2) 4) 12 Next Extension Header Type3) 4) More...

 
struct  gtpu_tunnel_t
 
struct  gtpu_main_t
 
struct  vnet_gtpu_add_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,
 

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_del_tunnel (vnet_gtpu_add_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)
 

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...
 

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" )
DROP
Definition: error.def:41

Definition at line 178 of file gtpu.h.

◆ GTPU_E_BIT

#define GTPU_E_BIT   (1<<2)

Definition at line 69 of file gtpu.h.

◆ GTPU_E_S_PN_BIT

#define GTPU_E_S_PN_BIT   (7<<0)

Definition at line 72 of file gtpu.h.

◆ gtpu_error

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

Definition at line 194 of file gtpu.h.

◆ GTPU_PN_BIT

#define GTPU_PN_BIT   (1<<0)

Definition at line 71 of file gtpu.h.

◆ GTPU_PT_BIT

#define GTPU_PT_BIT   (1<<4)

Definition at line 68 of file gtpu.h.

◆ GTPU_PT_GTP

#define GTPU_PT_GTP   (1<<4)

Definition at line 76 of file gtpu.h.

◆ GTPU_S_BIT

#define GTPU_S_BIT   (1<<1)

Definition at line 70 of file gtpu.h.

◆ GTPU_TYPE_GTPU

#define GTPU_TYPE_GTPU   255

Definition at line 77 of file gtpu.h.

◆ GTPU_V1_HDR_LEN

#define GTPU_V1_HDR_LEN   8

Definition at line 65 of file gtpu.h.

◆ GTPU_V1_VER

#define GTPU_V1_VER   (1<<5)

Definition at line 74 of file gtpu.h.

◆ GTPU_VER_MASK

#define GTPU_VER_MASK   (7<<5)

Definition at line 67 of file gtpu.h.

Enumeration Type Documentation

◆ gtpu_input_error_t

Enumerator
GTPU_N_ERROR 

Definition at line 192 of file gtpu.h.

◆ gtpu_input_next_t

Enumerator
GTPU_INPUT_N_NEXT 

Definition at line 184 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_header_t ip6;udp_header_t udp;gtpu_header_t gtpu;}  )

◆ CLIB_PACKED() [3/4]

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

◆ CLIB_PACKED() [4/4]

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

◆ format_gtpu_encap_trace()

u8* format_gtpu_encap_trace ( u8 s,
va_list *  args 
)

Definition at line 52 of file gtpu.c.

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

◆ vnet_gtpu_add_del_tunnel()

int vnet_gtpu_add_del_tunnel ( vnet_gtpu_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Definition at line 373 of file gtpu.c.

+ Here is the call graph for this function:
+ 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 929 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_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,
}
static u8 * format_gtpu_rx_trace(u8 *s, va_list *args)
Definition: gtpu_decap.c:32
unsigned int u32
Definition: types.h:88
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:754
#define foreach_gtpu_input_next
Definition: gtpu.h:178

(constructor) VLIB_REGISTER_NODE (gtpu4_input_node)

Definition at line 761 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,
}
static u8 * format_gtpu_rx_trace(u8 *s, va_list *args)
Definition: gtpu_decap.c:32
unsigned int u32
Definition: types.h:88
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:754
#define foreach_gtpu_input_next
Definition: gtpu.h:178

(constructor) VLIB_REGISTER_NODE (gtpu6_input_node)

Definition at line 781 of file gtpu_decap.c.

◆ gtpu_main

gtpu_main_t gtpu_main

Definition at line 36 of file gtpu.c.