diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-06-12 17:32:23 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-03-25 08:52:36 +0100 |
commit | 3012671ffadbd839626b5c0b0b1fd36b3698f582 (patch) | |
tree | 847bacd0156e5e8dc2e64cbfbbf10c2f6e3ac9ac /ospfd/ospf_interface.c | |
parent | build: split off libfrrsnmp (diff) | |
download | frr-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_interface.c')
-rw-r--r-- | ospfd/ospf_interface.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 4fb206589..b4a282a52 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -47,11 +47,10 @@ #include "ospfd/ospf_abr.h" #include "ospfd/ospf_network.h" #include "ospfd/ospf_dump.h" -#ifdef HAVE_SNMP -#include "ospfd/ospf_snmp.h" -#endif /* HAVE_SNMP */ DEFINE_QOBJ_TYPE(ospf_interface) +DEFINE_HOOK(ospf_vl_add, (struct ospf_vl_data *vd), (vd)) +DEFINE_HOOK(ospf_vl_delete, (struct ospf_vl_data *vd), (vd)) int ospf_if_get_output_cost (struct ospf_interface *oi) @@ -993,9 +992,7 @@ void ospf_vl_add (struct ospf *ospf, struct ospf_vl_data *vl_data) { listnode_add (ospf->vlinks, vl_data); -#ifdef HAVE_SNMP - ospf_snmp_vl_add (vl_data); -#endif /* HAVE_SNMP */ + hook_call(ospf_vl_add, vl_data); } void @@ -1004,9 +1001,7 @@ ospf_vl_delete (struct ospf *ospf, struct ospf_vl_data *vl_data) ospf_vl_shutdown (vl_data); ospf_vl_if_delete (vl_data); -#ifdef HAVE_SNMP - ospf_snmp_vl_delete (vl_data); -#endif /* HAVE_SNMP */ + hook_call(ospf_vl_delete, vl_data); listnode_delete (ospf->vlinks, vl_data); ospf_vl_data_free (vl_data); |