FD.io VPP  v16.06
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_rx_trace_t
 
struct  udp_input_runtime_t
 

Macros

#define foreach_udp_input_next
 
#define udp_error(n, s)   s,
 

Enumerations

enum  udp_input_next_t { UDP_INPUT_N_NEXT }
 

Functions

u8format_udp_rx_trace (u8 *s, va_list *args)
 
always_inline uword udp46_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip4)
 
static uword udp4_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword udp6_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static void 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)
 
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

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...
 
static char * udp_error_strings []
 

Macro Definition Documentation

#define foreach_udp_input_next
Value:
_ (PUNT, "error-punt") \
_ (DROP, "error-drop")
DROP
Definition: error.def:41

Definition at line 26 of file udp_local.c.

#define udp_error (   n,
 
)    s,

Enumeration Type Documentation

Enumerator
UDP_INPUT_N_NEXT 

Definition at line 30 of file udp_local.c.

Function Documentation

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

Definition at line 353 of file udp_local.c.

+ Here is the caller graph for this function:

u8* format_udp_rx_trace ( u8 s,
va_list *  args 
)

Definition at line 42 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword udp46_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_ip4 
)

Definition at line 66 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword udp4_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 291 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword udp6_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 299 of file udp_local.c.

+ Here is the call graph for this function:

clib_error_t* udp_local_init ( vlib_main_t vm)

Definition at line 457 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 374 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void udp_setup_node ( vlib_main_t vm,
u32  node_index 
)
static

Definition at line 447 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_udp_header ( unformat_input_t input,
va_list *  args 
)

Definition at line 419 of file udp_local.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t udp4_input_node
Initial value:
= {
.function = udp4_input,
.name = "ip4-udp-lookup",
.vector_size = sizeof (u32),
.runtime_data_bytes = sizeof (udp_input_runtime_t),
.n_errors = UDP_N_ERROR,
.error_strings = udp_error_strings,
.n_next_nodes = UDP_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_buffer = format_udp_header,
.format_trace = format_udp_rx_trace,
.unformat_buffer = unformat_udp_header,
}
static char * udp_error_strings[]
Definition: udp_local.c:284
unsigned int u32
Definition: types.h:88
#define foreach_udp_input_next
Definition: udp_local.c:26
static uword udp4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: udp_local.c:291
uword unformat_udp_header(unformat_input_t *input, va_list *args)
Definition: udp_local.c:419
u8 * format_udp_rx_trace(u8 *s, va_list *args)
Definition: udp_local.c:42
format_function_t format_udp_header
Definition: format.h:94

(constructor) VLIB_REGISTER_NODE (udp4_input_node)

Definition at line 62 of file udp_local.c.

vlib_node_registration_t udp6_input_node
Initial value:
= {
.function = udp6_input,
.name = "ip6-udp-lookup",
.vector_size = sizeof (u32),
.runtime_data_bytes = sizeof (udp_input_runtime_t),
.n_errors = UDP_N_ERROR,
.error_strings = udp_error_strings,
.n_next_nodes = UDP_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_buffer = format_udp_header,
.format_trace = format_udp_rx_trace,
.unformat_buffer = unformat_udp_header,
}
static char * udp_error_strings[]
Definition: udp_local.c:284
unsigned int u32
Definition: types.h:88
#define foreach_udp_input_next
Definition: udp_local.c:26
static uword udp6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: udp_local.c:299
uword unformat_udp_header(unformat_input_t *input, va_list *args)
Definition: udp_local.c:419
u8 * format_udp_rx_trace(u8 *s, va_list *args)
Definition: udp_local.c:42
format_function_t format_udp_header
Definition: format.h:94

(constructor) VLIB_REGISTER_NODE (udp6_input_node)

Definition at line 63 of file udp_local.c.

char* udp_error_strings[]
static
Initial value:
= {
#define udp_error(n,s)
udp_error (NONE, "no error")
udp_error (NO_LISTENER, "no listener for dst port")
udp_error (LENGTH_ERROR, "UDP packets with length errors")
}
#define udp_error(n, s)

Definition at line 284 of file udp_local.c.

udp_main_t udp_main

Definition at line 24 of file udp_local.c.