Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
SNMP Agent / SubAgent support for Asterisk. More...
#include "asterisk.h"
#include "asterisk/channel.h"
#include "asterisk/module.h"
#include "snmp/agent.h"
Go to the source code of this file.
Macros | |
#define | MODULE_DESCRIPTION "SNMP [Sub]Agent for Asterisk" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | load_config (void) |
Load res_snmp.conf config file. More... | |
static int | load_module (void) |
Load the module. More... | |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "SNMP [Sub]Agent for Asterisk" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
int | res_snmp_agentx_subagent |
int | res_snmp_dont_stop |
static int | res_snmp_enabled |
static pthread_t | thread = AST_PTHREADT_NULL |
SNMP Agent / SubAgent support for Asterisk.
Uses the Net-SNMP libraries available at http://net-snmp.sourceforge.net/
Definition in file res_snmp.c.
#define MODULE_DESCRIPTION "SNMP [Sub]Agent for Asterisk" |
Definition at line 41 of file res_snmp.c.
|
static |
Definition at line 140 of file res_snmp.c.
|
static |
Definition at line 140 of file res_snmp.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 140 of file res_snmp.c.
|
static |
Load res_snmp.conf config file.
Definition at line 53 of file res_snmp.c.
References ast_category_browse(), ast_config_destroy(), ast_config_load, ast_false(), ast_log, ast_true(), ast_variable_browse(), CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, LOG_ERROR, LOG_WARNING, NULL, res_snmp_agentx_subagent, res_snmp_enabled, and var.
Referenced by load_module().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 114 of file res_snmp.c.
References agent_thread(), AST_MODULE_LOAD_DECLINE, ast_pthread_create_background, ast_verb, load_config(), NULL, res_snmp_dont_stop, res_snmp_enabled, and thread.
|
static |
Definition at line 128 of file res_snmp.c.
References AST_PTHREADT_NULL, ast_verb, NULL, res_snmp_dont_stop, and thread.
|
static |
Definition at line 140 of file res_snmp.c.
|
static |
Definition at line 140 of file res_snmp.c.
int res_snmp_agentx_subagent |
Definition at line 43 of file res_snmp.c.
Referenced by agent_thread(), and load_config().
int res_snmp_dont_stop |
Definition at line 44 of file res_snmp.c.
Referenced by agent_thread(), load_module(), and unload_module().
|
static |
Definition at line 45 of file res_snmp.c.
Referenced by load_config(), and load_module().
|
static |
Definition at line 47 of file res_snmp.c.
Referenced by load_module(), and unload_module().