74 return (delegate1->
ad_type - delegate2->ad_type);
100 if (
NULL == delegate)
121 s =
format(s,
"BFD:[state:%d index:%d]",
adj_delegate_type_t ad_type
The delagate type.
static int adj_delegate_cmp_for_sort(void *v1, void *v2)
static adj_delegate_t * adj_delegate_find_i(const ip_adjacency_t *adj, adj_delegate_type_t type, u32 *index)
adj_bfd_state_t ad_bfd_state
BFD session state.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static adj_delegate_format_t aed_formatters[]
A delegate type to formatter map.
u32 ad_bfd_index
BFD session index.
static u8 * adj_delegate_fmt_bfd(const adj_delegate_t *aed, u8 *s)
Print a delegate that represents BFD tracking.
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functi...
enum adj_delegate_type_t_ adj_delegate_type_t
Delegate types.
static adj_index_t adj_get_index(ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
adj_index_t ad_adj_index
The ADJ entry object to which the delagate is attached.
adj_delegate_t * adj_delegate_find_or_add(ip_adjacency_t *adj, adj_delegate_type_t adt)
#define vec_del1(v, i)
Delete the element at index I.
u8 * format_adj_deletegate(u8 *s, va_list *args)
u8 *(* adj_delegate_format_t)(const adj_delegate_t *aed, u8 *s)
typedef for printing a delegate
void adj_delegate_remove(ip_adjacency_t *adj, adj_delegate_type_t type)
adj_delegate_t * adj_delegate_get(const ip_adjacency_t *adj, adj_delegate_type_t type)
static void adj_delegate_init(ip_adjacency_t *adj, adj_delegate_type_t type)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
#define vec_foreach(var, vec)
Vector iterator.
struct adj_delegate_t_ * ia_delegates
more control plane members that do not fit on the first cacheline