]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/bfd.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / lib / bfd.h
index b7e4eea5f316097c8aba60bc972f3cac796ccc81..bfa5287340f2c05d51b3f24b7c775b1a8864bf23 100644 (file)
--- a/lib/bfd.h
+++ b/lib/bfd.h
@@ -1,23 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /**
  * bfd.h: BFD definitions and structures
  *
  * @copyright Copyright (C) 2015 Cumulus Networks, Inc.
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef _ZEBRA_BFD_H
@@ -363,7 +348,7 @@ void bfd_sess_show(struct vty *vty, struct json_object *json,
  * Initializes the BFD integration library. This function executes the
  * following actions:
  *
- * - Copy the `struct thread_master` pointer to use as "thread" to execute
+ * - Copy the `struct event_loop` pointer to use as "thread" to execute
  *   the BFD session parameters installation.
  * - Copy the `struct zclient` pointer to install its callbacks.
  * - Initializes internal data structures.
@@ -371,8 +356,7 @@ void bfd_sess_show(struct vty *vty, struct json_object *json,
  * \param tm normally the daemon main thread event manager.
  * \param zc the zebra client of the daemon.
  */
-void bfd_protocol_integration_init(struct zclient *zc,
-                                  struct thread_master *tm);
+void bfd_protocol_integration_init(struct zclient *zc, struct event_loop *tm);
 
 /**
  * BFD session registration arguments.
@@ -473,6 +457,13 @@ extern bool bfd_protocol_integration_debug(void);
  */
 extern bool bfd_protocol_integration_shutting_down(void);
 
+/* Update nexthop-tracking (nht) information for BFD auto source selection.
+ * The function must be called from the daemon callback function
+ * that deals with the ZEBRA_NEXTHOP_UPDATE zclient command
+ */
+extern int bfd_nht_update(const struct prefix *match,
+                         const struct zapi_route *route);
+
 #ifdef __cplusplus
 }
 #endif