FD.io VPP  v18.04-17-g3a0d853
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
 

Macros

#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

#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 176 of file gtpu.h.

#define GTPU_E_BIT   (1<<2)

Definition at line 67 of file gtpu.h.

#define GTPU_E_S_PN_BIT   (7<<0)

Definition at line 70 of file gtpu.h.

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

Definition at line 192 of file gtpu.h.

#define GTPU_PN_BIT   (1<<0)

Definition at line 69 of file gtpu.h.

#define GTPU_PT_BIT   (1<<4)

Definition at line 66 of file gtpu.h.

#define GTPU_PT_GTP   (1<<4)

Definition at line 74 of file gtpu.h.

#define GTPU_S_BIT   (1<<1)

Definition at line 68 of file gtpu.h.

#define GTPU_TYPE_GTPU   255

Definition at line 75 of file gtpu.h.

#define GTPU_V1_VER   (1<<5)

Definition at line 72 of file gtpu.h.

#define GTPU_VER_MASK   (7<<5)

Definition at line 65 of file gtpu.h.

Enumeration Type Documentation

Enumerator
GTPU_N_ERROR 

Definition at line 190 of file gtpu.h.

Enumerator
GTPU_INPUT_N_NEXT 

Definition at line 182 of file gtpu.h.

Function Documentation

typedef CLIB_PACKED ( struct{ip4_header_t ip4;udp_header_t udp;gtpu_header_t gtpu;}  )
typedef CLIB_PACKED ( struct{ip6_header_t ip6;udp_header_t udp;gtpu_header_t gtpu;}  )
typedef CLIB_PACKED ( struct{union{struct{u32 src;u32 teid;};u64 as_u64;};}  )
typedef CLIB_PACKED ( struct{ip6_address_t src;u32 teid;}  )
u8* format_gtpu_encap_trace ( u8 s,
va_list *  args 
)

Definition at line 56 of file gtpu_encap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_gtpu_add_del_tunnel ( vnet_gtpu_add_del_tunnel_args_t a,
u32 sw_if_indexp 
)

Definition at line 360 of file gtpu.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 908 of file gtpu.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t gtpu4_encap_node

(constructor) VLIB_REGISTER_NODE (gtpu4_encap_node)

Definition at line 670 of file gtpu_encap.c.

vlib_node_registration_t gtpu4_input_node
Initial value:
= {
.function = gtpu4_input,
.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
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:803
static uword gtpu4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: gtpu_decap.c:788
#define foreach_gtpu_input_next
Definition: gtpu.h:176
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (gtpu4_input_node)

Definition at line 810 of file gtpu_decap.c.

vlib_node_registration_t gtpu6_encap_node

(constructor) VLIB_REGISTER_NODE (gtpu6_encap_node)

Definition at line 688 of file gtpu_encap.c.

vlib_node_registration_t gtpu6_input_node
Initial value:
= {
.function = gtpu6_input,
.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
static uword gtpu6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: gtpu_decap.c:796
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:803
#define foreach_gtpu_input_next
Definition: gtpu.h:176
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (gtpu6_input_node)

Definition at line 833 of file gtpu_decap.c.

gtpu_main_t gtpu_main

Definition at line 39 of file jvpp_gtpu.h.