|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
32 #define ADJ_BFD_STATES { \
33 [ADJ_BFD_STATE_DOWN] = "down", \
34 [ADJ_BFD_STATE_UP] = "up", \
88 case BFD_STATE_admin_down:
117 const bfd_udp_key_t *
key;
123 if (BFD_HOP_TYPE_SINGLE != session->
hop_type)
148 case BFD_LISTEN_EVENT_CREATE:
189 case BFD_LISTEN_EVENT_UPDATE:
206 case BFD_LISTEN_EVENT_DELETE:
269 s =
format(s,
"BFD:[state:%s index:%d]",
void adj_delegate_remove(adj_index_t ai, adj_delegate_type_t type)
Remove a delegate from an adjacency.
index_t ad_index
The index passed by the provider to identify its delegate instance.
An ADJ delegate virtual function table.
adj_index_t adj_nbr_add_or_lock(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index)
Neighbour Adjacency sub-type.
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
adj_bfd_state_t_
Distillation of the BFD session states into a go/no-go for using the associated tracked adjacency.
int adj_bfd_is_up(adj_index_t ai)
void adj_bfd_notify(bfd_listen_event_e event, const bfd_session_t *session)
Callback function registered with BFD module to receive notifications of the CRUD of BFD sessions wou...
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
bfd_hop_type_e hop_type
BFD hop type.
static const adj_bfd_delegate_t * adj_bfd_from_const_base(const adj_delegate_t *ad)
const static adj_delegate_vft_t adj_delegate_vft
#define pool_put(P, E)
Free an object E in pool P.
static adj_bfd_state_t adj_bfd_bfd_state_to_fib(bfd_state_e bstate)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void bfd_register_listener(bfd_notify_fn_t fn)
Register a callback function to receive session notifications.
u32 bs_idx
index in bfd_main.sessions pool
static void adj_bfd_update_walk(adj_index_t ai)
int adj_delegate_add(ip_adjacency_t *adj, adj_delegate_type_t adt, index_t adi)
Add a delegate to an adjacency.
bfd_state_e local_state
session state
u32 abd_index
BFD session index.
static clib_error_t * adj_bfd_main_init(vlib_main_t *vm)
static const char * adj_bfd_state_names[]
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
@ FIB_NODE_BW_REASON_FLAG_ADJ_UPDATE
void adj_delegate_register_type(adj_delegate_type_t type, const adj_delegate_vft_t *vft)
adj_delegate_register_type
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
static u8 * adj_delegate_fmt_bfd(const adj_delegate_t *aed, u8 *s)
Print a delegate that represents BFD tracking.
static adj_bfd_delegate_t * abd_pool
Pool of delegates.
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.
adj_delegate_t * adj_delegate_get(const ip_adjacency_t *adj, adj_delegate_type_t type)
Get a delegate from an adjacency.
enum adj_bfd_state_t_ adj_bfd_state_t
Distillation of the BFD session states into a go/no-go for using the associated tracked adjacency.
description fragment has unexpected format
adj_bfd_state_t abd_state
BFD session state.
#define VLIB_INIT_FUNCTION(x)
bfd_udp_key_t key
key identifying this session
u32 adj_index_t
An index for adjacencies.
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
@ ADJ_DELEGATE_BFD
BFD session state.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Context passed between object during a back walk.
struct adj_bfd_delegate_t_ adj_bfd_delegate_t
BFD delegate daa.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
static adj_bfd_delegate_t * adj_bfd_from_base(adj_delegate_t *ad)
adj_delegate_format_t adv_format