diff options
author | Stef Walter <stef@memberwebs.com> | 2006-04-04 21:07:18 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-04-04 21:07:18 +0000 |
commit | 1e735c038c86294df2ecfbd6a39abcfab4b3e8c3 (patch) | |
tree | 55dc3d3288d17d53fadf3471bb465fefb1b42b12 /daemon/rrdbotd.c | |
parent | 1fe43cb40fb54412528b7538718a457d2167c603 (diff) |
Move functionality for parsing MIBs, SNMP into common files.
Diffstat (limited to 'daemon/rrdbotd.c')
-rw-r--r-- | daemon/rrdbotd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/daemon/rrdbotd.c b/daemon/rrdbotd.c index 261955d..e2b0248 100644 --- a/daemon/rrdbotd.c +++ b/daemon/rrdbotd.c @@ -46,6 +46,7 @@ #include <bsnmp/asn1.h> #include <bsnmp/snmp.h> +#include <mib/mib-parser.h> #include "rrdbotd.h" #include "server-mainloop.h" @@ -53,7 +54,6 @@ /* The default command line options */ #define DEFAULT_CONFIG CONF_PREFIX "/rrdbot" #define DEFAULT_WORK "/var/db/rrdbot" -#define DEFAULT_MIB DATA_PREFIX "/mib" #define DEFAULT_RETRIES 3 #define DEFAULT_TIMEOUT 5 @@ -64,10 +64,6 @@ /* The one main state object */ rb_state g_state; -/* Whether we print warnings when loading MIBs or not */ -const char* g_mib_directory = DEFAULT_MIB; -int g_mib_warnings = 0; - /* Some logging flags */ static int daemonized = 0; static int debug_level = LOG_ERR; @@ -251,12 +247,12 @@ main(int argc, char* argv[]) /* mib directory */ case 'm': - g_mib_directory = optarg; + mib_directory = optarg; break; /* MIB load warnings */ case 'M': - g_mib_warnings = 1; + mib_warnings = 1; break; /* Write out a pid file */ @@ -309,7 +305,7 @@ main(int argc, char* argv[]) rb_config_parse(); /* As an optimization we unload the MIB processing data here */ - rb_mib_uninit(); + mib_uninit(); /* Rev up the main engine */ rb_snmp_engine_init(); |