FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
ip_neighbor.c File Reference
+ Include dependency graph for ip_neighbor.c:

Go to the source code of this file.

Data Structures

struct  ip_neighbor_scan_config_t
 

Macros

#define IP_NEIGHBOR_DEF_SCAN_INTERVAL   (60.0)
 
#define IP_NEIGHBOR_DEF_MAX_PROC_TIME   (20e-6)
 
#define IP_NEIGHBOR_DEF_SCAN_INT_DELAY   (1e-3)
 
#define IP_NEIGHBOR_DEF_STALE   (4*IP_NEIGHBOR_DEF_SCAN_INTERVAL)
 
#define IP_NEIGHBOR_DEF_MAX_UPDATE   10
 

Functions

int ip_neighbor_add (const ip46_address_t *ip, u8 is_ip6, const u8 *mac, u32 sw_if_index, ip_neighbor_flags_t flags, u32 *stats_index)
 
int ip_neighbor_del (const ip46_address_t *ip, u8 is_ip6, u32 sw_if_index)
 
void ip_neighbor_scan_enable_disable (ip_neighbor_scan_arg_t *arg)
 
static_always_inline u32 ip_neighbor_scan (vlib_main_t *vm, f64 start_time, u32 start_idx, u8 is_ip6, u8 delete_stale, u8 *update_count)
 
static uword neighbor_scan_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static clib_error_tip_neighbor_scan_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8format_ip_scan_mode (u8 *s, va_list *args)
 
static clib_error_tshow_ip_neighbor_scan (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static ip_neighbor_scan_config_t ip_neighbor_scan_conf
 
static vlib_node_registration_t neighbor_scan_process_node
 (constructor) VLIB_REGISTER_NODE (neighbor_scan_process_node) More...
 
static vlib_cli_command_t ip_scan_neighbor_command
 (constructor) VLIB_CLI_COMMAND (ip_scan_neighbor_command) More...
 
static vlib_cli_command_t show_ip_scan_neighbor_command
 (constructor) VLIB_CLI_COMMAND (show_ip_scan_neighbor_command) More...
 

Macro Definition Documentation

◆ IP_NEIGHBOR_DEF_MAX_PROC_TIME

#define IP_NEIGHBOR_DEF_MAX_PROC_TIME   (20e-6)

Definition at line 33 of file ip_neighbor.c.

◆ IP_NEIGHBOR_DEF_MAX_UPDATE

#define IP_NEIGHBOR_DEF_MAX_UPDATE   10

Definition at line 36 of file ip_neighbor.c.

◆ IP_NEIGHBOR_DEF_SCAN_INT_DELAY

#define IP_NEIGHBOR_DEF_SCAN_INT_DELAY   (1e-3)

Definition at line 34 of file ip_neighbor.c.

◆ IP_NEIGHBOR_DEF_SCAN_INTERVAL

#define IP_NEIGHBOR_DEF_SCAN_INTERVAL   (60.0)

Definition at line 32 of file ip_neighbor.c.

◆ IP_NEIGHBOR_DEF_STALE

#define IP_NEIGHBOR_DEF_STALE   (4*IP_NEIGHBOR_DEF_SCAN_INTERVAL)

Definition at line 35 of file ip_neighbor.c.

Function Documentation

◆ format_ip_scan_mode()

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

Definition at line 418 of file ip_neighbor.c.

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

◆ ip_neighbor_add()

int ip_neighbor_add ( const ip46_address_t *  ip,
u8  is_ip6,
const u8 mac,
u32  sw_if_index,
ip_neighbor_flags_t  flags,
u32 stats_index 
)

Definition at line 51 of file ip_neighbor.c.

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

◆ ip_neighbor_del()

int ip_neighbor_del ( const ip46_address_t *  ip,
u8  is_ip6,
u32  sw_if_index 
)

Definition at line 101 of file ip_neighbor.c.

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

◆ ip_neighbor_scan()

static_always_inline u32 ip_neighbor_scan ( vlib_main_t vm,
f64  start_time,
u32  start_idx,
u8  is_ip6,
u8  delete_stale,
u8 update_count 
)

Definition at line 148 of file ip_neighbor.c.

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

◆ ip_neighbor_scan_cli()

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

Definition at line 307 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_scan_enable_disable()

void ip_neighbor_scan_enable_disable ( ip_neighbor_scan_arg_t arg)

Definition at line 124 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ neighbor_scan_process()

static uword neighbor_scan_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 237 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ show_ip_neighbor_scan()

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

Definition at line 434 of file ip_neighbor.c.

+ Here is the call graph for this function:

Variable Documentation

◆ ip_neighbor_scan_conf

ip_neighbor_scan_config_t ip_neighbor_scan_conf
static

Definition at line 48 of file ip_neighbor.c.

◆ ip_scan_neighbor_command

vlib_cli_command_t ip_scan_neighbor_command
static
Initial value:
= {
.path = "ip scan-neighbor",
.function = ip_neighbor_scan_cli,
.short_help = "ip scan-neighbor [ip4|ip6|both|disable] [interval <n-min>] [max-time <n-usec>] [max-update <n>] [delay <n-msec>] [stale <n-min>]",
.is_mp_safe = 1,
}
static clib_error_t * ip_neighbor_scan_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:307

(constructor) VLIB_CLI_COMMAND (ip_scan_neighbor_command)

Definition at line 409 of file ip_neighbor.c.

◆ neighbor_scan_process_node

vlib_node_registration_t neighbor_scan_process_node
static
Initial value:
= {
.function = neighbor_scan_process,
.name = "ip-neighbor-scan-process",
}
static uword neighbor_scan_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: ip_neighbor.c:237

(constructor) VLIB_REGISTER_NODE (neighbor_scan_process_node)

Definition at line 299 of file ip_neighbor.c.

◆ show_ip_scan_neighbor_command

vlib_cli_command_t show_ip_scan_neighbor_command
static
Initial value:
= {
.path = "show ip scan-neighbor",
.function = show_ip_neighbor_scan,
.short_help = "show ip scan-neighbor",
.is_mp_safe = 1,
}
static clib_error_t * show_ip_neighbor_scan(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:434

(constructor) VLIB_CLI_COMMAND (show_ip_scan_neighbor_command)

Definition at line 466 of file ip_neighbor.c.