FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
udp_local.c File Reference
+ Include dependency graph for udp_local.c:

Go to the source code of this file.

Data Structures

struct  udp_local_rx_trace_t
 

Macros

#define UDP_NO_NODE_SET   ((u16) ~0)
 
#define udp_error(n, s)   s,
 

Enumerations

enum  udp_local_next_t { UDP_LOCAL_NEXT_PUNT, UDP_LOCAL_NEXT_DROP, UDP_LOCAL_NEXT_ICMP, UDP_LOCAL_N_NEXT }
 

Functions

u8format_udp_rx_trace (u8 *s, va_list *args)
 
static void udp_dispatch_error (vlib_node_runtime_t *node, vlib_buffer_t *b, u32 advance, u8 is_ip4, u32 *next)
 
static uword udp46_local_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4)
 
VLIB_NODE_FN() udp4_local_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() udp6_local_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
void udp_add_dst_port (udp_main_t *um, udp_dst_port_t dst_port, char *dst_port_name, 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)
 
u8 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)
 
uword unformat_udp_header (unformat_input_t *input, va_list *args)
 
static void udp_setup_node (vlib_main_t *vm, u32 node_index)
 
clib_error_tudp_local_init (vlib_main_t *vm)
 

Variables

static char * udp_error_strings []
 
vlib_node_registration_t udp4_local_node
 (constructor) VLIB_REGISTER_NODE (udp4_local_node) More...
 
vlib_node_registration_t udp6_local_node
 (constructor) VLIB_REGISTER_NODE (udp6_local_node) More...
 

Macro Definition Documentation

◆ udp_error

#define udp_error (   n,
 
)    s,

◆ UDP_NO_NODE_SET

#define UDP_NO_NODE_SET   ((u16) ~0)

Definition at line 39 of file udp_local.c.

Enumeration Type Documentation

◆ udp_local_next_t

Enumerator
UDP_LOCAL_NEXT_PUNT 
UDP_LOCAL_NEXT_DROP 
UDP_LOCAL_NEXT_ICMP 
UDP_LOCAL_N_NEXT 

Definition at line 24 of file udp_local.c.

Function Documentation

◆ format_udp_rx_trace()

u8* format_udp_rx_trace ( u8 s,
va_list *  args 
)

Definition at line 43 of file udp_local.c.

◆ udp46_local_inline()

static uword udp46_local_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_ip4 
)
inlinestatic

Definition at line 100 of file udp_local.c.

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

◆ udp4_local_node()

VLIB_NODE_FN() udp4_local_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 351 of file udp_local.c.

+ Here is the call graph for this function:

◆ udp6_local_node()

VLIB_NODE_FN() udp6_local_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 358 of file udp_local.c.

+ Here is the call graph for this function:

◆ udp_add_dst_port()

void udp_add_dst_port ( udp_main_t um,
udp_dst_port_t  dst_port,
char *  dst_port_name,
u8  is_ip4 
)

Definition at line 411 of file udp_local.c.

+ Here is the caller graph for this function:

◆ udp_dispatch_error()

static void udp_dispatch_error ( vlib_node_runtime_t node,
vlib_buffer_t b,
u32  advance,
u8  is_ip4,
u32 next 
)
inlinestatic

Definition at line 58 of file udp_local.c.

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

◆ udp_is_valid_dst_port()

u8 udp_is_valid_dst_port ( udp_dst_port_t  dst_port,
u8  is_ip4 
)

Definition at line 492 of file udp_local.c.

+ Here is the caller graph for this function:

◆ udp_local_init()

clib_error_t* udp_local_init ( vlib_main_t vm)

Definition at line 563 of file udp_local.c.

+ 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 508 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 431 of file udp_local.c.

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

◆ udp_setup_node()

static void udp_setup_node ( vlib_main_t vm,
u32  node_index 
)
static

Definition at line 552 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 469 of file udp_local.c.

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

◆ unformat_udp_header()

uword unformat_udp_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 525 of file udp_local.c.

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

Variable Documentation

◆ udp4_local_node

vlib_node_registration_t udp4_local_node
Initial value:
= {
.name = "ip4-udp-lookup",
.vector_size = sizeof (u32),
.n_errors = UDP_N_ERROR,
.error_strings = udp_error_strings,
.n_next_nodes = UDP_LOCAL_N_NEXT,
.next_nodes = {
[UDP_LOCAL_NEXT_PUNT]= "ip4-punt",
[UDP_LOCAL_NEXT_DROP]= "ip4-drop",
[UDP_LOCAL_NEXT_ICMP]= "ip4-icmp-error",
},
.format_buffer = format_udp_header,
.format_trace = format_udp_rx_trace,
.unformat_buffer = unformat_udp_header,
}

(constructor) VLIB_REGISTER_NODE (udp4_local_node)

Definition at line 366 of file udp_local.c.

◆ udp6_local_node

vlib_node_registration_t udp6_local_node
Initial value:
= {
.name = "ip6-udp-lookup",
.vector_size = sizeof (u32),
.n_errors = UDP_N_ERROR,
.error_strings = udp_error_strings,
.n_next_nodes = UDP_LOCAL_N_NEXT,
.next_nodes = {
[UDP_LOCAL_NEXT_PUNT]= "ip6-punt",
[UDP_LOCAL_NEXT_DROP]= "ip6-drop",
[UDP_LOCAL_NEXT_ICMP]= "ip6-icmp-error",
},
.format_buffer = format_udp_header,
.format_trace = format_udp_rx_trace,
.unformat_buffer = unformat_udp_header,
}

(constructor) VLIB_REGISTER_NODE (udp6_local_node)

Definition at line 388 of file udp_local.c.

◆ udp_error_strings

char* udp_error_strings[]
static
Initial value:
= {
#define udp_error(n,s)
}

Definition at line 345 of file udp_local.c.

unformat_udp_header
uword unformat_udp_header(unformat_input_t *input, va_list *args)
Definition: udp_local.c:525
format_udp_rx_trace
u8 * format_udp_rx_trace(u8 *s, va_list *args)
Definition: udp_local.c:43
format_udp_header
format_function_t format_udp_header
Definition: format.h:100
UDP_LOCAL_NEXT_PUNT
@ UDP_LOCAL_NEXT_PUNT
Definition: udp_local.c:26
udp_error_strings
static char * udp_error_strings[]
Definition: udp_local.c:345
UDP_N_ERROR
@ UDP_N_ERROR
Definition: udp.h:33
UDP_LOCAL_N_NEXT
@ UDP_LOCAL_N_NEXT
Definition: udp_local.c:29
u32
unsigned int u32
Definition: types.h:88
UDP_LOCAL_NEXT_DROP
@ UDP_LOCAL_NEXT_DROP
Definition: udp_local.c:27
UDP_LOCAL_NEXT_ICMP
@ UDP_LOCAL_NEXT_ICMP
Definition: udp_local.c:28