Asterisk - The Open Source Telephony Project  18.5.0
Functions | Variables
agent.h File Reference

SNMP Agent / SubAgent support for Asterisk. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * agent_thread (void *)
 

Variables

int res_snmp_agentx_subagent
 
int res_snmp_dont_stop
 

Detailed Description

SNMP Agent / SubAgent support for Asterisk.

Author
Thorsten Lockert tholo.nosp@m.@voo.nosp@m.p.as

Definition in file agent.h.

Function Documentation

◆ agent_thread()

void* agent_thread ( void *  )

Definition at line 189 of file agent.c.

References ast_verb, init_asterisk_mib(), NULL, res_snmp_agentx_subagent, and res_snmp_dont_stop.

Referenced by load_module().

190 {
191  ast_verb(2, "Starting %sAgent\n", res_snmp_agentx_subagent ? "Sub" : "");
192 
193  snmp_enable_stderrlog();
194 
196  netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,
197  NETSNMP_DS_AGENT_ROLE,
198  1);
199 
200  init_agent("asterisk");
201 
203 
204  init_snmp("asterisk");
205 
207  init_master_agent();
208 
209  while (res_snmp_dont_stop)
210  agent_check_and_process(1);
211 
212  snmp_shutdown("asterisk");
213 
214  ast_verb(2, "Terminating %sAgent\n", res_snmp_agentx_subagent ? "Sub" : "");
215 
216  return NULL;
217 }
#define NULL
Definition: resample.c:96
#define ast_verb(level,...)
Definition: logger.h:463
int res_snmp_dont_stop
Definition: res_snmp.c:44
int res_snmp_agentx_subagent
Definition: res_snmp.c:43
static void init_asterisk_mib(void)
Definition: agent.c:826

Variable Documentation

◆ res_snmp_agentx_subagent

int res_snmp_agentx_subagent

Definition at line 43 of file res_snmp.c.

Referenced by agent_thread(), and load_config().

◆ res_snmp_dont_stop

int res_snmp_dont_stop

Definition at line 44 of file res_snmp.c.

Referenced by agent_thread(), load_module(), and unload_module().