+/**
+ * Distillation of the BFD session states into a go/no-go for using
+ * the associated tracked adjacency
+ */
+typedef enum adj_bfd_state_t_
+{
+ ADJ_BFD_STATE_DOWN,
+ ADJ_BFD_STATE_UP,
+} adj_bfd_state_t;
+
+#define ADJ_BFD_STATES { \
+ [ADJ_BFD_STATE_DOWN] = "down", \
+ [ADJ_BFD_STATE_UP] = "up", \
+}
+
+static const char *adj_bfd_state_names[] = ADJ_BFD_STATES;
+
+/**
+ * BFD delegate daa
+ */
+typedef struct adj_bfd_delegate_t_
+{
+ /**
+ * BFD session state
+ */
+ adj_bfd_state_t abd_state;
+
+ /**
+ * BFD session index
+ */
+ u32 abd_index;
+} adj_bfd_delegate_t;
+
+/**
+ * Pool of delegates
+*/
+static adj_bfd_delegate_t *abd_pool;
+
+static inline adj_bfd_delegate_t*
+adj_bfd_from_base (adj_delegate_t *ad)
+{
+ if (NULL != ad)
+ {
+ return (pool_elt_at_index(abd_pool, ad->ad_index));
+ }
+ return (NULL);
+}
+
+static inline const adj_bfd_delegate_t*
+adj_bfd_from_const_base (const adj_delegate_t *ad)
+{
+ if (NULL != ad)
+ {
+ return (pool_elt_at_index(abd_pool, ad->ad_index));
+ }
+ return (NULL);
+}
+