mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:33:42 +00:00
isisd: implement the 'lsp-generation' notification
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
parent
8375020ac6
commit
998011fa8b
@ -1274,6 +1274,12 @@ int lsp_generate(struct isis_area *area, int level)
|
|||||||
"ISIS (%s): Built L%d LSP. Set triggered regenerate to non-pending.",
|
"ISIS (%s): Built L%d LSP. Set triggered regenerate to non-pending.",
|
||||||
area->area_tag, level);
|
area->area_tag, level);
|
||||||
|
|
||||||
|
#ifndef FABRICD
|
||||||
|
/* send northbound notification */
|
||||||
|
isis_notif_lsp_gen(area, rawlspid_print(newlsp->hdr.lsp_id),
|
||||||
|
newlsp->hdr.seqno, newlsp->last_generated);
|
||||||
|
#endif /* ifndef FABRICD */
|
||||||
|
|
||||||
return ISIS_OK;
|
return ISIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2787,6 +2787,32 @@ void isis_notif_lsp_received(const struct isis_circuit *circuit,
|
|||||||
nb_notification_send(xpath, arguments);
|
nb_notification_send(xpath, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XPath:
|
||||||
|
* /frr-isisd:lsp-generation
|
||||||
|
*/
|
||||||
|
void isis_notif_lsp_gen(const struct isis_area *area, const char *lsp_id,
|
||||||
|
uint32_t seqno, uint32_t timestamp)
|
||||||
|
{
|
||||||
|
const char *xpath = "/frr-isisd:lsp-generation";
|
||||||
|
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);
|
||||||
|
snprintf(xpath_arg, sizeof(xpath_arg), "%s/sequence", xpath);
|
||||||
|
data = yang_data_new_uint32(xpath_arg, seqno);
|
||||||
|
listnode_add(arguments, data);
|
||||||
|
snprintf(xpath_arg, sizeof(xpath_arg), "%s/send-timestamp", xpath);
|
||||||
|
data = yang_data_new_uint32(xpath_arg, timestamp);
|
||||||
|
listnode_add(arguments, data);
|
||||||
|
|
||||||
|
nb_notification_send(xpath, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
const struct frr_yang_module_info frr_isisd_info = {
|
const struct frr_yang_module_info frr_isisd_info = {
|
||||||
.name = "frr-isisd",
|
.name = "frr-isisd",
|
||||||
|
@ -250,6 +250,8 @@ extern void isis_notif_area_mismatch(const struct isis_circuit *circuit,
|
|||||||
extern void isis_notif_lsp_received(const struct isis_circuit *circuit,
|
extern void isis_notif_lsp_received(const struct isis_circuit *circuit,
|
||||||
const char *lsp_id, uint32_t seqno,
|
const char *lsp_id, uint32_t seqno,
|
||||||
uint32_t timestamp, const char *sys_id);
|
uint32_t timestamp, const char *sys_id);
|
||||||
|
extern void isis_notif_lsp_gen(const struct isis_area *area, const char *lsp_id,
|
||||||
|
uint32_t seqno, uint32_t timestamp);
|
||||||
/* Master of threads. */
|
/* Master of threads. */
|
||||||
extern struct thread_master *master;
|
extern struct thread_master *master;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user