diff options
author | Christian Hopps <chopps@labn.net> | 2024-01-30 09:05:18 +0100 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2024-01-30 10:57:10 +0100 |
commit | 25bb8b203cdbf3b40f938add7352666146183c03 (patch) | |
tree | 90ba100c73a7f97401bd9362daa9a0a86a9f957c /lib/northbound.c | |
parent | Merge pull request #15238 from louis-6wind/bgp-leak-network (diff) | |
download | frr-25bb8b203cdbf3b40f938add7352666146183c03.tar.xz frr-25bb8b203cdbf3b40f938add7352666146183c03.zip |
lib: mgmtd: add YANG notification support
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound.c')
-rw-r--r-- | lib/northbound.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/northbound.c b/lib/northbound.c index b1da3315d..a0b1bd18c 100644 --- a/lib/northbound.c +++ b/lib/northbound.c @@ -2068,6 +2068,23 @@ int nb_notification_send(const char *xpath, struct list *arguments) return ret; } +DEFINE_HOOK(nb_notification_tree_send, (struct lyd_node *tree), (tree)); + +int nb_notification_tree_send(struct lyd_node *tree) +{ + int ret; + + assert(tree); + + DEBUGD(&nb_dbg_notif, "northbound tree notification: %s", + tree->schema->name); + + ret = hook_call(nb_notification_tree_send, tree); + lyd_free_all(tree); + + return ret; +} + /* Running configuration user pointers management. */ struct nb_config_entry { char xpath[XPATH_MAXLEN]; |