void shutdown_snmpNotifyTable(void) { DEBUGMSGTL(("snmpNotifyTable", "shutting down ... ")); notifyTable_unregister_notifications(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, NULL, NULL); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, notifyTable_unregister_notifications, NULL, FALSE); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_NOTIFICATIONS, notifyTable_register_notifications, NULL, FALSE); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP2, send_notifications, NULL, FALSE); #ifndef DISABLE_SNMPV1 snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_SEND_TRAP1, send_notifications, NULL, FALSE); #endif snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, store_snmpNotifyTable, NULL, FALSE); UNREGISTER_SYSOR_ENTRY(snmpNotifyFullCompliance); DEBUGMSGTL(("snmpNotifyTable", "done.\n")); }
void agentx_unregister_callbacks (netsnmp_session * ss) { DEBUGMSGTL (("agentx/subagent", "unregistering callbacks for session %p\n", ss)); snmp_unregister_callback (SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_SHUTDOWN, subagent_shutdown, ss->myvoid, 1); snmp_unregister_callback (SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_OID, agentx_registration_callback, ss->myvoid, 1); snmp_unregister_callback (SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREGISTER_OID, agentx_registration_callback, ss->myvoid, 1); snmp_unregister_callback (SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REG_SYSOR, agentx_sysOR_callback, ss->myvoid, 1); snmp_unregister_callback (SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREG_SYSOR, agentx_sysOR_callback, ss->myvoid, 1); SNMP_FREE (ss->myvoid); }
void agentx_unregister_callbacks(netsnmp_session * ss) { DEBUGMSGTL(("agentx/subagent", "unregistering callbacks for session %p\n", ss)); snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_POST_READ_CONFIG, subagent_register_ping_alarm, ss, 1); snmp_unregister_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_SHUTDOWN, subagent_shutdown, ss, 1); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_OID, agentx_registration_callback, ss, 1); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREGISTER_OID, agentx_registration_callback, ss, 1); #ifdef USING_MIBII_SYSORTABLE_MODULE snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REG_SYSOR, agentx_sysOR_callback, ss, 1); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREG_SYSOR, agentx_sysOR_callback, ss, 1); #endif }
void shutdown_sysORTable(void) { #ifdef USING_MIBII_SYSTEM_MIB_MODULE if (system_module_count-- == 3) UNREGISTER_SYSOR_TABLE(system_module_oid, system_module_oid_len); #endif snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_UNREG_SYSOR, unregister_cb, NULL, 1); snmp_unregister_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REG_SYSOR, register_cb, NULL, 1); if (table) CONTAINER_CLEAR(table, netsnmp_container_simple_free, NULL); netsnmp_container_table_unregister(sysORTable_reg); sysORTable_reg = NULL; table = NULL; netsnmp_table_registration_info_free(sysORTable_table_info); sysORTable_table_info = NULL; netsnmp_unregister_handler(sysORLastChange_reg); sysORLastChange_reg = NULL; }