|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
71 .ipndb_recycle =
false,
77 .ipndb_recycle =
false,
82 #define IP_NEIGHBOR_DBG(...) \
83 vlib_log_debug (ipn_logger, __VA_ARGS__);
85 #define IP_NEIGHBOR_INFO(...) \
86 vlib_log_notice (ipn_logger, __VA_ARGS__);
106 ipn->
ipn_flags &= ~IP_NEIGHBOR_FLAG_STALE;
112 return (ipn->
ipn_flags & IP_NEIGHBOR_FLAG_DYNAMIC);
238 [
key->ipnk_sw_if_index],
key);
352 ipn_key->ipnk_sw_if_index,
366 rewrite_header.sw_if_index,
468 if (!(ipn->
ipn_flags & IP_NEIGHBOR_FLAG_NO_FIB_ENTRY))
508 if (!(
flags & IP_NEIGHBOR_FLAG_STATIC) &&
509 (ipn->
ipn_flags & IP_NEIGHBOR_FLAG_STATIC))
513 goto check_customers;
520 if ((
flags & IP_NEIGHBOR_FLAG_STATIC) &&
521 !(ipn->
ipn_flags & IP_NEIGHBOR_FLAG_STATIC))
524 ipn->
ipn_flags |= IP_NEIGHBOR_FLAG_STATIC;
525 ipn->
ipn_flags &= ~IP_NEIGHBOR_FLAG_DYNAMIC;
535 goto check_customers;
551 return VNET_API_ERROR_LIMIT_EXCEEDED;
593 return (VNET_API_ERROR_NO_SUCH_ENTRY);
644 .ipnk_sw_if_index = adj->rewrite_header.sw_if_index,
674 adj->rewrite_header.sw_if_index,
715 IP_NEIGHBOR_FLAG_DYNAMIC, NULL);
730 flags = IP_NEIGHBOR_FLAG_DYNAMIC;
741 else if (
unformat (input,
"static"))
743 flags |= IP_NEIGHBOR_FLAG_STATIC;
744 flags &= ~IP_NEIGHBOR_FLAG_DYNAMIC;
746 else if (
unformat (input,
"no-fib-entry"))
747 flags |= IP_NEIGHBOR_FLAG_NO_FIB_ENTRY;
757 "specify interface, IP address and MAC: `%U'",
806 .path =
"set ip neighbor",
808 "set ip neighbor [del] <intfc> <ip-address> <mac-address> [static] [no-fib-entry] [count <count>] [fib-id <fib-id>] [proxy <lo-addr> - <hi-addr>]",
812 .path =
"ip neighbor",
814 "ip neighbor [del] <intfc> <ip-address> <mac-address> [static] [no-fib-entry] [count <count>] [fib-id <fib-id>] [proxy <lo-addr> - <hi-addr>]",
822 index_t *ipni1 = a1, *ipni2 = a2;
871 "Flags",
"Ethernet",
"Interface");
877 ipne_anchor, head,
elt,
903 "Flags",
"Ethernet",
"Interface");
965 .path =
"show ip neighbors",
967 .short_help =
"show ip neighbors [interface]",
970 .path =
"show ip4 neighbors",
972 .short_help =
"show ip4 neighbors [interface]",
975 .path =
"show ip6 neighbors",
977 .short_help =
"show ip6 neighbors [interface]",
980 .path =
"show ip neighbor",
982 .short_help =
"show ip neighbor [interface]",
985 .path =
"show ip4 neighbor",
987 .short_help =
"show ip4 neighbor [interface]",
990 .path =
"show ip6 neighbor",
992 .short_help =
"show ip6 neighbor [interface]",
995 .path =
"show ip4 neighbor-sorted",
997 .short_help =
"show ip4 neighbor-sorted",
1000 .path =
"show ip6 neighbor-sorted",
1002 .short_help =
"show ip6 neighbor-sorted",
1234 ipn->
ipn_flags |= IP_NEIGHBOR_FLAG_STALE;
1258 if (ipn->
ipn_flags & IP_NEIGHBOR_FLAG_STALE)
1383 u32 if_address_index,
u32 is_del)
1390 (is_del ?
"del" :
"add"),
1402 .length = address_length,
1425 u32 if_address_index,
u32 is_del)
1434 (is_del ?
"del" :
"add"));
1444 .length = address_length,
1481 u32 new_fib_index,
u32 old_fib_index)
1484 .old_fib_index = old_fib_index,
1485 .new_fib_index = new_fib_index,
1495 u32 new_fib_index,
u32 old_fib_index)
1498 .old_fib_index = old_fib_index,
1499 .new_fib_index = new_fib_index,
1512 #define IP_NEIGHBOR_PROCESS_SLEEP_LONG (0)
1528 if (
ttl > ipndb_age)
1552 *wait = ipndb_age -
ttl + 1;
1569 uword event_type, *event_data = NULL;
1606 ipne_anchor, head,
elt,
1614 timeout =
clib_min (wait, timeout);
1624 timeout =
clib_min (wait, timeout);
1677 .name =
"ip4-neighbor-age-process",
1682 .name =
"ip6-neighbor-age-process",
1746 if (
unformat (line_input,
"limit %u", &limit))
1748 else if (
unformat (line_input,
"age %u", &age))
1750 else if (
unformat (line_input,
"recycle"))
1752 else if (
unformat (line_input,
"norecycle"))
1770 .path =
"show ip neighbor-config",
1772 .short_help =
"show ip neighbor-config",
1775 .path =
"set ip neighbor-config",
1777 .short_help =
"set ip neighbor-config ip4|ip6 [limit <limit>] [age <age>] "
1778 "[recycle|norecycle]",
1812 .function_opaque = 0,
A representation of an IP neighbour/peer.
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
@ ADJ_NBR_REWRITE_FLAG_INCOMPLETE
An indication that the rewrite is incomplete, i.e.
ip_address_family_t ip_neighbor_get_af(const ip_neighbor_t *ipn)
static ip_neighbor_t * ip_neighbor_alloc(const ip_neighbor_key_t *key, const mac_address_t *mac, ip_neighbor_flags_t flags)
static uword ip6_address_is_link_local_unicast(const ip6_address_t *a)
u32 ipndb_n_elts
per-protocol number of elements
fib_node_index_t fib_table_entry_path_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_mpls_label_t *next_hop_labels, fib_route_path_flags_t path_flags)
Add one path to an entry (aka route) in the FIB.
static adj_walk_rc_t ip_neighbor_mk_complete_walk(adj_index_t ai, void *ctx)
vnet_interface_main_t * im
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
bool ipndb_recycle
when the limit is reached and new neighbors are created, should we recycle an old one
@ IP_LOOKUP_NEXT_ARP
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
fib_node_index_t ipn_fib_entry_index
The index of the adj fib created for this neighbour.
#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST
u8 * ethernet_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
build a rewrite string to use for sending packets of type 'link_type' to 'dst_address'
#define clib_llist_remove(LP, name, E)
Remove entry from list.
static clib_error_t * ip_neighbor_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
const ip_address_t * ip_neighbor_get_ip(const ip_neighbor_t *ipn)
static clib_error_t * ip6_neighbor_show_sorted(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_memcpy(d, s, n)
Virtual function Table for neighbor protocol implementations to register.
void adj_glean_update_rewrite_itf(u32 sw_if_index)
static uword ip4_neighbor_age_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
ip4_table_bind_callback_t * table_bind_callbacks
Functions to call when interface to table biding changes.
ip4_main_t ip4_main
Global ip4 main structure.
static vlib_cli_command_t show_ip6_neighbor_sorted_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip6_neighbor_sorted_cmd_node)
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
static void ip_neighbor_adj_fib_remove(ip_neighbor_t *ipn, u32 fib_index)
static uword ip_neighbor_age_loop(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f, ip_address_family_t af)
int ip_neighbor_config(ip_address_family_t af, u32 limit, u32 age, bool recycle)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct ip_neighbor_sweep_ctx_t_ ip_neighbor_sweep_ctx_t
struct ip_neighbor_db_t_ ip_neighbor_db_t
ip_neighbor_t * ip_neighbor_get(index_t ipni)
#define clib_llist_add(LP, name, E, H)
Add entry after head.
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
static void clib_mem_free(void *p)
static ip_neighbor_t * ip_neighbor_db_find(const ip_neighbor_key_t *key)
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
@ IP_LOOKUP_NEXT_GLEAN
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
@ FIB_ENTRY_FLAG_ATTACHED
#define clib_error_return(e, args...)
static bool ip_neighbor_force_reuse(ip_address_family_t af)
static vlib_cli_command_t show_ip4_neighbor_sorted_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip4_neighbor_sorted_cmd_node)
static clib_error_t * ip_neighbor_config_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
ip_neighbor_process_event_t_
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(ip_neighbor_delete_sw_interface)
@ IP_NEIGHBOR_AGE_PROCESS_WAKEUP
u32 ipndb_age
max age of a neighbor before it's forcibly evicted
#define FIB_NODE_INDEX_INVALID
static vlib_cli_command_t show_ip_neighbor_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip_neighbor_cmd_node)
#define clib_llist_is_empty(LP, name, H)
Check is list is empty.
static vlib_cli_command_t show_ip4_neighbors_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip4_neighbors_cmd_node)
@ IP_LOOKUP_NEXT_LOCAL
This packet is for one of our own IP addresses.
#define FOR_EACH_IP_ADDRESS_FAMILY(_af)
@ ADJ_NBR_REWRITE_FLAG_COMPLETE
An indication that the rewrite is complete, i.e.
u16 fp_len
The mask length.
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
#define pool_put(P, E)
Free an object E in pool P.
ip_neighbor_elt_t * ip_neighbor_elt_pool
Pool of linked list elemeents.
@ IP_LOOKUP_NEXT_MIDCHAIN
This packets follow a mid-chain adjacency.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
walk_rc_t(* ip_neighbor_walk_cb_t)(index_t ipni, void *ctx)
const mac_address_t ZERO_MAC_ADDRESS
uword unformat_ip_address_family(unformat_input_t *input, va_list *args)
enum ip_neighbor_age_state_t_ ip_neighbor_age_state_t
static ip_neighbor_vft_t ip_nbr_vfts[N_AF]
static clib_error_t * ip_neighbor_config_set(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void ip_neighbor_learn(const ip_neighbor_learn_t *l)
u32 * ipndb_n_elts_per_fib
per-protocol number of elements per-fib-index
u8 * format_ip_neighbor(u8 *s, va_list *va)
void ip6_ll_table_entry_delete(const ip6_ll_prefix_t *ilp)
Delete a IP6 link-local entry.
fib_node_index_t ip6_ll_table_entry_update(const ip6_ll_prefix_t *ilp, fib_route_path_flags_t flags)
Update an entry in the table.
static vlib_cli_command_t set_ip_neighbor_cfg_cmd_node
(constructor) VLIB_CLI_COMMAND (set_ip_neighbor_cfg_cmd_node)
static_always_inline int mac_address_cmp(const mac_address_t *a, const mac_address_t *b)
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
clib_llist_anchor_t ipne_anchor
void ip_address_from_46(const ip46_address_t *nh, fib_protocol_t fproto, ip_address_t *ip)
word vnet_sw_interface_compare(vnet_main_t *vnm, uword sw_if_index0, uword sw_if_index1)
ip6_table_bind_function_t * function
static vlib_cli_command_t ip_neighbor_command2
(constructor) VLIB_CLI_COMMAND (ip_neighbor_command2)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static uword ip6_destination_matches_route(const ip6_main_t *im, const ip6_address_t *key, const ip6_address_t *dest, uword dest_length)
ip_neighbor_flags_t ipn_flags
Falgs for this object.
@ FIB_SOURCE_ADJ
Adjacency source.
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type,...
@ IP_LOOKUP_NEXT_MCAST_MIDCHAIN
Multicast Midchain Adjacency.
#define ip_addr_version(_a)
#define pool_foreach(VAR, POOL)
Iterate through pool.
uword unformat_ip_address(unformat_input_t *input, va_list *args)
static_always_inline void mac_address_copy(mac_address_t *dst, const mac_address_t *src)
static u8 ip_af_type_pfx_len(ip_address_family_t type)
static walk_rc_t ip_neighbor_sweep_one(index_t ipni, void *arg)
static walk_rc_t ip_neighbor_mark_one(index_t ipni, void *ctx)
@ IP_NEIGHBOR_EVENT_REMOVED
#define clib_llist_foreach_reverse(LP, name, H, E, body)
Walk list starting at head in reverse order.
static walk_rc_t ip_neighbor_walk_covered(index_t ipni, void *arg)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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 clib_error_t * ip4_neighbor_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void ip_neighbor_list_remove(ip_neighbor_t *ipn)
@ IP_LOOKUP_NEXT_DROP
Adjacency to drop this packet.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
void fib_table_entry_path_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_route_path_flags_t path_flags)
remove one path to an entry (aka route) in the FIB.
u8 * format_ip_address_family(u8 *s, va_list *args)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
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 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 ip_neighbor_db_t ip_neighbor_db[N_AF]
ip_neighbor_key_t * ipn_key
The idempotent key.
vnet_main_t * vnet_get_main(void)
int ip4_neighbor_proxy_enable(u32 sw_if_index)
void ip_neighbor_register(ip_address_family_t af, const ip_neighbor_vft_t *vft)
static_always_inline uword vlib_get_thread_index(void)
static void ip_neighbor_refresh(ip_neighbor_t *ipn)
u8 * format_mac_address_t(u8 *s, va_list *args)
ip6_add_del_interface_address_callback_t * add_del_interface_address_callbacks
f64 end
end of the time range
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static void ip_neighbor_touch(ip_neighbor_t *ipn)
static void ip_neighbor_destroy(ip_neighbor_t *ipn)
struct ip_neighbor_table_bind_ctx_t_ ip_neighbor_table_bind_ctx_t
u8 * format_ip_address(u8 *s, va_list *args)
static_always_inline int mac_address_is_zero(const mac_address_t *mac)
#define IP_ADDRESS_V6_ALL_0S
static vlib_cli_command_t show_ip6_neighbors_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip6_neighbors_cmd_node)
index_t ip_neighbor_list_head[N_AF]
protocol specific lists of time sorted neighbors
#define hash_create_mem(elts, key_bytes, value_bytes)
@ IP_LOOKUP_NEXT_REWRITE
This packet is to be rewritten and forwarded to the next processing node.
ip6_table_bind_callback_t * table_bind_callbacks
Functions to call when interface to table biding changes.
#define hash_set_mem(h, key, value)
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)
#define hash_foreach(key_var, value_var, h, body)
static clib_error_t * ip_neighbor_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
const mac_address_t * ip_neighbor_get_mac(const ip_neighbor_t *ipn)
struct ip_neighbor_del_all_ctx_t_ ip_neighbor_del_all_ctx_t
void ip_neighbor_walk(ip_address_family_t af, u32 sw_if_index, ip_neighbor_walk_cb_t cb, void *ctx)
void ip4_neighbor_probe_dst(u32 sw_if_index, const ip4_address_t *dst)
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
static adj_walk_rc_t ip_neighbor_mk_incomplete_walk(adj_index_t ai, void *ctx)
@ IP_LOOKUP_NEXT_PUNT
Adjacency to punt this packet.
void ip_neighbor_publish(index_t ipni, ip_neighbor_event_flags_t flags)
static clib_error_t * ip4_neighbor_show_sorted(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
manual_print typedef address
#define VLIB_CLI_COMMAND(x,...)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
static clib_error_t * ip_neighbor_delete_sw_interface(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
@ IP_LOOKUP_NEXT_BCAST
Broadcast Adjacency.
int ip6_neighbor_proxy_add(u32 sw_if_index, const ip6_address_t *addr)
Aggregate type for a prefix in the IPv6 Link-local table.
int ip6_neighbor_proxy_del(u32 sw_if_index, const ip6_address_t *addr)
f64 ipn_time_last_updated
Aging related data.
ethernet_address_change_ctx_t * address_change_callbacks
Functions to call when interface hw address changes.
struct _vlib_node_registration vlib_node_registration_t
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
static index_t * ip_neighbor_entries(u32 sw_if_index, ip_address_family_t af)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
void mac_address_increment(mac_address_t *mac)
static uword vnet_sw_interface_is_admin_up(vnet_main_t *vnm, u32 sw_if_index)
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)
int ip_neighbor_del(const ip_address_t *ip, u32 sw_if_index)
fib_protocol_t ip_address_family_to_fib_proto(ip_address_family_t af)
static void ip_neighbor_adj_fib_add(ip_neighbor_t *ipn, u32 fib_index)
@ IP_LOOKUP_NEXT_ICMP_ERROR
This packets needs to go to ICMP error.
static ip_neighbor_t * ip_neighbor_pool
Pool for All IP neighbors.
static uword ip4_destination_matches_route(const ip4_main_t *im, const ip4_address_t *key, const ip4_address_t *dest, uword dest_length)
bool ip_address_is_zero(const ip_address_t *ip)
ip4_add_del_interface_address_callback_t * add_del_interface_address_callbacks
Functions to call when interface address changes.
static void ip_neighbor_mk_complete(adj_index_t ai, ip_neighbor_t *ipn)
static ip_neighbor_age_state_t ip_neighbour_age_out(index_t ipni, f64 now, f64 *wait)
ip4_add_del_interface_address_function_t * function
void ip_neighbor_del_all(ip_address_family_t af, u32 sw_if_index)
#define vec_free(V)
Free vector's memory (no header).
#define IP_NEIGHBOR_INFO(...)
union ip_adjacency_t_::@144 sub_type
@ IP_NEIGHBOR_EVENT_ADDED
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.
ip6_add_del_interface_address_function_t * function
void ip_neighbor_probe(const ip_adjacency_t *adj)
void ip_neighbor_populate(ip_address_family_t af, u32 sw_if_index)
static walk_rc_t ip_neighbor_walk_table_bind(index_t ipni, void *arg)
#define hash_get_mem(h, key)
static index_t ip_neighbor_get_index(const ip_neighbor_t *ipn)
ethernet_main_t ethernet_main
static void ip_neighbor_db_remove(const ip_neighbor_t *ipn)
format_function_t format_vnet_sw_if_index_name
enum ip_neighbor_flags_t_ ip_neighbor_flags_t
unformat_function_t unformat_vnet_sw_interface
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
uword unformat_mac_address_t(unformat_input_t *input, va_list *args)
u32 fib_table_get_index_for_sw_if_index(fib_protocol_t proto, u32 sw_if_index)
Get the index of the FIB bound to the interface.
@ FIB_ROUTE_PATH_FLAG_NONE
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
vnet_link_t adj_get_link_type(adj_index_t ai)
Return the link type of the adjacency.
#define VLIB_INIT_FUNCTION(x)
void ip6_neighbor_probe_dst(u32 sw_if_index, const ip6_address_t *dst)
static void ip_neighbor_mk_incomplete(adj_index_t ai)
u32 ipndb_limit
per-protocol limit - max number of neighbors
static clib_error_t * ip_neighbor_init(vlib_main_t *vm)
uword ** ipndb_hash
per interface hash
const u32 ip_neighbor_get_sw_if_index(const ip_neighbor_t *ipn)
#define vec_foreach(var, vec)
Vector iterator.
static vlib_cli_command_t show_ip6_neighbor_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip6_neighbor_cmd_node)
static void ip_neighbor_ethernet_change_mac(ethernet_main_t *em, u32 sw_if_index, uword opaque)
void ip_neighbor_sweep(ip_address_family_t af)
ip4_table_bind_function_t * function
struct ip_neighbor_walk_covered_ctx_t_ ip_neighbor_walk_covered_ctx_t
u8 * format_ip_neighbor_flags(u8 *s, va_list *args)
int ip4_neighbor_proxy_delete(u32 fib_index, const ip4_address_t *start, const ip4_address_t *end)
struct ip_neighbor_elt_t_ ip_neighbor_elt_t
void ip_neighbor_probe_dst(u32 sw_if_index, ip_address_family_t af, const ip46_address_t *dst)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
u32 adj_index_t
An index for adjacencies.
#define IP_NEIGHBOR_DBG(...)
adj_index_t adj_nbr_find(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index)
Lookup neighbor adjancency.
static vlib_log_class_t ipn_logger
void adj_nbr_update_rewrite(adj_index_t adj_index, adj_nbr_rewrite_flag_t flags, u8 *rewrite)
adj_nbr_update_rewrite
static vlib_cli_command_t show_ip_neighbor_cfg_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip_neighbor_cfg_cmd_node)
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(ip_neighbor_interface_admin_change)
static bool ip_neighbor_is_dynamic(const ip_neighbor_t *ipn)
void ip_address_increment(ip_address_t *ip)
static vlib_main_t * vlib_get_main(void)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
#define hash_unset_mem(h, key)
vnet_interface_output_runtime_t * rt
void ip_neighbor_update(vnet_main_t *vnm, adj_index_t ai)
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_db_add(const ip_neighbor_t *ipn)
void adj_nbr_walk_nh(u32 sw_if_index, fib_protocol_t adj_nh_proto, const ip46_address_t *nh, adj_walk_cb_t cb, void *ctx)
Walk adjacencies on a link with a given next-hop.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
void ip_neighbor_mark(ip_address_family_t af)
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)
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
@ IP_LOOKUP_NEXT_MCAST
Multicast Adjacency.
struct ip_adjacency_t_::@144::@145 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
ip6_address_t ilp_addr
the IP6 address
ip_address_family_t ip_address_family_from_fib_proto(fib_protocol_t fp)
static walk_rc_t ip_neighbor_del_all_walk_cb(index_t ipni, void *arg)
#define clib_llist_prev(LP, name, E)
Get previous pool entry.
int ip_address_cmp(const ip_address_t *ip1, const ip_address_t *ip2)
static f64 vlib_time_now(vlib_main_t *vm)
static vlib_cli_command_t show_ip_neighbors_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip_neighbors_cmd_node)
#define IP_NEIGHBOR_PROCESS_SLEEP_LONG
static int ip_neighbor_sort(void *a1, void *a2)
vl_api_interface_index_t sw_if_index
mac_address_t ipn_mac
The learned MAC address of the neighbour.
static vlib_cli_command_t show_ip4_neighbor_cmd_node
(constructor) VLIB_CLI_COMMAND (show_ip4_neighbor_cmd_node)
static vlib_cli_command_t ip_neighbor_command
(constructor) VLIB_CLI_COMMAND (ip_neighbor_command)
enum walk_rc_t_ walk_rc_t
Walk return code.
enum ip_neighbor_process_event_t_ ip_neighbor_process_event_t
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
static void * clib_mem_alloc(uword size)
static clib_error_t * ip6_neighbor_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Aggregate type for a prefix.
static uword ip6_neighbor_age_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
static vlib_node_registration_t ip4_neighbor_age_process_node
(constructor) VLIB_REGISTER_NODE (ip4_neighbor_age_process_node)
static clib_error_t * ip_neighbor_interface_admin_change(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
vl_api_fib_path_type_t type
#define clib_llist_make_head(LP, name)
Initialize llist head.
static vlib_node_registration_t ip6_neighbor_age_process_node
(constructor) VLIB_REGISTER_NODE (ip6_neighbor_age_process_node)
enum ip_address_family_t_ ip_address_family_t
#define VLIB_REGISTER_NODE(x,...)
void ip_neighbor_flush(ip_address_family_t af, u32 sw_if_index)
int ip4_neighbor_proxy_disable(u32 sw_if_index)
vl_api_wireguard_peer_flags_t flags