summaryrefslogtreecommitdiffstats
path: root/bfdd/bfd.h
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2020-08-18 18:06:48 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2020-11-24 11:54:07 +0100
commitefd04d60caa237de5c564355089c59794057ff1d (patch)
treecbb188f206626edacf5618a409799ebf7a2a08e6 /bfdd/bfd.h
parentbfdd: disable sockets when using distributed BFD (diff)
downloadfrr-efd04d60caa237de5c564355089c59794057ff1d.tar.xz
frr-efd04d60caa237de5c564355089c59794057ff1d.zip
bfdd: integrate distributed BFD
Add hooks in the correct places so the BFD daemon uses the data plane instead of the software packet sending implementation to monitor the session. This code also adds some handlers to support fallback to FRR BFD session handling, however since this complicates the code it won't work at the moment (the BFD sockets are disabled by default when using data plane). Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/bfd.h')
-rw-r--r--bfdd/bfd.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/bfdd/bfd.h b/bfdd/bfd.h
index 2a7629b33..8b06ccdd0 100644
--- a/bfdd/bfd.h
+++ b/bfdd/bfd.h
@@ -767,4 +767,31 @@ int ptm_bfd_notify(struct bfd_session *bs, uint8_t notify_state);
*/
void bfd_dplane_init(const struct sockaddr *sa, socklen_t salen);
+/**
+ * Attempts to delegate the BFD session liveness detection to hardware.
+ *
+ * \param bs the BFD session data structure.
+ *
+ * \returns
+ * `0` on success and BFD daemon should do nothing or `-1` on failure
+ * and we should fallback to software implementation.
+ */
+int bfd_dplane_add_session(struct bfd_session *bs);
+
+/**
+ * Send new session settings to data plane.
+ *
+ * \param bs the BFD session to update.
+ */
+int bfd_dplane_update_session(const struct bfd_session *bs);
+
+/**
+ * Deletes session from data plane.
+ *
+ * \param bs the BFD session to delete.
+ *
+ * \returns `0` on success otherwise `-1`.
+ */
+int bfd_dplane_delete_session(struct bfd_session *bs);
+
#endif /* _BFD_H_ */