aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj_glean.h
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2020-11-26 08:37:27 +0000
committerOle Tr�an <otroan@employees.org>2020-12-08 09:00:24 +0000
commite2fe097424fb169dfe01421ff17b8ccd0c26b4a6 (patch)
tree2d9993f78d9165c1aba23b1daa4067106da81b45 /src/vnet/adj/adj_glean.h
parent9b8cb5082471dd670066b8ba2872ffbcc35a87f8 (diff)
fib: Source Address Selection
Type: feature Use the FIB to provide SAS (in so far as it is today) - Use the glean adjacency as the record of the connected prefixes = there's a glean per-{interface, protocol, connected-prefix} - Keep the glean up to date with whatever the recieve host prefix is (since it can change) Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Change-Id: I0f3dd1edb1f3fc965af1c7c586709028eb9cdeac
Diffstat (limited to 'src/vnet/adj/adj_glean.h')
-rw-r--r--src/vnet/adj/adj_glean.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/vnet/adj/adj_glean.h b/src/vnet/adj/adj_glean.h
index 3ffbe36b51c..a06b9e81616 100644
--- a/src/vnet/adj/adj_glean.h
+++ b/src/vnet/adj/adj_glean.h
@@ -46,7 +46,7 @@
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
@@ -54,7 +54,8 @@ extern adj_index_t adj_glean_add_or_lock(fib_protocol_t proto,
* @return INVALID if it does not exist
*/
extern adj_index_t adj_glean_get(fib_protocol_t proto,
- u32 sw_if_index);
+ u32 sw_if_index,
+ const ip46_address_t *nh_addr);
/**
* adj_glean_update_rewrite
@@ -66,6 +67,14 @@ extern adj_index_t adj_glean_get(fib_protocol_t proto,
* 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.
@@ -73,9 +82,22 @@ extern void adj_glean_update_rewrite(adj_index_t adj_index);
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