X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fadj%2Fadj_glean.h;h=a06b9e816169329d4a5b3cc48ca10d95c0049aac;hb=e2fe09742;hp=640bd2f91eb1bc4ee38c2bdd9e7170e405569127;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/vnet/adj/adj_glean.h b/src/vnet/adj/adj_glean.h index 640bd2f91eb..a06b9e81616 100644 --- a/src/vnet/adj/adj_glean.h +++ b/src/vnet/adj/adj_glean.h @@ -44,18 +44,60 @@ * as the source address in packets when the ARP/ND packet is sent */ extern adj_index_t adj_glean_add_or_lock(fib_protocol_t proto, + vnet_link_t linkt, u32 sw_if_index, - const ip46_address_t *nh_addr); + const fib_prefix_t *conn); + +/** + * @brief Get an existing glean + * + * @return INVALID if it does not exist + */ +extern adj_index_t adj_glean_get(fib_protocol_t proto, + u32 sw_if_index, + const ip46_address_t *nh_addr); + +/** + * adj_glean_update_rewrite + * + * Called by an adjacency provider (an interface type) to configure + * a glean adj (i.e. and adjacency linked to a connected prefix) to + * its default behaviour. + * Other interface types (i.e. 6RD tunnels) can can choose not to use + * glean behaviour on an adjacency liked to a connected prefix. + */ +extern void adj_glean_update_rewrite(adj_index_t adj_index); +extern void adj_glean_update_rewrite_itf(u32 sw_if_index); + +/** + * Return the source address from the glean + */ +const ip46_address_t *adj_glean_get_src(fib_protocol_t proto, + u32 sw_if_index, + const ip46_address_t *nh_addr); /** * @brief Format/display a glean adjacency. */ extern u8* format_adj_glean(u8* s, va_list *ap); +/** + * Walk all the gleans on an interface + */ +extern void adj_glean_walk (u32 sw_if_index, + adj_walk_cb_t, + void *); + /** * @brief * Module initialisation */ extern void adj_glean_module_init(void); +/** + * @brief + * Return the size of the adjacency database. for testing purposes + */ +extern u32 adj_glean_db_size(void); + #endif