summaryrefslogtreecommitdiffstats
path: root/bfdd/bfdd_nb.h
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2020-05-15 22:38:04 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2020-05-20 20:18:00 +0200
commitccc9ada8681471ab6093502686ddd9122058dcbe (patch)
treed7cc49e01ae2843eac3e56dc83b3dd219d2322ef /bfdd/bfdd_nb.h
parentbfdd,lib,vtysh: new command node for BFD profiles (diff)
downloadfrr-ccc9ada8681471ab6093502686ddd9122058dcbe.tar.xz
frr-ccc9ada8681471ab6093502686ddd9122058dcbe.zip
bfdd: implement BFD session configuration profiles
Allow user to pre-configure peers with a profile. If a peer is using a profile any configuration made to the peer will take precedence over the profile configuration. In order to track the peer configuration we have now an extra copy of the peer configuration in `peer_profile` inside `struct bfd_session`. This information will help the profile functions to detect user configurations and avoid overriding what the user configured. This is especially important for peers created via other protocols where the default `shutdown` state is disabled (peers created manually are `shutdown` by default). Profiles can be used before they exist: if no profile exists then it will use the default configuration. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/bfdd_nb.h')
-rw-r--r--bfdd/bfdd_nb.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/bfdd/bfdd_nb.h b/bfdd/bfdd_nb.h
index 4fba3a0d3..a379c2135 100644
--- a/bfdd/bfdd_nb.h
+++ b/bfdd/bfdd_nb.h
@@ -28,6 +28,18 @@ extern const struct frr_yang_module_info frr_bfdd_info;
/* Mandatory callbacks. */
int bfdd_bfd_create(struct nb_cb_create_args *args);
int bfdd_bfd_destroy(struct nb_cb_destroy_args *args);
+int bfdd_bfd_profile_create(struct nb_cb_create_args *args);
+int bfdd_bfd_profile_destroy(struct nb_cb_destroy_args *args);
+int bfdd_bfd_profile_detection_multiplier_modify(
+ struct nb_cb_modify_args *args);
+int bfdd_bfd_profile_desired_transmission_interval_modify(
+ struct nb_cb_modify_args *args);
+int bfdd_bfd_profile_required_receive_interval_modify(
+ struct nb_cb_modify_args *args);
+int bfdd_bfd_profile_administrative_down_modify(struct nb_cb_modify_args *args);
+int bfdd_bfd_profile_echo_mode_modify(struct nb_cb_modify_args *args);
+int bfdd_bfd_profile_desired_echo_transmission_interval_modify(
+ struct nb_cb_modify_args *args);
int bfdd_bfd_sessions_single_hop_create(struct nb_cb_create_args *args);
int bfdd_bfd_sessions_single_hop_destroy(struct nb_cb_destroy_args *args);
const void *
@@ -39,6 +51,9 @@ int bfdd_bfd_sessions_single_hop_source_addr_modify(
struct nb_cb_modify_args *args);
int bfdd_bfd_sessions_single_hop_source_addr_destroy(
struct nb_cb_destroy_args *args);
+int bfdd_bfd_sessions_single_hop_profile_modify(struct nb_cb_modify_args *args);
+int bfdd_bfd_sessions_single_hop_profile_destroy(
+ struct nb_cb_destroy_args *args);
int bfdd_bfd_sessions_single_hop_detection_multiplier_modify(
struct nb_cb_modify_args *args);
int bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify(
@@ -187,5 +202,9 @@ void bfd_cli_show_echo(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void bfd_cli_show_echo_interval(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
+void bfd_cli_show_profile(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults);
+void bfd_cli_peer_profile_show(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults);
#endif /* _FRR_BFDD_NB_H_ */