FD.io VPP  v21.06-3-gbb25fbf28
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_elt_t_
 
struct  ip_neighbor_db_t_
 
struct  ip_neighbor_del_all_ctx_t_
 
struct  ip_neighbor_sweep_ctx_t_
 
struct  ip_neighbor_walk_covered_ctx_t_
 
struct  ip_neighbor_table_bind_ctx_t_
 

Macros

#define IP_NEIGHBOR_DBG(...)   vlib_log_debug (ipn_logger, __VA_ARGS__);
 
#define IP_NEIGHBOR_INFO(...)   vlib_log_notice (ipn_logger, __VA_ARGS__);
 
#define IP_NEIGHBOR_PROCESS_SLEEP_LONG   (0)
 

Typedefs

typedef struct ip_neighbor_elt_t_ ip_neighbor_elt_t
 
typedef struct ip_neighbor_db_t_ ip_neighbor_db_t
 
typedef struct ip_neighbor_del_all_ctx_t_ ip_neighbor_del_all_ctx_t
 
typedef struct ip_neighbor_sweep_ctx_t_ ip_neighbor_sweep_ctx_t
 
typedef struct ip_neighbor_walk_covered_ctx_t_ ip_neighbor_walk_covered_ctx_t
 
typedef struct ip_neighbor_table_bind_ctx_t_ ip_neighbor_table_bind_ctx_t
 
typedef enum ip_neighbor_age_state_t_ ip_neighbor_age_state_t
 
typedef enum ip_neighbor_process_event_t_ ip_neighbor_process_event_t
 

Enumerations

enum  ip_neighbor_age_state_t_ { IP_NEIGHBOR_AGE_ALIVE, IP_NEIGHBOR_AGE_PROBE, IP_NEIGHBOR_AGE_DEAD }
 
enum  ip_neighbor_process_event_t_ { IP_NEIGHBOR_AGE_PROCESS_WAKEUP }
 

Functions

ip_neighbor_tip_neighbor_get (index_t ipni)
 
static index_t ip_neighbor_get_index (const ip_neighbor_t *ipn)
 
static void ip_neighbor_touch (ip_neighbor_t *ipn)
 
static bool ip_neighbor_is_dynamic (const ip_neighbor_t *ipn)
 
const ip_address_tip_neighbor_get_ip (const ip_neighbor_t *ipn)
 
ip_address_family_t ip_neighbor_get_af (const ip_neighbor_t *ipn)
 
const mac_address_tip_neighbor_get_mac (const ip_neighbor_t *ipn)
 
const u32 ip_neighbor_get_sw_if_index (const ip_neighbor_t *ipn)
 
static void ip_neighbor_list_remove (ip_neighbor_t *ipn)
 
static void ip_neighbor_refresh (ip_neighbor_t *ipn)
 
static void ip_neighbor_db_add (const ip_neighbor_t *ipn)
 
static void ip_neighbor_db_remove (const ip_neighbor_t *ipn)
 
static ip_neighbor_tip_neighbor_db_find (const ip_neighbor_key_t *key)
 
static u8 ip_af_type_pfx_len (ip_address_family_t type)
 
static void ip_neighbor_adj_fib_add (ip_neighbor_t *ipn, u32 fib_index)
 
static void ip_neighbor_adj_fib_remove (ip_neighbor_t *ipn, u32 fib_index)
 
static void ip_neighbor_mk_complete (adj_index_t ai, ip_neighbor_t *ipn)
 
static void ip_neighbor_mk_incomplete (adj_index_t ai)
 
static adj_walk_rc_t ip_neighbor_mk_complete_walk (adj_index_t ai, void *ctx)
 
static adj_walk_rc_t ip_neighbor_mk_incomplete_walk (adj_index_t ai, void *ctx)
 
static void ip_neighbor_destroy (ip_neighbor_t *ipn)
 
static bool ip_neighbor_force_reuse (ip_address_family_t af)
 
static ip_neighbor_tip_neighbor_alloc (const ip_neighbor_key_t *key, const mac_address_t *mac, ip_neighbor_flags_t flags)
 
int ip_neighbor_add (const ip_address_t *ip, const mac_address_t *mac, u32 sw_if_index, ip_neighbor_flags_t flags, u32 *stats_index)
 
int ip_neighbor_del (const ip_address_t *ip, u32 sw_if_index)
 
static walk_rc_t ip_neighbor_del_all_walk_cb (index_t ipni, void *arg)
 
void ip_neighbor_del_all (ip_address_family_t af, u32 sw_if_index)
 
void ip_neighbor_update (vnet_main_t *vnm, adj_index_t ai)
 
void ip_neighbor_learn (const ip_neighbor_learn_t *l)
 
static clib_error_tip_neighbor_cmd (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static int ip_neighbor_sort (void *a1, void *a2)
 
static index_tip_neighbor_entries (u32 sw_if_index, ip_address_family_t af)
 
static clib_error_tip_neighbor_show_sorted_i (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd, ip_address_family_t af)
 
static clib_error_tip_neighbor_show_i (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd, ip_address_family_t af)
 
static clib_error_tip_neighbor_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip6_neighbor_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip4_neighbor_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip6_neighbor_show_sorted (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip4_neighbor_show_sorted (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void ip_neighbor_register (ip_address_family_t af, const ip_neighbor_vft_t *vft)
 
void ip_neighbor_probe_dst (u32 sw_if_index, ip_address_family_t af, const ip46_address_t *dst)
 
void ip_neighbor_probe (const ip_adjacency_t *adj)
 
void ip_neighbor_walk (ip_address_family_t af, u32 sw_if_index, ip_neighbor_walk_cb_t cb, void *ctx)
 
int ip4_neighbor_proxy_add (u32 fib_index, const ip4_address_t *start, const ip4_address_t *end)
 The set of function that vnet requires from the IP neighbour module. More...
 
int ip4_neighbor_proxy_delete (u32 fib_index, const ip4_address_t *start, const ip4_address_t *end)
 
int ip4_neighbor_proxy_enable (u32 sw_if_index)
 
int ip4_neighbor_proxy_disable (u32 sw_if_index)
 
int ip6_neighbor_proxy_add (u32 sw_if_index, const ip6_address_t *addr)
 
int ip6_neighbor_proxy_del (u32 sw_if_index, const ip6_address_t *addr)
 
static void ip_neighbor_ethernet_change_mac (ethernet_main_t *em, u32 sw_if_index, uword opaque)
 
void ip_neighbor_populate (ip_address_family_t af, u32 sw_if_index)
 
void ip_neighbor_flush (ip_address_family_t af, u32 sw_if_index)
 
static walk_rc_t ip_neighbor_mark_one (index_t ipni, void *ctx)
 
void ip_neighbor_mark (ip_address_family_t af)
 
static walk_rc_t ip_neighbor_sweep_one (index_t ipni, void *arg)
 
void ip_neighbor_sweep (ip_address_family_t af)
 
static clib_error_tip_neighbor_interface_admin_change (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
 VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (ip_neighbor_interface_admin_change)
 
static clib_error_tip_neighbor_delete_sw_interface (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION (ip_neighbor_delete_sw_interface)
 
static walk_rc_t ip_neighbor_walk_covered (index_t ipni, void *arg)
 
static void ip_neighbor_add_del_interface_address_v4 (ip4_main_t *im, uword opaque, u32 sw_if_index, ip4_address_t *address, u32 address_length, u32 if_address_index, u32 is_del)
 
static void ip_neighbor_add_del_interface_address_v6 (ip6_main_t *im, uword opaque, u32 sw_if_index, ip6_address_t *address, u32 address_length, u32 if_address_index, u32 is_del)
 
static walk_rc_t ip_neighbor_walk_table_bind (index_t ipni, void *arg)
 
static void ip_neighbor_table_bind_v4 (ip4_main_t *im, uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index)
 
static void ip_neighbor_table_bind_v6 (ip6_main_t *im, uword opaque, u32 sw_if_index, u32 new_fib_index, u32 old_fib_index)
 
static ip_neighbor_age_state_t ip_neighbour_age_out (index_t ipni, f64 now, f64 *wait)
 
static uword ip_neighbor_age_loop (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f, ip_address_family_t af)
 
static uword ip4_neighbor_age_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static uword ip6_neighbor_age_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
int ip_neighbor_config (ip_address_family_t af, u32 limit, u32 age, bool recycle)
 
static clib_error_tip_neighbor_config_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip_neighbor_config_set (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip_neighbor_init (vlib_main_t *vm)
 

Variables

static ip_neighbor_tip_neighbor_pool
 Pool for All IP neighbors. More...
 
index_t ip_neighbor_list_head [N_AF]
 protocol specific lists of time sorted neighbors More...
 
ip_neighbor_elt_tip_neighbor_elt_pool
 Pool of linked list elemeents. More...
 
static vlib_log_class_t ipn_logger
 
static ip_neighbor_db_t ip_neighbor_db [N_AF]
 
static vlib_cli_command_t ip_neighbor_command
 (constructor) VLIB_CLI_COMMAND (ip_neighbor_command) More...
 
static vlib_cli_command_t ip_neighbor_command2
 (constructor) VLIB_CLI_COMMAND (ip_neighbor_command2) More...
 
static vlib_cli_command_t show_ip_neighbors_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip_neighbors_cmd_node) More...
 
static vlib_cli_command_t show_ip4_neighbors_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip4_neighbors_cmd_node) More...
 
static vlib_cli_command_t show_ip6_neighbors_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip6_neighbors_cmd_node) More...
 
static vlib_cli_command_t show_ip_neighbor_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip_neighbor_cmd_node) More...
 
static vlib_cli_command_t show_ip4_neighbor_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip4_neighbor_cmd_node) More...
 
static vlib_cli_command_t show_ip6_neighbor_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip6_neighbor_cmd_node) More...
 
static vlib_cli_command_t show_ip4_neighbor_sorted_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip4_neighbor_sorted_cmd_node) More...
 
static vlib_cli_command_t show_ip6_neighbor_sorted_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip6_neighbor_sorted_cmd_node) More...
 
static ip_neighbor_vft_t ip_nbr_vfts [N_AF]
 
static vlib_node_registration_t ip4_neighbor_age_process_node
 (constructor) VLIB_REGISTER_NODE (ip4_neighbor_age_process_node) More...
 
static vlib_node_registration_t ip6_neighbor_age_process_node
 (constructor) VLIB_REGISTER_NODE (ip6_neighbor_age_process_node) More...
 
static vlib_cli_command_t show_ip_neighbor_cfg_cmd_node
 (constructor) VLIB_CLI_COMMAND (show_ip_neighbor_cfg_cmd_node) More...
 
static vlib_cli_command_t set_ip_neighbor_cfg_cmd_node
 (constructor) VLIB_CLI_COMMAND (set_ip_neighbor_cfg_cmd_node) More...
 

Macro Definition Documentation

◆ IP_NEIGHBOR_DBG

#define IP_NEIGHBOR_DBG (   ...)    vlib_log_debug (ipn_logger, __VA_ARGS__);

Definition at line 82 of file ip_neighbor.c.

◆ IP_NEIGHBOR_INFO

#define IP_NEIGHBOR_INFO (   ...)    vlib_log_notice (ipn_logger, __VA_ARGS__);

Definition at line 85 of file ip_neighbor.c.

◆ IP_NEIGHBOR_PROCESS_SLEEP_LONG

#define IP_NEIGHBOR_PROCESS_SLEEP_LONG   (0)

Definition at line 1512 of file ip_neighbor.c.

Typedef Documentation

◆ ip_neighbor_age_state_t

◆ ip_neighbor_db_t

◆ ip_neighbor_del_all_ctx_t

◆ ip_neighbor_elt_t

◆ ip_neighbor_process_event_t

◆ ip_neighbor_sweep_ctx_t

◆ ip_neighbor_table_bind_ctx_t

◆ ip_neighbor_walk_covered_ctx_t

Enumeration Type Documentation

◆ ip_neighbor_age_state_t_

Enumerator
IP_NEIGHBOR_AGE_ALIVE 
IP_NEIGHBOR_AGE_PROBE 
IP_NEIGHBOR_AGE_DEAD 

Definition at line 1505 of file ip_neighbor.c.

◆ ip_neighbor_process_event_t_

Enumerator
IP_NEIGHBOR_AGE_PROCESS_WAKEUP 

Definition at line 1559 of file ip_neighbor.c.

Function Documentation

◆ ip4_neighbor_age_process()

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

Definition at line 1660 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip4_neighbor_proxy_add()

int ip4_neighbor_proxy_add ( u32  fib_index,
const ip4_address_t start,
const ip4_address_t end 
)

The set of function that vnet requires from the IP neighbour module.

Note that an implementation of these functions will not exist if the ip-neighbour plugin is not loaded. so check the error codes!

Definition at line 1081 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip4_neighbor_proxy_delete()

int ip4_neighbor_proxy_delete ( u32  fib_index,
const ip4_address_t start,
const ip4_address_t end 
)

Definition at line 1094 of file ip_neighbor.c.

◆ ip4_neighbor_proxy_disable()

int ip4_neighbor_proxy_disable ( u32  sw_if_index)

Definition at line 1116 of file ip_neighbor.c.

◆ ip4_neighbor_proxy_enable()

int ip4_neighbor_proxy_enable ( u32  sw_if_index)

Definition at line 1106 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip4_neighbor_show()

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

Definition at line 929 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip4_neighbor_show_sorted()

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

Definition at line 943 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip6_neighbor_age_process()

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

Definition at line 1667 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip6_neighbor_proxy_add()

int ip6_neighbor_proxy_add ( u32  sw_if_index,
const ip6_address_t *  addr 
)

Definition at line 1126 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip6_neighbor_proxy_del()

int ip6_neighbor_proxy_del ( u32  sw_if_index,
const ip6_address_t *  addr 
)

Definition at line 1136 of file ip_neighbor.c.

◆ ip6_neighbor_show()

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

Definition at line 922 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip6_neighbor_show_sorted()

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

Definition at line 936 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_af_type_pfx_len()

static u8 ip_af_type_pfx_len ( ip_address_family_t  type)
static

Definition at line 247 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_add()

int ip_neighbor_add ( const ip_address_t ip,
const mac_address_t mac,
u32  sw_if_index,
ip_neighbor_flags_t  flags,
u32 stats_index 
)

Definition at line 477 of file ip_neighbor.c.

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

◆ ip_neighbor_add_del_interface_address_v4()

static void ip_neighbor_add_del_interface_address_v4 ( ip4_main_t im,
uword  opaque,
u32  sw_if_index,
ip4_address_t address,
u32  address_length,
u32  if_address_index,
u32  is_del 
)
static

Definition at line 1378 of file ip_neighbor.c.

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

◆ ip_neighbor_add_del_interface_address_v6()

static void ip_neighbor_add_del_interface_address_v6 ( ip6_main_t im,
uword  opaque,
u32  sw_if_index,
ip6_address_t *  address,
u32  address_length,
u32  if_address_index,
u32  is_del 
)
static

Definition at line 1420 of file ip_neighbor.c.

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

◆ ip_neighbor_adj_fib_add()

static void ip_neighbor_adj_fib_add ( ip_neighbor_t ipn,
u32  fib_index 
)
static

Definition at line 253 of file ip_neighbor.c.

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

◆ ip_neighbor_adj_fib_remove()

static void ip_neighbor_adj_fib_remove ( ip_neighbor_t ipn,
u32  fib_index 
)
static

Definition at line 300 of file ip_neighbor.c.

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

◆ ip_neighbor_age_loop()

static uword ip_neighbor_age_loop ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f,
ip_address_family_t  af 
)
static

Definition at line 1565 of file ip_neighbor.c.

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

◆ ip_neighbor_alloc()

static ip_neighbor_t* ip_neighbor_alloc ( const ip_neighbor_key_t key,
const mac_address_t mac,
ip_neighbor_flags_t  flags 
)
static

Definition at line 439 of file ip_neighbor.c.

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

◆ ip_neighbor_cmd()

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

Definition at line 719 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_config()

int ip_neighbor_config ( ip_address_family_t  af,
u32  limit,
u32  age,
bool  recycle 
)

Definition at line 1687 of file ip_neighbor.c.

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

◆ ip_neighbor_config_set()

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

Definition at line 1722 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_config_show()

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

Definition at line 1703 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_db_add()

static void ip_neighbor_db_add ( const ip_neighbor_t ipn)
static

Definition at line 190 of file ip_neighbor.c.

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

◆ ip_neighbor_db_find()

static ip_neighbor_t* ip_neighbor_db_find ( const ip_neighbor_key_t key)
static

Definition at line 227 of file ip_neighbor.c.

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

◆ ip_neighbor_db_remove()

static void ip_neighbor_db_remove ( const ip_neighbor_t ipn)
static

Definition at line 211 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 ip_address_t ip,
u32  sw_if_index 
)

Definition at line 574 of file ip_neighbor.c.

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

◆ ip_neighbor_del_all()

void ip_neighbor_del_all ( ip_address_family_t  af,
u32  sw_if_index 
)

Definition at line 616 of file ip_neighbor.c.

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

◆ ip_neighbor_del_all_walk_cb()

static walk_rc_t ip_neighbor_del_all_walk_cb ( index_t  ipni,
void *  arg 
)
static

Definition at line 606 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_delete_sw_interface()

static clib_error_t* ip_neighbor_delete_sw_interface ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 1314 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_destroy()

static void ip_neighbor_destroy ( ip_neighbor_t ipn)
static

Definition at line 390 of file ip_neighbor.c.

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

◆ ip_neighbor_entries()

static index_t* ip_neighbor_entries ( u32  sw_if_index,
ip_address_family_t  af 
)
static

Definition at line 838 of file ip_neighbor.c.

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

◆ ip_neighbor_ethernet_change_mac()

static void ip_neighbor_ethernet_change_mac ( ethernet_main_t em,
u32  sw_if_index,
uword  opaque 
)
static

Definition at line 1146 of file ip_neighbor.c.

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

◆ ip_neighbor_flush()

void ip_neighbor_flush ( ip_address_family_t  af,
u32  sw_if_index 
)

Definition at line 1203 of file ip_neighbor.c.

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

◆ ip_neighbor_force_reuse()

static bool ip_neighbor_force_reuse ( ip_address_family_t  af)
static

Definition at line 419 of file ip_neighbor.c.

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

◆ ip_neighbor_get()

ip_neighbor_t* ip_neighbor_get ( index_t  ipni)

Definition at line 89 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_get_af()

ip_address_family_t ip_neighbor_get_af ( const ip_neighbor_t ipn)

Definition at line 122 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_get_index()

static index_t ip_neighbor_get_index ( const ip_neighbor_t ipn)
static

Definition at line 98 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_get_ip()

const ip_address_t* ip_neighbor_get_ip ( const ip_neighbor_t ipn)

Definition at line 116 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_get_mac()

const mac_address_t* ip_neighbor_get_mac ( const ip_neighbor_t ipn)

Definition at line 128 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_get_sw_if_index()

const u32 ip_neighbor_get_sw_if_index ( const ip_neighbor_t ipn)

Definition at line 134 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_init()

static clib_error_t* ip_neighbor_init ( vlib_main_t vm)
static

Definition at line 1783 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_interface_admin_change()

static clib_error_t* ip_neighbor_interface_admin_change ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)
static

Definition at line 1285 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_is_dynamic()

static bool ip_neighbor_is_dynamic ( const ip_neighbor_t ipn)
static

Definition at line 110 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_learn()

void ip_neighbor_learn ( const ip_neighbor_learn_t l)

Definition at line 712 of file ip_neighbor.c.

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

◆ ip_neighbor_list_remove()

static void ip_neighbor_list_remove ( ip_neighbor_t ipn)
static

Definition at line 140 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_mark()

void ip_neighbor_mark ( ip_address_family_t  af)

Definition at line 1240 of file ip_neighbor.c.

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

◆ ip_neighbor_mark_one()

static walk_rc_t ip_neighbor_mark_one ( index_t  ipni,
void *  ctx 
)
static

Definition at line 1228 of file ip_neighbor.c.

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

◆ ip_neighbor_mk_complete()

static void ip_neighbor_mk_complete ( adj_index_t  ai,
ip_neighbor_t ipn 
)
static

Definition at line 347 of file ip_neighbor.c.

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

◆ ip_neighbor_mk_complete_walk()

static adj_walk_rc_t ip_neighbor_mk_complete_walk ( adj_index_t  ai,
void *  ctx 
)
static

Definition at line 372 of file ip_neighbor.c.

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

◆ ip_neighbor_mk_incomplete()

static void ip_neighbor_mk_incomplete ( adj_index_t  ai)
static

Definition at line 358 of file ip_neighbor.c.

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

◆ ip_neighbor_mk_incomplete_walk()

static adj_walk_rc_t ip_neighbor_mk_incomplete_walk ( adj_index_t  ai,
void *  ctx 
)
static

Definition at line 382 of file ip_neighbor.c.

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

◆ ip_neighbor_populate()

void ip_neighbor_populate ( ip_address_family_t  af,
u32  sw_if_index 
)

Definition at line 1171 of file ip_neighbor.c.

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

◆ ip_neighbor_probe()

void ip_neighbor_probe ( const ip_adjacency_t adj)

Definition at line 1033 of file ip_neighbor.c.

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

◆ ip_neighbor_probe_dst()

void ip_neighbor_probe_dst ( u32  sw_if_index,
ip_address_family_t  af,
const ip46_address_t *  dst 
)

Definition at line 1015 of file ip_neighbor.c.

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

◆ ip_neighbor_refresh()

static void ip_neighbor_refresh ( ip_neighbor_t ipn)
static

Definition at line 157 of file ip_neighbor.c.

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

◆ ip_neighbor_register()

void ip_neighbor_register ( ip_address_family_t  af,
const ip_neighbor_vft_t vft 
)

Definition at line 1009 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_show()

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

Definition at line 915 of file ip_neighbor.c.

+ Here is the call graph for this function:

◆ ip_neighbor_show_i()

static clib_error_t* ip_neighbor_show_i ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd,
ip_address_family_t  af 
)
static

Definition at line 887 of file ip_neighbor.c.

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

◆ ip_neighbor_show_sorted_i()

static clib_error_t* ip_neighbor_show_sorted_i ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd,
ip_address_family_t  af 
)
static

Definition at line 861 of file ip_neighbor.c.

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

◆ ip_neighbor_sort()

static int ip_neighbor_sort ( void *  a1,
void *  a2 
)
static

Definition at line 820 of file ip_neighbor.c.

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

◆ ip_neighbor_sweep()

void ip_neighbor_sweep ( ip_address_family_t  af)

Definition at line 1267 of file ip_neighbor.c.

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

◆ ip_neighbor_sweep_one()

static walk_rc_t ip_neighbor_sweep_one ( index_t  ipni,
void *  arg 
)
static

Definition at line 1251 of file ip_neighbor.c.

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

◆ ip_neighbor_table_bind_v4()

static void ip_neighbor_table_bind_v4 ( ip4_main_t im,
uword  opaque,
u32  sw_if_index,
u32  new_fib_index,
u32  old_fib_index 
)
static

Definition at line 1478 of file ip_neighbor.c.

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

◆ ip_neighbor_table_bind_v6()

static void ip_neighbor_table_bind_v6 ( ip6_main_t im,
uword  opaque,
u32  sw_if_index,
u32  new_fib_index,
u32  old_fib_index 
)
static

Definition at line 1492 of file ip_neighbor.c.

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

◆ ip_neighbor_touch()

static void ip_neighbor_touch ( ip_neighbor_t ipn)
static

Definition at line 104 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_update()

void ip_neighbor_update ( vnet_main_t vnm,
adj_index_t  ai 
)

Definition at line 636 of file ip_neighbor.c.

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

◆ ip_neighbor_walk()

void ip_neighbor_walk ( ip_address_family_t  af,
u32  sw_if_index,
ip_neighbor_walk_cb_t  cb,
void *  ctx 
)

Definition at line 1041 of file ip_neighbor.c.

+ Here is the caller graph for this function:

◆ ip_neighbor_walk_covered()

static walk_rc_t ip_neighbor_walk_covered ( index_t  ipni,
void *  arg 
)
static

Definition at line 1341 of file ip_neighbor.c.

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

◆ ip_neighbor_walk_table_bind()

static walk_rc_t ip_neighbor_walk_table_bind ( index_t  ipni,
void *  arg 
)
static

Definition at line 1465 of file ip_neighbor.c.

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

◆ ip_neighbour_age_out()

static ip_neighbor_age_state_t ip_neighbour_age_out ( index_t  ipni,
f64  now,
f64 wait 
)
static

Definition at line 1515 of file ip_neighbor.c.

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

◆ VNET_SW_INTERFACE_ADD_DEL_FUNCTION()

VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( ip_neighbor_delete_sw_interface  )

◆ VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION()

VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION ( ip_neighbor_interface_admin_change  )

Variable Documentation

◆ ip4_neighbor_age_process_node

vlib_node_registration_t ip4_neighbor_age_process_node
static
Initial value:
= {
.name = "ip4-neighbor-age-process",
}

(constructor) VLIB_REGISTER_NODE (ip4_neighbor_age_process_node)

Definition at line 1674 of file ip_neighbor.c.

◆ ip6_neighbor_age_process_node

vlib_node_registration_t ip6_neighbor_age_process_node
static
Initial value:
= {
.name = "ip6-neighbor-age-process",
}

(constructor) VLIB_REGISTER_NODE (ip6_neighbor_age_process_node)

Definition at line 1679 of file ip_neighbor.c.

◆ ip_nbr_vfts

ip_neighbor_vft_t ip_nbr_vfts[N_AF]
static

Definition at line 1006 of file ip_neighbor.c.

◆ ip_neighbor_command

vlib_cli_command_t ip_neighbor_command
static
Initial value:
= {
.path = "set ip neighbor",
.short_help =
"set ip neighbor [del] <intfc> <ip-address> <mac-address> [static] [no-fib-entry] [count <count>] [fib-id <fib-id>] [proxy <lo-addr> - <hi-addr>]",
.function = ip_neighbor_cmd,
}

(constructor) VLIB_CLI_COMMAND (ip_neighbor_command)

Definition at line 805 of file ip_neighbor.c.

◆ ip_neighbor_command2

vlib_cli_command_t ip_neighbor_command2
static
Initial value:
= {
.path = "ip neighbor",
.short_help =
"ip neighbor [del] <intfc> <ip-address> <mac-address> [static] [no-fib-entry] [count <count>] [fib-id <fib-id>] [proxy <lo-addr> - <hi-addr>]",
.function = ip_neighbor_cmd,
}

(constructor) VLIB_CLI_COMMAND (ip_neighbor_command2)

Definition at line 811 of file ip_neighbor.c.

◆ ip_neighbor_db

ip_neighbor_db_t ip_neighbor_db[N_AF]
static
Initial value:
= {
[AF_IP4] = {
.ipndb_limit = 50000,
.ipndb_age = 0,
.ipndb_recycle = false,
},
[AF_IP6] = {
.ipndb_limit = 50000,
.ipndb_age = 0,
.ipndb_recycle = false,
}
}

Definition at line 66 of file ip_neighbor.c.

◆ ip_neighbor_elt_pool

ip_neighbor_elt_t* ip_neighbor_elt_pool

Pool of linked list elemeents.

Definition at line 43 of file ip_neighbor.c.

◆ ip_neighbor_list_head

index_t ip_neighbor_list_head[N_AF]

protocol specific lists of time sorted neighbors

Definition at line 34 of file ip_neighbor.c.

◆ ip_neighbor_pool

ip_neighbor_t* ip_neighbor_pool
static

Pool for All IP neighbors.

Definition at line 31 of file ip_neighbor.c.

◆ ipn_logger

vlib_log_class_t ipn_logger
static

Definition at line 62 of file ip_neighbor.c.

◆ set_ip_neighbor_cfg_cmd_node

vlib_cli_command_t set_ip_neighbor_cfg_cmd_node
static
Initial value:
= {
.path = "set ip neighbor-config",
.short_help = "set ip neighbor-config ip4|ip6 [limit <limit>] [age <age>] "
"[recycle|norecycle]",
}

(constructor) VLIB_CLI_COMMAND (set_ip_neighbor_cfg_cmd_node)

Definition at line 1774 of file ip_neighbor.c.

◆ show_ip4_neighbor_cmd_node

vlib_cli_command_t show_ip4_neighbor_cmd_node
static
Initial value:
= {
.path = "show ip4 neighbor",
.function = ip4_neighbor_show,
.short_help = "show ip4 neighbor [interface]",
}

(constructor) VLIB_CLI_COMMAND (show_ip4_neighbor_cmd_node)

Definition at line 984 of file ip_neighbor.c.

◆ show_ip4_neighbor_sorted_cmd_node

vlib_cli_command_t show_ip4_neighbor_sorted_cmd_node
static
Initial value:
= {
.path = "show ip4 neighbor-sorted",
.short_help = "show ip4 neighbor-sorted",
}

(constructor) VLIB_CLI_COMMAND (show_ip4_neighbor_sorted_cmd_node)

Definition at line 994 of file ip_neighbor.c.

◆ show_ip4_neighbors_cmd_node

vlib_cli_command_t show_ip4_neighbors_cmd_node
static
Initial value:
= {
.path = "show ip4 neighbors",
.function = ip4_neighbor_show,
.short_help = "show ip4 neighbors [interface]",
}

(constructor) VLIB_CLI_COMMAND (show_ip4_neighbors_cmd_node)

Definition at line 969 of file ip_neighbor.c.

◆ show_ip6_neighbor_cmd_node

vlib_cli_command_t show_ip6_neighbor_cmd_node
static
Initial value:
= {
.path = "show ip6 neighbor",
.function = ip6_neighbor_show,
.short_help = "show ip6 neighbor [interface]",
}

(constructor) VLIB_CLI_COMMAND (show_ip6_neighbor_cmd_node)

Definition at line 989 of file ip_neighbor.c.

◆ show_ip6_neighbor_sorted_cmd_node

vlib_cli_command_t show_ip6_neighbor_sorted_cmd_node
static
Initial value:
= {
.path = "show ip6 neighbor-sorted",
.short_help = "show ip6 neighbor-sorted",
}

(constructor) VLIB_CLI_COMMAND (show_ip6_neighbor_sorted_cmd_node)

Definition at line 999 of file ip_neighbor.c.

◆ show_ip6_neighbors_cmd_node

vlib_cli_command_t show_ip6_neighbors_cmd_node
static
Initial value:
= {
.path = "show ip6 neighbors",
.function = ip6_neighbor_show,
.short_help = "show ip6 neighbors [interface]",
}

(constructor) VLIB_CLI_COMMAND (show_ip6_neighbors_cmd_node)

Definition at line 974 of file ip_neighbor.c.

◆ show_ip_neighbor_cfg_cmd_node

vlib_cli_command_t show_ip_neighbor_cfg_cmd_node
static
Initial value:
= {
.path = "show ip neighbor-config",
.short_help = "show ip neighbor-config",
}

(constructor) VLIB_CLI_COMMAND (show_ip_neighbor_cfg_cmd_node)

Definition at line 1769 of file ip_neighbor.c.

◆ show_ip_neighbor_cmd_node

vlib_cli_command_t show_ip_neighbor_cmd_node
static
Initial value:
= {
.path = "show ip neighbor",
.function = ip_neighbor_show,
.short_help = "show ip neighbor [interface]",
}

(constructor) VLIB_CLI_COMMAND (show_ip_neighbor_cmd_node)

Definition at line 979 of file ip_neighbor.c.

◆ show_ip_neighbors_cmd_node

vlib_cli_command_t show_ip_neighbors_cmd_node
static
Initial value:
= {
.path = "show ip neighbors",
.function = ip_neighbor_show,
.short_help = "show ip neighbors [interface]",
}

(constructor) VLIB_CLI_COMMAND (show_ip_neighbors_cmd_node)

Definition at line 964 of file ip_neighbor.c.

ip_neighbor_show
static clib_error_t * ip_neighbor_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:915
ip6_neighbor_show_sorted
static clib_error_t * ip6_neighbor_show_sorted(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:936
ip4_neighbor_age_process
static uword ip4_neighbor_age_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: ip_neighbor.c:1660
ip_neighbor_config_show
static clib_error_t * ip_neighbor_config_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:1703
AF_IP4
@ AF_IP4
Definition: ip_types.h:23
ip_neighbor_config_set
static clib_error_t * ip_neighbor_config_set(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:1722
ip4_neighbor_show
static clib_error_t * ip4_neighbor_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:929
ip_neighbor_cmd
static clib_error_t * ip_neighbor_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:719
ip4_neighbor_show_sorted
static clib_error_t * ip4_neighbor_show_sorted(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:943
VLIB_NODE_TYPE_PROCESS
@ VLIB_NODE_TYPE_PROCESS
Definition: node.h:84
AF_IP6
@ AF_IP6
Definition: ip_types.h:24
ip6_neighbor_show
static clib_error_t * ip6_neighbor_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip_neighbor.c:922
ip6_neighbor_age_process
static uword ip6_neighbor_age_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: ip_neighbor.c:1667