/* Initializes the expObjectConf module */ void init_expObjectConf(void) { init_expObject_table_data(); /* * Register config handler for persistent storage * of dynamically configured entries. */ snmpd_register_config_handler("_expOTable", parse_expOTable, NULL, NULL); /* * Register to save (non-fixed) entries when the agent shuts down */ snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, store_expOTable, NULL); }
/* Initializes the expObjectTable module */ void init_expObjectTable(void) { static oid expObjectTable_oid[] = { 1, 3, 6, 1, 2, 1, 90, 1, 2, 3 }; size_t expObjectTable_oid_len = OID_LENGTH(expObjectTable_oid); netsnmp_handler_registration *reg; netsnmp_table_registration_info *table_info; /* * Ensure the expObject table container is available... */ init_expObject_table_data(); /* * ... then set up the MIB interface to the expObjectTable */ reg = netsnmp_create_handler_registration("expObjectTable", expObjectTable_handler, expObjectTable_oid, expObjectTable_oid_len, HANDLER_CAN_RWRITE); table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info); netsnmp_table_helper_add_indexes(table_info, /* index: expExpressionOwner */ ASN_OCTET_STR, /* index: expExpressionName */ ASN_OCTET_STR, /* index: expObjectIndex */ ASN_UNSIGNED, 0); table_info->min_column = COLUMN_EXPOBJECTID; table_info->max_column = COLUMN_EXPOBJECTENTRYSTATUS; /* Register this using the common expObject_table_data container */ netsnmp_tdata_register(reg, expObject_table_data, table_info); DEBUGMSGTL(("disman:expr:init", "Expression Object Table container (%x)\n", expObject_table_data)); }
/* Initialize the expObject module */ void init_expObject(void) { init_expObject_table_data(); }