29 #include "asterisk/channel.h"
34 #define MODULE_DESCRIPTION "SNMP [Sub]Agent for Asterisk"
54 res_snmp_agentx_subagent = 1;
64 if (strcasecmp(cat,
"general") == 0) {
66 if (strcasecmp(var->
name,
"subagent") == 0) {
68 res_snmp_agentx_subagent = 1;
70 res_snmp_agentx_subagent = 0;
76 }
else if (strcasecmp(var->
name,
"enabled") == 0) {
102 ast_verb(1,
"Loading [Sub]Agent Module\n");
104 res_snmp_dont_stop = 1;
105 if (res_snmp_enabled)
113 ast_verb(1,
"Unloading [Sub]Agent Module\n");
115 res_snmp_dont_stop = 0;
void * agent_thread(void *arg)
Asterisk main include file. File version handling, generic pbx functions.
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.
static int load_config(void)
Load res_snmp.conf config file.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
#define ast_verb(level,...)
void ast_config_destroy(struct ast_config *config)
Destroys a config.
#define ast_pthread_create_background(a, b, c, d)
#define CONFIG_STATUS_FILEMISSING
#define ast_config_load(filename, flags)
Load a config file.
#define AST_PTHREADT_NULL
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
SNMP Agent / SubAgent support for Asterisk.
int attribute_pure ast_false(const char *val)
Make sure something is false. Determine if a string containing a boolean value is "false"...
static int unload_module(void)
struct ast_variable * next
#define CONFIG_STATUS_FILEINVALID
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
static int load_module(void)
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.