SNMP Agent / SubAgent support for Asterisk.
More...
Go to the source code of this file.
|
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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, } |
|
static 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.
- Author
- Thorsten Lockert tholo.nosp@m.@voo.nosp@m.p.as
- ExtRef:
- 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" |
static void __reg_module |
( |
void |
| ) |
|
|
static |
static void __unreg_module |
( |
void |
| ) |
|
|
static |
static int load_config |
( |
void |
| ) |
|
|
static |
Load res_snmp.conf config file.
- Returns
- 1 on load, 0 file does not exist
Definition at line 46 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, ast_variable::name, ast_variable::next, ast_variable::value, and var.
Referenced by load_module().
64 if (strcasecmp(cat,
"general") == 0) {
66 if (strcasecmp(var->
name,
"subagent") == 0) {
76 }
else if (strcasecmp(var->
name,
"enabled") == 0) {
static int res_snmp_enabled
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category)
Goes through variables.
Structure for variables, used for configurations and for channel variables.
void ast_config_destroy(struct ast_config *config)
Destroys a config.
#define CONFIG_STATUS_FILEMISSING
#define ast_config_load(filename, flags)
Load a config file.
char * ast_category_browse(struct ast_config *config, const char *prev)
Goes through categories.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
Structure used to handle boolean flags.
int res_snmp_agentx_subagent
int attribute_pure ast_false(const char *val)
Make sure something is false. Determine if a string containing a boolean value is "false"...
struct ast_variable * next
#define CONFIG_STATUS_FILEINVALID
static int load_module |
( |
void |
| ) |
|
|
static |
static int unload_module |
( |
void |
| ) |
|
|
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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, } |
|
static |
int res_snmp_agentx_subagent |