summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ism.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-06-12 17:32:23 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-03-25 08:52:36 +0100
commit3012671ffadbd839626b5c0b0b1fd36b3698f582 (patch)
tree847bacd0156e5e8dc2e64cbfbbf10c2f6e3ac9ac /ospfd/ospf_ism.h
parentbuild: split off libfrrsnmp (diff)
downloadfrr-3012671ffadbd839626b5c0b0b1fd36b3698f582.tar.xz
frr-3012671ffadbd839626b5c0b0b1fd36b3698f582.zip
*: use hooks for sending SNMP traps
This means there are no ties into the SNMP code anymore other than the init call at startup. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_ism.h')
-rw-r--r--ospfd/ospf_ism.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h
index f0357a482..fa8e6d70f 100644
--- a/ospfd/ospf_ism.h
+++ b/ospfd/ospf_ism.h
@@ -24,6 +24,8 @@
#ifndef _ZEBRA_OSPF_ISM_H
#define _ZEBRA_OSPF_ISM_H
+#include "hook.h"
+
/* OSPF Interface State Machine Status. */
#define ISM_DependUpon 0
#define ISM_Down 1
@@ -35,10 +37,6 @@
#define ISM_DR 7
#define OSPF_ISM_STATE_MAX 8
-/* Because DR/DROther values are exhanged wrt RFC */
-#define ISM_SNMP(x) (((x) == ISM_DROther) ? ISM_DR : \
- ((x) == ISM_DR) ? ISM_DROther : (x))
-
/* OSPF Interface State Machine Event. */
#define ISM_NoEvent 0
#define ISM_InterfaceUp 1
@@ -111,4 +109,8 @@ extern int ospf_ism_event (struct thread *);
extern void ism_change_status (struct ospf_interface *, int);
extern int ospf_hello_timer (struct thread *thread);
+DECLARE_HOOK(ospf_ism_change,
+ (struct ospf_interface *oi, int state, int oldstate),
+ (oi, state, oldstate))
+
#endif /* _ZEBRA_OSPF_ISM_H */