diff options
author | vincent <vincent> | 2005-09-29 16:34:30 +0000 |
---|---|---|
committer | vincent <vincent> | 2005-09-29 16:34:30 +0000 |
commit | 5e4914c31ead7b99eeed73067451367336b21422 (patch) | |
tree | f2c49d5c8182d4ee1b8ad8ca5005fe1223da18c8 /ospfd/ospf_ism.c | |
parent | ceacedba227e77156f92f7676b274c48a2817e8f (diff) |
2005-09-29 Alain Ritoux <alain.ritoux@6wind.com>
* lib/smux.[ch]: allow to retreive global OID (identified by <0
namelen).
* ospf_ism.c: generate SNMP traps on Interface state change
* ospf_nsm.c: generate SNMP traps on Neighbour state change
* ospf_snmp.[ch]: support for SNMP traps for interface and neighbours.
Diffstat (limited to 'ospfd/ospf_ism.c')
-rw-r--r-- | ospfd/ospf_ism.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c index b251e590..ab91e8d8 100644 --- a/ospfd/ospf_ism.c +++ b/ospfd/ospf_ism.c @@ -43,6 +43,7 @@ #include "ospfd/ospf_packet.h" #include "ospfd/ospf_flood.h" #include "ospfd/ospf_abr.h" +#include "ospfd/ospf_snmp.h" /* elect DR and BDR. Refer to RFC2319 section 9.4 */ static struct ospf_neighbor * @@ -552,6 +553,20 @@ ism_change_state (struct ospf_interface *oi, int state) oi->state = state; oi->state_change++; +#ifdef HAVE_SNMP + /* Terminal state or regression */ + if ((state == ISM_DR) || (state == ISM_Backup) || (state == ISM_DROther) || + (state == ISM_PointToPoint) || (state < old_state)) + { + /* ospfVirtIfStateChange */ + if (oi->type == OSPF_IFTYPE_VIRTUALLINK) + ospfTrapVirtIfStateChange (oi); + /* ospfIfStateChange */ + else + ospfTrapIfStateChange (oi); + } +#endif + /* Set multicast memberships appropriately for new state. */ ospf_if_set_multicast(oi); |