From: Emanuele Di Pascale Date: Wed, 14 Nov 2018 14:06:43 +0000 (+0100) Subject: isisd: implement the 'corrupted-lsp-detected' notification X-Git-Tag: frr-7.0.1~94^2~22 X-Git-Url: https://git.proxmox.com/?p=mirror_frr.git;a=commitdiff_plain;h=a23705455fa37952d8ca7d224ddec778c6e9a7ec;ds=sidebyside isisd: implement the 'corrupted-lsp-detected' notification However it is not currently called anywhere, as I could not find a place in the code where it felt appropriate. Signed-off-by: Emanuele Di Pascale --- diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c index d5eac45eb..136fec237 100644 --- a/isisd/isis_northbound.c +++ b/isisd/isis_northbound.c @@ -2550,6 +2550,25 @@ void isis_notif_if_state_change(const struct isis_circuit *circuit, bool down) nb_notification_send(xpath, arguments); } +/* + * XPath: + * /frr-isisd:corrupted-lsp-detected + */ +void isis_notif_corrupted_lsp(const struct isis_area *area, const char *lsp_id) +{ + const char *xpath = "/frr-isisd:corrupted-lsp-detected"; + struct list *arguments = yang_data_list_new(); + char xpath_arg[XPATH_MAXLEN]; + struct yang_data *data; + + notif_prep_instance_hdr(xpath, area, "default", arguments); + snprintf(xpath_arg, sizeof(xpath_arg), "%s/lsp-id", xpath); + data = yang_data_new_string(xpath_arg, lsp_id); + listnode_add(arguments, data); + + nb_notification_send(xpath, arguments); +} + /* clang-format off */ const struct frr_yang_module_info frr_isisd_info = { .name = "frr-isisd", diff --git a/isisd/isisd.h b/isisd/isisd.h index 05a25e660..12d3f2bec 100644 --- a/isisd/isisd.h +++ b/isisd/isisd.h @@ -227,6 +227,8 @@ extern void isis_notif_lsp_too_large(const struct isis_circuit *circuit, uint32_t pdu_size, const char *lsp_id); extern void isis_notif_if_state_change(const struct isis_circuit *circuit, bool down); +extern void isis_notif_corrupted_lsp(const struct isis_area *area, + const char *lsp_id); /* currently unused */ /* Master of threads. */ extern struct thread_master *master;