示例#1
0
void
shutdown_agent(void) {

    /* probably some of this can be called as shutdown callback */
    shutdown_tree();
    clear_context();
    netsnmp_clear_callback_list();
    netsnmp_clear_tdomain_list();
    netsnmp_clear_handler_list();
    netsnmp_container_free_list();
    clear_sec_mod();
    clear_snmp_enum();
    clear_callback();
    clear_user_list();

    done_init_agent = 0;
}
示例#2
0
void
shutdown_agent(void) {

    /* probably some of this can be called as shutdown callback */
    shutdown_tree();
    clear_context();
    netsnmp_clear_callback_list();
    netsnmp_clear_tdomain_list();
    netsnmp_clear_handler_list();
    shutdown_agent_sysORTable();
    netsnmp_container_free_list();
    clear_sec_mod();
    clear_snmp_enum();
    clear_callback();
    shutdown_secmod();
    netsnmp_addrcache_destroy();
#ifdef NETSNMP_CAN_USE_NLIST
    free_kmem();
#endif

    done_init_agent = 0;
}
示例#3
0
// Cancel the handler thread and shut down the SNMP agent.
void snmp_terminate(const char* name)
{
  pthread_cancel(snmp_thread_var);
  snmp_shutdown(name);
  netsnmp_container_free_list();
}