summaryrefslogtreecommitdiff
path: root/ospfd/ospf_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r--ospfd/ospf_zebra.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index cb14273eed..abb6db0347 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -50,11 +50,11 @@
#include "ospfd/ospf_neighbor.h"
#include "ospfd/ospf_nsm.h"
#include "ospfd/ospf_zebra.h"
-#ifdef HAVE_SNMP
-#include "ospfd/ospf_snmp.h"
-#endif /* HAVE_SNMP */
#include "ospfd/ospf_te.h"
+DEFINE_HOOK(ospf_if_update, (struct interface *ifp), (ifp))
+DEFINE_HOOK(ospf_if_delete, (struct interface *ifp), (ifp))
+
/* Zebra structure to hold current status. */
struct zclient *zclient = NULL;
@@ -112,9 +112,7 @@ ospf_interface_add (int command, struct zclient *zclient, zebra_size_t length,
ospf_if_update (NULL, ifp);
-#ifdef HAVE_SNMP
- ospf_snmp_if_update (ifp);
-#endif /* HAVE_SNMP */
+ hook_call(ospf_if_update, ifp);
return 0;
}
@@ -143,9 +141,7 @@ ospf_interface_delete (int command, struct zclient *zclient,
("Zebra: interface delete %s[%u] index %d flags %llx metric %d mtu %d",
ifp->name, ifp->vrf_id, ifp->ifindex, (unsigned long long)ifp->flags, ifp->metric, ifp->mtu);
-#ifdef HAVE_SNMP
- ospf_snmp_if_delete (ifp);
-#endif /* HAVE_SNMP */
+ hook_call(ospf_if_delete, ifp);
for (rn = route_top (IF_OIFS (ifp)); rn; rn = route_next (rn))
if (rn->info)
@@ -277,9 +273,7 @@ ospf_interface_address_add (int command, struct zclient *zclient,
ospf_if_update (NULL, c->ifp);
-#ifdef HAVE_SNMP
- ospf_snmp_if_update (c->ifp);
-#endif /* HAVE_SNMP */
+ hook_call(ospf_if_update, c->ifp);
return 0;
}
@@ -324,9 +318,7 @@ ospf_interface_address_delete (int command, struct zclient *zclient,
/* Call interface hook functions to clean up */
ospf_if_free (oi);
-#ifdef HAVE_SNMP
- ospf_snmp_if_update (c->ifp);
-#endif /* HAVE_SNMP */
+ hook_call(ospf_if_update, c->ifp);
connected_free (c);