FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
udp.h File Reference
+ Include dependency graph for udp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  udp_connection_t
 
struct  udp_dst_port_info_t
 
struct  udp_main_t
 

Macros

#define udp_error(n, s)   UDP_ERROR_##n,
 
#define foreach_udp4_dst_port
 
#define foreach_udp6_dst_port
 

Enumerations

enum  udp_error_t { UDP_N_ERROR }
 
enum  udp_dst_port_t { foreach_udp6_dst_port }
 
enum  udp6_dst_port_t { foreach_udp6_dst_port }
 
enum  udp_af_t { UDP_IP6 = 0, UDP_IP4, N_UDP_AF }
 

Functions

static udp_connection_tudp_connection_get (u32 conn_index, u32 thread_index)
 
static udp_connection_tudp_listener_get (u32 conn_index)
 
static udp_main_tvnet_get_udp_main ()
 
static udp_connection_tudp_get_connection_from_transport (transport_connection_t *tc)
 
static u32 udp_connection_index (udp_connection_t *uc)
 
udp_connection_tudp_connection_alloc (u32 thread_index)
 
static void udp_pool_add_peeker (u32 thread_index)
 Acquires a lock that blocks a connection pool from expanding. More...
 
static void udp_pool_remove_peeker (u32 thread_index)
 
static udp_connection_tudp_connection_clone_safe (u32 connection_index, u32 thread_index)
 
static udp_dst_port_info_tudp_get_dst_port_info (udp_main_t *um, udp_dst_port_t dst_port, u8 is_ip4)
 
void udp_register_dst_port (vlib_main_t *vm, udp_dst_port_t dst_port, u32 node_index, u8 is_ip4)
 
void udp_unregister_dst_port (vlib_main_t *vm, udp_dst_port_t dst_port, u8 is_ip4)
 
bool udp_is_valid_dst_port (udp_dst_port_t dst_port, u8 is_ip4)
 
void udp_punt_unknown (vlib_main_t *vm, u8 is_ip4, u8 is_add)
 
static void * vlib_buffer_push_udp (vlib_buffer_t *b, u16 sp, u16 dp, u8 offload_csum)
 
static void ip_udp_fixup_one (vlib_main_t *vm, vlib_buffer_t *b0, u8 is_ip4)
 
static void ip_udp_encap_one (vlib_main_t *vm, vlib_buffer_t *b0, u8 *ec0, word ec_len, u8 is_ip4)
 
static void ip_udp_encap_two (vlib_main_t *vm, vlib_buffer_t *b0, vlib_buffer_t *b1, u8 *ec0, u8 *ec1, word ec_len, u8 is_v4)
 

Variables

udp_main_t udp_main
 
vlib_node_registration_t udp4_input_node
 (constructor) VLIB_REGISTER_NODE (udp4_input_node) More...
 
vlib_node_registration_t udp6_input_node
 (constructor) VLIB_REGISTER_NODE (udp6_input_node) More...
 
format_function_t format_udp_header
 
format_function_t format_udp_rx_trace
 
unformat_function_t unformat_udp_header
 

Macro Definition Documentation

◆ foreach_udp4_dst_port

#define foreach_udp4_dst_port
Value:
_ (53, dns) \
_ (67, dhcp_to_server) \
_ (68, dhcp_to_client) \
_ (500, ikev2) \
_ (2152, GTPU) \
_ (3784, bfd4) \
_ (3785, bfd_echo4) \
_ (4341, lisp_gpe) \
_ (4342, lisp_cp) \
_ (4500, ipsec) \
_ (4739, ipfix) \
_ (4789, vxlan) \
_ (4789, vxlan6) \
_ (48879, vxlan_gbp) \
_ (4790, VXLAN_GPE) \
_ (6633, vpath_3) \
_ (6081, geneve) \
_ (53053, dns_reply)

Definition at line 46 of file udp.h.

◆ foreach_udp6_dst_port

foreach_udp6_dst_port
Value:
_ (53, dns6) \
_ (547, dhcpv6_to_server) \
_ (546, dhcpv6_to_client) \
_ (2152, GTPU6) \
_ (3784, bfd6) \
_ (3785, bfd_echo6) \
_ (4341, lisp_gpe6) \
_ (4342, lisp_cp6) \
_ (48879, vxlan6_gbp) \
_ (4790, VXLAN6_GPE) \
_ (6633, vpath6_3) \
_ (6081, geneve6) \
_ (8138, BIER) \
_ (53053, dns_reply6)

Definition at line 67 of file udp.h.

◆ udp_error

#define udp_error (   n,
 
)    UDP_ERROR_##n,

Definition at line 31 of file udp.h.

Enumeration Type Documentation

◆ udp6_dst_port_t

Enumerator
foreach_udp6_dst_port 

Definition at line 90 of file udp.h.

◆ udp_af_t

enum udp_af_t
Enumerator
UDP_IP6 
UDP_IP4 
N_UDP_AF 

Definition at line 115 of file udp.h.

◆ udp_dst_port_t

Enumerator
foreach_udp6_dst_port 

Definition at line 83 of file udp.h.

◆ udp_error_t

Enumerator
UDP_N_ERROR 

Definition at line 29 of file udp.h.

Function Documentation

◆ ip_udp_encap_one()

static void ip_udp_encap_one ( vlib_main_t vm,
vlib_buffer_t b0,
u8 ec0,
word  ec_len,
u8  is_ip4 
)
inlinestatic

Definition at line 335 of file udp.h.

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

◆ ip_udp_encap_two()

static void ip_udp_encap_two ( vlib_main_t vm,
vlib_buffer_t b0,
vlib_buffer_t b1,
u8 ec0,
u8 ec1,
word  ec_len,
u8  is_v4 
)
inlinestatic

Definition at line 363 of file udp.h.

+ Here is the caller graph for this function:

◆ ip_udp_fixup_one()

static void ip_udp_fixup_one ( vlib_main_t vm,
vlib_buffer_t b0,
u8  is_ip4 
)
inlinestatic

Definition at line 281 of file udp.h.

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

◆ udp_connection_alloc()

udp_connection_t* udp_connection_alloc ( u32  thread_index)

Definition at line 26 of file udp.c.

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

◆ udp_connection_clone_safe()

static udp_connection_t* udp_connection_clone_safe ( u32  connection_index,
u32  thread_index 
)
inlinestatic

Definition at line 218 of file udp.h.

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

◆ udp_connection_get()

static udp_connection_t* udp_connection_get ( u32  conn_index,
u32  thread_index 
)
inlinestatic

Definition at line 153 of file udp.h.

+ Here is the caller graph for this function:

◆ udp_connection_index()

static u32 udp_connection_index ( udp_connection_t uc)
inlinestatic

Definition at line 179 of file udp.h.

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

◆ udp_get_connection_from_transport()

static udp_connection_t* udp_get_connection_from_transport ( transport_connection_t tc)
inlinestatic

Definition at line 173 of file udp.h.

+ Here is the caller graph for this function:

◆ udp_get_dst_port_info()

static udp_dst_port_info_t* udp_get_dst_port_info ( udp_main_t um,
udp_dst_port_t  dst_port,
u8  is_ip4 
)
inlinestatic

Definition at line 240 of file udp.h.

+ Here is the caller graph for this function:

◆ udp_is_valid_dst_port()

bool udp_is_valid_dst_port ( udp_dst_port_t  dst_port,
u8  is_ip4 
)

Definition at line 553 of file udp_local.c.

+ Here is the caller graph for this function:

◆ udp_listener_get()

static udp_connection_t* udp_listener_get ( u32  conn_index)
inlinestatic

Definition at line 161 of file udp.h.

+ Here is the caller graph for this function:

◆ udp_pool_add_peeker()

static void udp_pool_add_peeker ( u32  thread_index)
inlinestatic

Acquires a lock that blocks a connection pool from expanding.

Definition at line 190 of file udp.h.

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

◆ udp_pool_remove_peeker()

static void udp_pool_remove_peeker ( u32  thread_index)
inlinestatic

Definition at line 203 of file udp.h.

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

◆ udp_punt_unknown()

void udp_punt_unknown ( vlib_main_t vm,
u8  is_ip4,
u8  is_add 
)

Definition at line 569 of file udp_local.c.

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

◆ udp_register_dst_port()

void udp_register_dst_port ( vlib_main_t vm,
udp_dst_port_t  dst_port,
u32  node_index,
u8  is_ip4 
)

Definition at line 492 of file udp_local.c.

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

◆ udp_unregister_dst_port()

void udp_unregister_dst_port ( vlib_main_t vm,
udp_dst_port_t  dst_port,
u8  is_ip4 
)

Definition at line 530 of file udp_local.c.

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

◆ vlib_buffer_push_udp()

static void* vlib_buffer_push_udp ( vlib_buffer_t b,
u16  sp,
u16  dp,
u8  offload_csum 
)
inlinestatic

Definition at line 260 of file udp.h.

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

◆ vnet_get_udp_main()

static udp_main_t* vnet_get_udp_main ( )
inlinestatic

Definition at line 167 of file udp.h.

+ Here is the caller graph for this function:

Variable Documentation

◆ format_udp_header

format_function_t format_udp_header

Definition at line 246 of file udp.h.

◆ format_udp_rx_trace

format_function_t format_udp_rx_trace

Definition at line 247 of file udp.h.

◆ udp4_input_node

vlib_node_registration_t udp4_input_node

(constructor) VLIB_REGISTER_NODE (udp4_input_node)

Definition at line 307 of file udp_input.c.

◆ udp6_input_node

vlib_node_registration_t udp6_input_node

(constructor) VLIB_REGISTER_NODE (udp6_input_node)

Definition at line 333 of file udp_input.c.

◆ udp_main

udp_main_t udp_main

Definition at line 24 of file udp_local.c.

◆ unformat_udp_header

unformat_function_t unformat_udp_header

Definition at line 248 of file udp.h.