diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2021-03-15 02:14:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 02:14:27 +0100 |
commit | e1908ceb4242dffc97a4204da4ffa57a52c5512d (patch) | |
tree | 1ce6d9d02aeed10d72896a816fe028028e829c88 /isisd/isis_nb.h | |
parent | Merge pull request #8160 from idryzhov/fix-show-yang-oper (diff) | |
parent | tests: Adding test for ISIS SNMP (diff) | |
download | frr-e1908ceb4242dffc97a4204da4ffa57a52c5512d.tar.xz frr-e1908ceb4242dffc97a4204da4ffa57a52c5512d.zip |
Merge pull request #7945 from volta-networks/feat_isis_snmp
isisd: add support for read-only snmp mibs objects
Diffstat (limited to 'isisd/isis_nb.h')
-rw-r--r-- | isisd/isis_nb.h | 89 |
1 files changed, 73 insertions, 16 deletions
diff --git a/isisd/isis_nb.h b/isisd/isis_nb.h index dfa77fbac..a6841b9fd 100644 --- a/isisd/isis_nb.h +++ b/isisd/isis_nb.h @@ -549,40 +549,97 @@ void cli_show_isis_mpls_if_ldp_sync_holddown(struct vty *vty, /* Notifications. */ void isis_notif_db_overload(const struct isis_area *area, bool overload); void isis_notif_lsp_too_large(const struct isis_circuit *circuit, - uint32_t pdu_size, const char *lsp_id); + uint32_t pdu_size, const uint8_t *lsp_id); void isis_notif_if_state_change(const struct isis_circuit *circuit, bool down); void isis_notif_corrupted_lsp(const struct isis_area *area, - const char *lsp_id); /* currently unused */ + const uint8_t *lsp_id); /* currently unused */ void isis_notif_lsp_exceed_max(const struct isis_area *area, - const char *lsp_id); + const uint8_t *lsp_id); void isis_notif_max_area_addr_mismatch(const struct isis_circuit *circuit, uint8_t max_area_addrs, - const char *raw_pdu); + const char *raw_pdu, size_t raw_pdu_len); void isis_notif_authentication_type_failure(const struct isis_circuit *circuit, - const char *raw_pdu); + const char *raw_pdu, + size_t raw_pdu_len); void isis_notif_authentication_failure(const struct isis_circuit *circuit, - const char *raw_pdu); + const char *raw_pdu, size_t raw_pdu_len); void isis_notif_adj_state_change(const struct isis_adjacency *adj, int new_state, const char *reason); void isis_notif_reject_adjacency(const struct isis_circuit *circuit, - const char *reason, const char *raw_pdu); + const char *reason, const char *raw_pdu, + size_t raw_pdu_len); void isis_notif_area_mismatch(const struct isis_circuit *circuit, - const char *raw_pdu); + const char *raw_pdu, size_t raw_pdu_len); void isis_notif_lsp_received(const struct isis_circuit *circuit, - const char *lsp_id, uint32_t seqno, + const uint8_t *lsp_id, uint32_t seqno, uint32_t timestamp, const char *sys_id); -void isis_notif_lsp_gen(const struct isis_area *area, const char *lsp_id, +void isis_notif_lsp_gen(const struct isis_area *area, const uint8_t *lsp_id, uint32_t seqno, uint32_t timestamp); void isis_notif_id_len_mismatch(const struct isis_circuit *circuit, - uint8_t rcv_id_len, const char *raw_pdu); + uint8_t rcv_id_len, const char *raw_pdu, + size_t raw_pdu_len); void isis_notif_version_skew(const struct isis_circuit *circuit, - uint8_t version, const char *raw_pdu); + uint8_t version, const char *raw_pdu, + size_t raw_pdu_len); void isis_notif_lsp_error(const struct isis_circuit *circuit, - const char *lsp_id, const char *raw_pdu, - uint32_t offset, uint8_t tlv_type); + const uint8_t *lsp_id, const char *raw_pdu, + size_t raw_pdu_len, uint32_t offset, + uint8_t tlv_type); void isis_notif_seqno_skipped(const struct isis_circuit *circuit, - const char *lsp_id); + const uint8_t *lsp_id); void isis_notif_own_lsp_purge(const struct isis_circuit *circuit, - const char *lsp_id); + const uint8_t *lsp_id); + +/* We also declare hook for every notification */ + +DECLARE_HOOK(isis_hook_db_overload, (const struct isis_area *area), (area)); +DECLARE_HOOK(isis_hook_lsp_too_large, + (const struct isis_circuit *circuit, uint32_t pdu_size, + const uint8_t *lsp_id), + (circuit, pdu_size, lsp_id)); +/* Note: no isis_hook_corrupted_lsp - because this notificaiton is not used */ +DECLARE_HOOK(isis_hook_lsp_exceed_max, + (const struct isis_area *area, const uint8_t *lsp_id), + (area, lsp_id)); +DECLARE_HOOK(isis_hook_max_area_addr_mismatch, + (const struct isis_circuit *circuit, uint8_t max_addrs, + const char *raw_pdu, size_t raw_pdu_len), + (circuit, max_addrs, raw_pdu, raw_pdu_len)); +DECLARE_HOOK(isis_hook_authentication_type_failure, + (const struct isis_circuit *circuit, const char *raw_pdu, + size_t raw_pdu_len), + (circuit, raw_pdu, raw_pdu_len)); +DECLARE_HOOK(isis_hook_authentication_failure, + (const struct isis_circuit *circuit, const char *raw_pdu, + size_t raw_pdu_len), + (circuit, raw_pdu, raw_pdu_len)); +DECLARE_HOOK(isis_hook_adj_state_change, (const struct isis_adjacency *adj), + (adj)); +DECLARE_HOOK(isis_hook_reject_adjacency, + (const struct isis_circuit *circuit, const char *pdu, + size_t pdu_len), + (circuit, pdu, pdu_len)); +DECLARE_HOOK(isis_hook_area_mismatch, + (const struct isis_circuit *circuit, const char *raw_pdu, + size_t raw_pdu_len), + (circuit)); +DECLARE_HOOK(isis_hook_id_len_mismatch, + (const struct isis_circuit *circuit, uint8_t rcv_id_len, + const char *raw_pdu, size_t raw_pdu_len), + (circuit, rcv_id_len, raw_pdu, raw_pdu_len)); +DECLARE_HOOK(isis_hook_version_skew, + (const struct isis_circuit *circuit, uint8_t version, + const char *raw_pdu, size_t raw_pdu_len), + (circuit)); +DECLARE_HOOK(isis_hook_lsp_error, + (const struct isis_circuit *circuit, const uint8_t *lsp_id, + const char *raw_pdu, size_t raw_pdu_len), + (circuit)); +DECLARE_HOOK(isis_hook_seqno_skipped, + (const struct isis_circuit *circuit, const uint8_t *lsp_id), + (circuit, lsp_id)); +DECLARE_HOOK(isis_hook_own_lsp_purge, + (const struct isis_circuit *circuit, const uint8_t *lsp_id), + (circuit, lsp_id)); #endif /* ISISD_ISIS_NB_H_ */ |