diff options
author | Emanuele Di Pascale <emanuele@voltanet.io> | 2018-11-14 15:06:43 +0100 |
---|---|---|
committer | Emanuele Di Pascale <emanuele@voltanet.io> | 2018-12-18 15:24:46 +0100 |
commit | a23705455fa37952d8ca7d224ddec778c6e9a7ec (patch) | |
tree | 8b6711cff143f50e97f06fe66e572bc632c9f16c /isisd | |
parent | isisd: implement the 'if-state-change' notification (diff) | |
download | frr-a23705455fa37952d8ca7d224ddec778c6e9a7ec.tar.xz frr-a23705455fa37952d8ca7d224ddec778c6e9a7ec.zip |
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 <emanuele@voltanet.io>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_northbound.c | 19 | ||||
-rw-r--r-- | isisd/isisd.h | 2 |
2 files changed, 21 insertions, 0 deletions
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; |