#include "mib_module_config.h"#include <config.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <sys/time.h>#include <time.h>#include <netinet/in.h>#include <dmalloc.h>#include "asn1.h"#include "snmp_api.h"#include "snmp_impl.h"#include "system.h"#include "read_config.h"#include "snmp.h"#include "mib.h"#include "m2m.h"#include "snmp_agent.h"#include "agent_handler.h"#include "snmp_vars.h"#include "agent_read_config.h"#include "snmpv3.h"#include "callback.h"#include "snmp_alarm.h"#include "default_store.h"#include "snmp_debug.h"#include "tools.h"#include "ds_agent.h"#include "snmp_secmod.h"#include "mibgroup/struct.h"#include "mib_modules.h"#include "helpers/table.h"#include "helpers/table_iterator.h"#include "mib_module_includes.h"#include "mibgroup/agentx/subagent.h"#include "mib_module_inits.h"Go to the source code of this file.
Functions | |
| void | add_to_init_list (const char *module_list) |
| int | should_init (const char *module_name) |
| void | init_mib_modules (void) |
Variables | |
| module_init_list * | initlist = NULL |
| module_init_list * | noinitlist = NULL |
|
|
Definition at line 77 of file mib_modules.c. 00077 {
00078 struct module_init_list *newitem, **list;
00079 char *cp;
00080
00081 if (module_list == NULL) {
00082 return;
00083 } else {
00084 cp = (char *)module_list;
00085 }
00086
00087 if (*cp == '-' || *cp == '!') {
00088 cp++;
00089 list = &noinitlist;
00090 } else {
00091 list = &initlist;
00092 }
00093
00094 cp = strtok(cp, ", :");
00095 while(cp) {
00096 newitem = (struct module_init_list *)calloc(1, sizeof (*initlist));
00097 newitem->module_name = strdup(cp);
00098 newitem->next = *list;
00099 *list = newitem;
00100 cp = strtok(NULL, ", :");
00101 }
00102 }
|
|
|
Definition at line 140 of file mib_modules.c. Referenced by main().
00140 {
00141 # include "mib_module_inits.h"
00142 }
|
|
|
Definition at line 105 of file mib_modules.c. 00105 {
00106 struct module_init_list *listp;
00107
00108 /* a definitive list takes priority */
00109 if (initlist) {
00110 listp = initlist;
00111 while (listp) {
00112 if (strcmp(listp->module_name, module_name) == 0) {
00113 DEBUGMSGTL(("mib_init","initializing: %s\n",module_name));
00114 return DO_INITIALIZE;
00115 }
00116 listp = listp->next;
00117 }
00118 DEBUGMSGTL(("mib_init","skipping: %s\n",module_name));
00119 return DONT_INITIALIZE;
00120 }
00121
00122 /* initialize it only if not on the bad list (bad module, no bone) */
00123 if (noinitlist) {
00124 listp = noinitlist;
00125 while (listp) {
00126 if (strcmp(listp->module_name, module_name) == 0) {
00127 DEBUGMSGTL(("mib_init","skipping: %s\n",module_name));
00128 return DONT_INITIALIZE;
00129 }
00130 listp = listp->next;
00131 }
00132 }
00133 DEBUGMSGTL(("mib_init","initializing: %s\n",module_name));
00134
00135 /* initialize it */
00136 return DO_INITIALIZE;
00137 }
|
|
|
Definition at line 72 of file mib_modules.c. |
|
|
Definition at line 73 of file mib_modules.c. |
1.2.11 written by Dimitri van Heesch,
© 1997-2001
[an error occurred while processing this directive]
[an error occurred while processing this directive]
Last modified: Wednesday, 01-Aug-2018 04:41:28 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.