diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2022-11-15 11:22:09 -0300 | 
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2023-01-13 15:32:12 -0300 | 
| commit | b7ca809d1c1386aed0d4571cfbcd448b9868a298 (patch) | |
| tree | 02a1d7089c382e08292d75e248df0598ea1999b9 /lib/bfd.h | |
| parent | c0937881df35118f726536be80e4a9028c57334b (diff) | |
lib: BFD automatic source selection
Implement new BFD library issue to allow protocols to configure BFD
sessions with automatic source selection.
The source selection will be based on the Next Hop Tracking feature:
`zebra` will do RIB lookups to determine the output interface and the
primary source address of that interface will be used as source.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'lib/bfd.h')
| -rw-r--r-- | lib/bfd.h | 17 | 
1 files changed, 17 insertions, 0 deletions
@@ -222,6 +222,18 @@ void bfd_sess_set_timers(struct bfd_session_params *bsp,  			 uint32_t min_tx);  /** + * Configures the automatic source selection for the BFD session. + * + * NOTE: + * Setting this configuration will override the IP source value set by + * `bfd_sess_set_ipv4_addrs` or `bfd_sess_set_ipv6_addrs`. + * + * \param bsp BFD session parameters + * \param enable BFD automatic source selection state. + */ +void bfd_sess_set_auto_source(struct bfd_session_params *bsp, bool enable); + +/**   * Installs or updates the BFD session based on the saved session arguments.   *   * NOTE: @@ -331,6 +343,11 @@ void bfd_sess_timers(const struct bfd_session_params *bsp,  		     uint32_t *min_tx);  /** + * Gets the automatic source selection state. + */ +bool bfd_sess_auto_source(const struct bfd_session_params *bsp); + +/**   * Show BFD session configuration and status. If `json` is provided (e.g. not   * `NULL`) then information will be inserted in object, otherwise printed to   * `vty`.  | 
