summaryrefslogtreecommitdiff
path: root/lib/nexthop_group.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-10-24 09:25:54 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-11-04 13:34:27 -0400
commitf3c6dd49f47d4d092a43d55d4af87521a323b3ae (patch)
tree8ea9464fc6d205cd4c96cfb9bedc8b8de6e34dd4 /lib/nexthop_group.h
parentf0f618dcdbcd70047897109851b61ded5a63d5e8 (diff)
*: Add ability for daemons to notice resilience changes
This patch just introduces the callback mechanism for the resilient nexthop changes so that upper level daemons can take advantage of the change. This does nothing at this point but just call some code. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/nexthop_group.h')
-rw-r--r--lib/nexthop_group.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h
index 7d1b57a2f9..0ea0b7c185 100644
--- a/lib/nexthop_group.h
+++ b/lib/nexthop_group.h
@@ -118,9 +118,17 @@ DECLARE_QOBJ_TYPE(nexthop_group_cmd);
* a nexthop_group is added/deleted/modified, then set the
* appropriate callback functions to handle it in your
* code
+ *
+ * create - The creation of the nexthop group
+ * modify - Modification of the nexthop group when not changing a nexthop
+ * ( resilience as an example )
+ * add_nexthop - A nexthop is added to the NHG
+ * del_nexthop - A nexthop is deleted from the NHG
+ * destroy - The NHG is deleted
*/
void nexthop_group_init(
void (*create)(const char *name),
+ void (*modify)(const struct nexthop_group_cmd *nhgc),
void (*add_nexthop)(const struct nexthop_group_cmd *nhgc,
const struct nexthop *nhop),
void (*del_nexthop)(const struct nexthop_group_cmd *nhgc,