FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
icmp4.c File Reference
+ Include dependency graph for icmp4.c:

Go to the source code of this file.

Data Structures

struct  icmp4_main_t
 
struct  pg_icmp46_header_t
 

Enumerations

enum  icmp_input_next_t { ICMP_INPUT_NEXT_ERROR, ICMP_INPUT_N_NEXT, ICMP_INPUT_NEXT_PUNT, ICMP_INPUT_N_NEXT }
 
enum  ip4_icmp_error_next_t { IP4_ICMP_ERROR_NEXT_DROP, IP4_ICMP_ERROR_NEXT_LOOKUP, IP4_ICMP_ERROR_N_NEXT }
 

Functions

static u8format_ip4_icmp_type_and_code (u8 *s, va_list *args)
 
static u8format_ip4_icmp_header (u8 *s, va_list *args)
 
static u8format_icmp_input_trace (u8 *s, va_list *va)
 
static uword ip4_icmp_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_icmp_echo_request (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8 icmp4_icmp_type_to_error (u8 type)
 
static uword ip4_icmp_error (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword unformat_icmp_type_and_code (unformat_input_t *input, va_list *args)
 
static void icmp4_pg_edit_function (pg_main_t *pg, pg_stream_t *s, pg_edit_group_t *g, u32 *packets, u32 n_packets)
 
static void pg_icmp_header_init (pg_icmp46_header_t *p)
 
static uword unformat_pg_icmp_header (unformat_input_t *input, va_list *args)
 
void ip4_icmp_register_type (vlib_main_t *vm, icmp4_type_t type, u32 node_index)
 
static clib_error_ticmp4_init (vlib_main_t *vm)
 

Variables

static char * icmp_error_strings []
 
icmp4_main_t icmp4_main
 
static vlib_node_registration_t ip4_icmp_input_node
 (constructor) VLIB_REGISTER_NODE (ip4_icmp_input_node) More...
 
static vlib_node_registration_t ip4_icmp_echo_request_node
 (constructor) VLIB_REGISTER_NODE (ip4_icmp_echo_request_node) More...
 
vlib_node_registration_t ip4_icmp_error_node
 (constructor) VLIB_REGISTER_NODE (ip4_icmp_error_node) More...
 

Enumeration Type Documentation

◆ icmp_input_next_t

Enumerator
ICMP_INPUT_NEXT_ERROR 
ICMP_INPUT_N_NEXT 
ICMP_INPUT_NEXT_PUNT 
ICMP_INPUT_N_NEXT 

Definition at line 120 of file icmp4.c.

◆ ip4_icmp_error_next_t

Enumerator
IP4_ICMP_ERROR_NEXT_DROP 
IP4_ICMP_ERROR_NEXT_LOOKUP 
IP4_ICMP_ERROR_N_NEXT 

Definition at line 417 of file icmp4.c.

Function Documentation

◆ format_icmp_input_trace()

static u8* format_icmp_input_trace ( u8 s,
va_list *  va 
)
static

Definition at line 108 of file icmp4.c.

+ Here is the call graph for this function:

◆ format_ip4_icmp_header()

static u8* format_ip4_icmp_header ( u8 s,
va_list *  args 
)
static

Definition at line 91 of file icmp4.c.

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

◆ format_ip4_icmp_type_and_code()

static u8* format_ip4_icmp_type_and_code ( u8 s,
va_list *  args 
)
static

Definition at line 51 of file icmp4.c.

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

◆ icmp4_icmp_type_to_error()

static u8 icmp4_icmp_type_to_error ( u8  type)
static

Definition at line 425 of file icmp4.c.

+ Here is the caller graph for this function:

◆ icmp4_init()

static clib_error_t* icmp4_init ( vlib_main_t vm)
static

Definition at line 745 of file icmp4.c.

+ Here is the call graph for this function:

◆ icmp4_pg_edit_function()

static void icmp4_pg_edit_function ( pg_main_t pg,
pg_stream_t s,
pg_edit_group_t g,
u32 packets,
u32  n_packets 
)
static

Definition at line 621 of file icmp4.c.

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

◆ ip4_icmp_echo_request()

static uword ip4_icmp_echo_request ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 222 of file icmp4.c.

+ Here is the call graph for this function:

◆ ip4_icmp_error()

static uword ip4_icmp_error ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 441 of file icmp4.c.

+ Here is the call graph for this function:

◆ ip4_icmp_input()

static uword ip4_icmp_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 139 of file icmp4.c.

+ Here is the call graph for this function:

◆ ip4_icmp_register_type()

void ip4_icmp_register_type ( vlib_main_t vm,
icmp4_type_t  type,
u32  node_index 
)

Definition at line 728 of file icmp4.c.

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

◆ pg_icmp_header_init()

static void pg_icmp_header_init ( pg_icmp46_header_t p)
inlinestatic

Definition at line 664 of file icmp4.c.

+ Here is the caller graph for this function:

◆ unformat_icmp_type_and_code()

static uword unformat_icmp_type_and_code ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 596 of file icmp4.c.

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

◆ unformat_pg_icmp_header()

static uword unformat_pg_icmp_header ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 675 of file icmp4.c.

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

Variable Documentation

◆ icmp4_main

icmp4_main_t icmp4_main

Definition at line 136 of file icmp4.c.

◆ icmp_error_strings

char* icmp_error_strings[]
static
Initial value:
= {
#define _(f,s)
}

Definition at line 44 of file icmp4.c.

◆ ip4_icmp_echo_request_node

vlib_node_registration_t ip4_icmp_echo_request_node
static
Initial value:
= {
.function = ip4_icmp_echo_request,
.name = "ip4-icmp-echo-request",
.vector_size = sizeof (u32),
.format_trace = format_icmp_input_trace,
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-load-balance",
},
}
static u8 * format_icmp_input_trace(u8 *s, va_list *va)
Definition: icmp4.c:108
unsigned int u32
Definition: types.h:88
static uword ip4_icmp_echo_request(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: icmp4.c:222

(constructor) VLIB_REGISTER_NODE (ip4_icmp_echo_request_node)

Definition at line 402 of file icmp4.c.

◆ ip4_icmp_error_node

vlib_node_registration_t ip4_icmp_error_node
Initial value:
= {
.function = ip4_icmp_error,
.name = "ip4-icmp-error",
.vector_size = sizeof (u32),
.error_strings = icmp_error_strings,
.n_next_nodes = IP4_ICMP_ERROR_N_NEXT,
.next_nodes = {
[IP4_ICMP_ERROR_NEXT_DROP] = "ip4-drop",
[IP4_ICMP_ERROR_NEXT_LOOKUP] = "ip4-lookup",
},
.format_trace = format_icmp_input_trace,
}
static uword ip4_icmp_error(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: icmp4.c:441
static u8 * format_icmp_input_trace(u8 *s, va_list *va)
Definition: icmp4.c:108
static char * icmp_error_strings[]
Definition: icmp4.c:44
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:63

(constructor) VLIB_REGISTER_NODE (ip4_icmp_error_node)

Definition at line 576 of file icmp4.c.

◆ ip4_icmp_input_node

vlib_node_registration_t ip4_icmp_input_node
static
Initial value:
= {
.function = ip4_icmp_input,
.name = "ip4-icmp-input",
.vector_size = sizeof (u32),
.format_trace = format_icmp_input_trace,
.error_strings = icmp_error_strings,
.n_next_nodes = 1,
.next_nodes = {
[ICMP_INPUT_NEXT_ERROR] = "ip4-punt",
},
}
static u8 * format_icmp_input_trace(u8 *s, va_list *va)
Definition: icmp4.c:108
static char * icmp_error_strings[]
Definition: icmp4.c:44
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:63
static uword ip4_icmp_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: icmp4.c:139

(constructor) VLIB_REGISTER_NODE (ip4_icmp_input_node)

Definition at line 203 of file icmp4.c.