diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-04-04 20:04:07 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-04-04 20:04:07 +0200 |
| commit | 422f8d0ca9745a16b1f46710c621fc9f98200bcf (patch) | |
| tree | 24e91ad38adfd824c624a4a46889e6102b913225 /zebra/zebra_snmp.c | |
| parent | b394fc99bc4b555aa3c78521439b28f1ff8886ef (diff) | |
| parent | b3cfe637a66a5de00c72125f5fa051155ccb4a29 (diff) | |
Merge branch 'master'
Diffstat (limited to 'zebra/zebra_snmp.c')
| -rw-r--r-- | zebra/zebra_snmp.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c index 19364b5b91..8adb8873dc 100644 --- a/zebra/zebra_snmp.c +++ b/zebra/zebra_snmp.c @@ -25,7 +25,6 @@ #include <zebra.h> -#ifdef HAVE_SNMP #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> @@ -36,6 +35,9 @@ #include "smux.h" #include "table.h" #include "vrf.h" +#include "hook.h" +#include "libfrr.h" +#include "version.h" #include "zebra/rib.h" #include "zebra/zserv.h" @@ -571,10 +573,24 @@ ipCidrTable (struct variable *v, oid objid[], size_t *objid_len, return NULL; } -void -zebra_snmp_init () +static int +zebra_snmp_init (struct thread_master *tm) { - smux_init (zebrad.master); + smux_init (tm); REGISTER_MIB("mibII/ipforward", zebra_variables, variable, ipfw_oid); + return 0; +} + +static int +zebra_snmp_module_init (void) +{ + hook_register(frr_late_init, zebra_snmp_init); + return 0; } -#endif /* HAVE_SNMP */ + +FRR_MODULE_SETUP( + .name = "zebra_snmp", + .version = FRR_VERSION, + .description = "zebra AgentX SNMP module", + .init = zebra_snmp_module_init, +) |
