From 3bc4f84efe147ebc65fccbe898b81d78341c542b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 4 Jun 2012 11:40:04 +0200 Subject: ospf6d: add SNMP implementation of ospfv3IfTable --- ospf6d/ospf6_interface.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ospf6d/ospf6_interface.c') diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 71aa6859..6f7aaa8a 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -394,6 +394,7 @@ ospf6_interface_state_change (u_char next_state, struct ospf6_interface *oi) ospf6_interface_state_str[prev_state], ospf6_interface_state_str[next_state]); } + oi->state_change++; if ((prev_state == OSPF6_INTERFACE_DR || prev_state == OSPF6_INTERFACE_BDR) && -- cgit v1.2.1 From bf836661ef8ef880350bc41f0a82566ed5075066 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 4 Jun 2012 14:36:12 +0200 Subject: ospf6d: add SNMP notifications/traps support Only implement ospfv3NbrStateChange and ospfv3IfStateChange. --- ospf6d/ospf6_interface.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ospf6d/ospf6_interface.c') diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 6f7aaa8a..40cda246 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -421,6 +421,17 @@ ospf6_interface_state_change (u_char next_state, struct ospf6_interface *oi) OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi); OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area); } + +#ifdef HAVE_SNMP + /* Terminal state or regression */ + if ((next_state == OSPF6_INTERFACE_POINTTOPOINT) || + (next_state == OSPF6_INTERFACE_DROTHER) || + (next_state == OSPF6_INTERFACE_BDR) || + (next_state == OSPF6_INTERFACE_DR) || + (next_state < prev_state)) + ospf6TrapIfStateChange (oi); +#endif + } -- cgit v1.2.1