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

Go to the source code of this file.

Data Structures

struct  arping_trace_t_
 

Macros

#define foreach_arping_error   _ (NONE, "no error")
 
#define foreach_arping
 

Typedefs

typedef struct arping_trace_t_ arping_trace_t
 

Enumerations

enum  arping__error_t { ARPING_N_ERROR }
 
enum  arping_next_t { ARPING_N_NEXT }
 
enum  arping6_next_t { ARPING6_N_NEXT }
 

Functions

typedef CLIB_PACKED (struct { mac_address_t mac;ip6_address_t ip6;})
 
static u8format_arping_trace (u8 *s, va_list *args)
 
static u8format_arping6_trace (u8 *s, va_list *args)
 
 while (n_left_from > 0)
 
 VNET_FEATURE_INIT (arping_feat_node, static)
 
 VNET_FEATURE_INIT (arping6_feat_node, static)
 
static clib_error_tarping_neighbor_advertisement (vlib_main_t *vm, arping_args_t *args)
 
static void arping_vnet_feature_enable_disable (vlib_main_t *vm, const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
 
static void arping_vec_validate (vlib_main_t *vm, u32 sw_if_index)
 
static clib_error_tarping_neighbor_probe_dst (vlib_main_t *vm, arping_args_t *args)
 
void arping_run_command (vlib_main_t *vm, arping_args_t *args)
 
static clib_error_tarping_ip_address (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tarping_cli_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

arping_main_t arping_main
 
static char * arping_error_strings []
 
 arping6_trace_t
 
vlib_main_tvm
 
vlib_main_t vlib_node_runtime_tnode
 
vlib_main_t vlib_node_runtime_t vlib_frame_tframe
 
arping_next_t next_index = node->cached_next_index
 
arping_main_tam = &arping_main
 
 n_left_from = frame->n_vectors
 
 from = vlib_frame_vector_args (frame)
 
return frame n_vectors
 
vlib_node_registration_t arping_input_node
 (constructor) VLIB_REGISTER_NODE (arping_input_node) More...
 
vlib_node_registration_t arping6_input_node
 (constructor) VLIB_REGISTER_NODE (arping6_input_node) More...
 
static vlib_cli_command_t arping_command
 (constructor) VLIB_CLI_COMMAND (arping_command) More...
 

Macro Definition Documentation

◆ foreach_arping

#define foreach_arping
Value:
_ (DROP, "error-drop") \
_ (IO, "interface-output")

Definition at line 44 of file arping.c.

◆ foreach_arping_error

#define foreach_arping_error   _ (NONE, "no error")

Definition at line 28 of file arping.c.

Typedef Documentation

◆ arping_trace_t

Enumeration Type Documentation

◆ arping6_next_t

Enumerator
ARPING6_N_NEXT 

Definition at line 63 of file arping.c.

◆ arping__error_t

Enumerator
ARPING_N_ERROR 

Definition at line 30 of file arping.c.

◆ arping_next_t

Enumerator
ARPING_N_NEXT 

Definition at line 48 of file arping.c.

Function Documentation

◆ arping_cli_init()

static clib_error_t* arping_cli_init ( vlib_main_t vm)
static

Definition at line 776 of file arping.c.

+ Here is the call graph for this function:

◆ arping_ip_address()

static clib_error_t* arping_ip_address ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 643 of file arping.c.

+ Here is the call graph for this function:

◆ arping_neighbor_advertisement()

static clib_error_t* arping_neighbor_advertisement ( vlib_main_t vm,
arping_args_t args 
)
static

Definition at line 489 of file arping.c.

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

◆ arping_neighbor_probe_dst()

static clib_error_t* arping_neighbor_probe_dst ( vlib_main_t vm,
arping_args_t args 
)
static

Definition at line 549 of file arping.c.

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

◆ arping_run_command()

void arping_run_command ( vlib_main_t vm,
arping_args_t args 
)

Definition at line 634 of file arping.c.

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

◆ arping_vec_validate()

static void arping_vec_validate ( vlib_main_t vm,
u32  sw_if_index 
)
static

Definition at line 536 of file arping.c.

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

◆ arping_vnet_feature_enable_disable()

static void arping_vnet_feature_enable_disable ( vlib_main_t vm,
const char *  arc_name,
const char *  node_name,
u32  sw_if_index,
int  enable_disable,
void *  feature_config,
u32  n_feature_config_bytes 
)
static

Definition at line 523 of file arping.c.

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

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { mac_address_t mac;ip6_address_t ip6;}  )

Definition at line 71 of file arping.c.

◆ format_arping6_trace()

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

Definition at line 99 of file arping.c.

+ Here is the call graph for this function:

◆ format_arping_trace()

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

Definition at line 85 of file arping.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( arping6_feat_node  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( arping_feat_node  ,
static   
)

◆ while()

while ( n_left_from  ,
 
)

Definition at line 123 of file arping.c.

+ Here is the call graph for this function:

Variable Documentation

◆ am

Definition at line 117 of file arping.c.

◆ arping6_input_node

vlib_node_registration_t arping6_input_node
Initial value:
=
{
.name = "arping6-input",.vector_size = sizeof (u32),.format_trace =
ARPING_N_ERROR,.error_strings = arping_error_strings,.n_next_nodes =
ARPING_N_NEXT,.next_nodes =
{
[ARPING6_NEXT_DROP] = "error-drop",[ARPING6_NEXT_IO] = "interface-output",}
,}

(constructor) VLIB_REGISTER_NODE (arping6_input_node)

Definition at line 472 of file arping.c.

◆ arping6_trace_t

arping6_trace_t

Definition at line 81 of file arping.c.

◆ arping_command

vlib_cli_command_t arping_command
static
Initial value:
= {
.path = "arping",
.function = arping_ip_address,
.short_help = "arping [gratuitous] {addr} {interface}"
" [interval {sec}] [repeat {cnt}]",
.is_mp_safe = 1,
}

(constructor) VLIB_CLI_COMMAND (arping_command)

Definition at line 767 of file arping.c.

◆ arping_error_strings

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

Definition at line 38 of file arping.c.

◆ arping_input_node

vlib_node_registration_t arping_input_node
Initial value:
=
{
.name = "arping-input",.vector_size = sizeof (u32),.format_trace =
ARPING_N_ERROR,.error_strings = arping_error_strings,.n_next_nodes =
ARPING_N_NEXT,.next_nodes =
{
[ARPING_NEXT_DROP] = "error-drop",[ARPING_NEXT_IO] = "interface-output",}
,}

(constructor) VLIB_REGISTER_NODE (arping_input_node)

Definition at line 268 of file arping.c.

◆ arping_main

arping_main_t arping_main

Definition at line 26 of file arping.c.

◆ frame

Initial value:
{
u32 n_left_from, *from, *to_next, n_left_to_next

Definition at line 114 of file arping.c.

◆ from

Definition at line 121 of file arping.c.

◆ n_left_from

n_left_from = frame->n_vectors

Definition at line 120 of file arping.c.

◆ n_vectors

return frame n_vectors

Definition at line 265 of file arping.c.

◆ next_index

next_index = node->cached_next_index

Definition at line 116 of file arping.c.

◆ node

Definition at line 113 of file arping.c.

◆ vm

Definition at line 113 of file arping.c.

DROP
DROP
Definition: error.def:41
ARPING_N_NEXT
@ ARPING_N_NEXT
Definition: arping.c:53
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
foreach_arping_error
#define foreach_arping_error
Definition: arping.c:28
format_arping6_trace
static u8 * format_arping6_trace(u8 *s, va_list *args)
Definition: arping.c:99
ARPING_N_ERROR
@ ARPING_N_ERROR
Definition: arping.c:35
arping_ip_address
static clib_error_t * arping_ip_address(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: arping.c:643
from
from
Definition: arping.c:121
u32
unsigned int u32
Definition: types.h:88
n_left_from
n_left_from
Definition: arping.c:120
format_arping_trace
static u8 * format_arping_trace(u8 *s, va_list *args)
Definition: arping.c:85
arping_error_strings
static char * arping_error_strings[]
Definition: arping.c:38