#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include "sub_agent.h"
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "openserSIPCommonObjects.h"
#include "openserSIPServerObjects.h"
#include "openserObjects.h"
#include "openserSIPPortTable.h"
#include "openserSIPMethodSupportedTable.h"
#include "openserSIPStatusCodesTable.h"
#include "openserSIPRegUserTable.h"
#include "openserSIPContactTable.h"
#include "openserSIPRegUserLookupTable.h"
#include "openserMIBNotifications.h"
#include "../../dprint.h"

Go to the source code of this file.
Functions | |
| void | agentx_child (int rank) |
| static int | initialize_agentx (void) |
| void | register_with_master_agent (char *name_to_register_under) |
| static void | sigterm_handler (int signal) |
Variables | |
| static int | keep_running |
This file defines all functions required to establish a relationship with a master agent.
Definition in file sub_agent.c.
| void agentx_child | ( | int | rank | ) |
Creates a child that will become the AgentX sub-agent. The child will insulate itself from the rest of OpenSER by overriding most of signal handlers.
Definition at line 126 of file sub_agent.c.
References initialize_agentx(), NULL, and sigterm_handler().
| static int initialize_agentx | ( | void | ) | [static] |
This function:
1) Registers itself with the Master Agent 2) Initializes all of the SNMPStats modules scalars and tables, while simultaneously registering their respective SNMP OID's and handlers with the master agent. 3) Repeatedly checks for new SNMP messages to process
Definition at line 89 of file sub_agent.c.
References AGENT_PROCESS_NAME, init_openserObjects(), init_openserSIPCommonObjects(), init_openserSIPContactTable(), init_openserSIPMethodSupportedTable(), init_openserSIPPortTable(), init_openserSIPRegUserLookupTable(), init_openserSIPRegUserTable(), init_openserSIPServerObjects(), init_openserSIPStatusCodesTable(), keep_running, and register_with_master_agent().
Referenced by agentx_child().
| void register_with_master_agent | ( | char * | name_to_register_under | ) |
This function opens up a connection with the master agent specified in the snmpstats modules configuration file
Definition at line 172 of file sub_agent.c.
Referenced by initialize_agentx(), and run_alarm_check().
| static void sigterm_handler | ( | int | signal | ) | [static] |
The function handles Handles shutting down of the sub_agent process.
Definition at line 72 of file sub_agent.c.
Referenced by agentx_child().
int keep_running [static] |
1.5.6