X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fadj%2Fadj_internal.h;h=adb7a32375dd9781ed3ccfc6620317d87008cee1;hb=cbe25aab3be72154f2c706c39eeba6a77f34450f;hp=e6d276e4d0246792f18c691fe2fcd772e8548d64;hpb=438f63094465d35c278155484fe85153e438873e;p=vpp.git diff --git a/src/vnet/adj/adj_internal.h b/src/vnet/adj/adj_internal.h index e6d276e4d02..adb7a32375d 100644 --- a/src/vnet/adj/adj_internal.h +++ b/src/vnet/adj/adj_internal.h @@ -78,12 +78,27 @@ adj_fib_proto_2_nd (fib_protocol_t fp) return (0); } +static inline ip46_type_t +adj_proto_to_46 (fib_protocol_t proto) +{ + switch (proto) + { + case FIB_PROTOCOL_IP4: + return (IP46_TYPE_IP4); + case FIB_PROTOCOL_IP6: + return (IP46_TYPE_IP6); + default: + return (IP46_TYPE_IP4); + } + return (IP46_TYPE_IP4); +} + /** * @brief * Get a pointer to an adjacency object from its index */ static inline adj_index_t -adj_get_index (ip_adjacency_t *adj) +adj_get_index (const ip_adjacency_t *adj) { return (adj - adj_pool); } @@ -112,4 +127,16 @@ extern void adj_mcast_remove(fib_protocol_t proto, extern u32 adj_dpo_get_urpf(const dpo_id_t *dpo); +/* + * Adj BFD + */ +extern int adj_bfd_is_up (adj_index_t ai); + +/* + * Adj delegates + */ +extern void adj_delegate_adj_deleted(ip_adjacency_t *adj); +extern void adj_delegate_adj_created(ip_adjacency_t *adj); +extern u8* adj_delegate_format(u8* s, ip_adjacency_t *adj); + #endif