]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/nexthop_group.h
lib: add extern "C" {} blocks to all libfrr headers
[mirror_frr.git] / lib / nexthop_group.h
index b22e083e6bb0ef5d99225bd8f4dc13244cc8db5d..b14cbb5b5c7314ebd0a7d7d2428bc085765fc24b 100644 (file)
 #ifndef __NEXTHOP_GROUP__
 #define __NEXTHOP_GROUP__
 
+#include <vty.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * What is a nexthop group?
  *
@@ -54,6 +60,18 @@ void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
        (nhop);                                                         \
        (nhop) = nexthop_next(nhop)
 
+#define ALL_NEXTHOPS_PTR(head, nhop)                                   \
+       (nhop) = ((head)->nexthop);                                     \
+       (nhop);                                                         \
+       (nhop) = nexthop_next(nhop)
+
+
+struct nexthop_hold {
+       char *nhvrf_name;
+       union sockunion addr;
+       char *intf;
+};
+
 struct nexthop_group_cmd {
 
        RB_ENTRY(nexthop_group_cmd) nhgc_entry;
@@ -62,6 +80,8 @@ struct nexthop_group_cmd {
 
        struct nexthop_group nhg;
 
+       struct list *nhg_list;
+
        QOBJ_FIELDS
 };
 RB_HEAD(nhgc_entry_head, nexthp_group_cmd);
@@ -76,16 +96,27 @@ DECLARE_QOBJ_TYPE(nexthop_group_cmd)
  * code
  */
 void nexthop_group_init(
-       void (*new)(const char *name),
+       void (*create)(const char *name),
        void (*add_nexthop)(const struct nexthop_group_cmd *nhgc,
                            const struct nexthop *nhop),
        void (*del_nexthop)(const struct nexthop_group_cmd *nhgc,
                            const struct nexthop *nhop),
-       void (*delete)(const char *name));
+       void (*destroy)(const char *name));
+
+void nexthop_group_enable_vrf(struct vrf *vrf);
+void nexthop_group_disable_vrf(struct vrf *vrf);
+void nexthop_group_interface_state_change(struct interface *ifp,
+                                         ifindex_t oldifindex);
 
 extern struct nexthop *nexthop_exists(struct nexthop_group *nhg,
                                      struct nexthop *nh);
 
 extern struct nexthop_group_cmd *nhgc_find(const char *name);
 
+extern void nexthop_group_write_nexthop(struct vty *vty, struct nexthop *nh);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif