52 const ip46_address_t *nh_addr)
71 adj->rewrite_header.data_bytes = 0;
79 sizeof (adj->rewrite_data));
230 return (
format(s,
"%U-glean: %U",
235 adj->rewrite_header.sw_if_index)));
dpo_lock_fn_t dv_lock
A reference counting lock function.
void adj_glean_remove(fib_protocol_t proto, u32 sw_if_index)
#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST
A virtual function table regisitered for a DPO type.
void adj_lock(adj_index_t adj_index)
An adjacency is a representation of an attached L3 peer.
adj_index_t adj_glean_add_or_lock(fib_protocol_t proto, u32 sw_if_index, const ip46_address_t *nh_addr)
Glean Adjacency.
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
struct _vlib_node_registration vlib_node_registration_t
void vnet_rewrite_for_sw_interface(vnet_main_t *vnm, vnet_link_t link_type, u32 sw_if_index, u32 node_index, void *dst_address, vnet_rewrite_header_t *rw, u32 max_rewrite_bytes)
Deprecated.
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define VNET_HW_INTERFACE_FLAG_LINK_UP
union ip_adjacency_t_::@175 sub_type
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
vnet_main_t * vnet_get_main(void)
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
static void adj_nbr_hw_sw_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, void *arg)
Invoked on each SW interface of a HW interface when the HW interface state changes.
static adj_index_t * adj_gleans[FIB_PROTOCOL_MAX]
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
struct ip_adjacency_t_::@175::@178 glean
IP_LOOKUP_NEXT_GLEAN.
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
static clib_error_t * adj_glean_interface_delete(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
fib_node_bw_reason_flag_t fnbw_reason
The reason/trigger for the backwalk.
format_function_t format_vnet_sw_interface_name
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
static adj_index_t adj_get_index(ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
static clib_error_t * adj_glean_hw_interface_state_change(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Registered callback for HW interface state changes.
vlib_node_registration_t ip6_glean_node
(constructor) VLIB_REGISTER_NODE (ip6_glean_node)
static void adj_dpo_unlock(dpo_id_t *dpo)
void adj_glean_module_init(void)
Module initialisation.
static const char *const glean_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a glean object.
static clib_error_t * adj_glean_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
static void adj_dpo_lock(dpo_id_t *dpo)
u8 * format_adj_glean(u8 *s, va_list *ap)
Format/display a glean adjacency.
u32 adj_index_t
An index for adjacencies.
static const char *const *const glean_nodes[DPO_PROTO_NUM]
static vlib_node_registration_t * adj_get_glean_node(fib_protocol_t proto)
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(adj_glean_hw_interface_state_change)
Context passed between object during a back walk.
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
u8 * format_fib_protocol(u8 *s, va_list ap)
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(adj_glean_interface_delete)
static const char *const glean_ip6_nodes[]
index_t dpoi_index
the index of objects of that type
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip_lookup_next_t lookup_next_index
ip_adjacency_t * adj_alloc(fib_protocol_t proto)
#define FIB_PROTOCOL_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements...
vlib_node_registration_t ip4_glean_node
(constructor) VLIB_REGISTER_NODE (ip4_glean_node)
static vnet_link_t adj_fib_proto_2_nd(fib_protocol_t fp)
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(adj_glean_interface_state_change)