Functions

sub_agent.c File Reference

SNMP statistic module, master agent connection. More...

#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 "snmpSIPCommonObjects.h"
#include "snmpSIPServerObjects.h"
#include "snmpObjects.h"
#include "snmpSIPPortTable.h"
#include "snmpSIPMethodSupportedTable.h"
#include "snmpSIPStatusCodesTable.h"
#include "snmpSIPRegUserTable.h"
#include "snmpSIPContactTable.h"
#include "snmpSIPRegUserLookupTable.h"
#include "snmpMIBNotifications.h"
#include "../../dprint.h"
#include "../../cfg/cfg_struct.h"
Include dependency graph for sub_agent.c:

Go to the source code of this file.

Functions


Detailed Description

This file defines all functions required to establish a relationship with a master agent.

Definition in file sub_agent.c.


Function Documentation

void agentx_child ( int  rank  ) 

Run the AgentX sub-agent as a separate process.

The child will insulate itself from the rest of OpenSER by overriding most of signal handlers.

Definition at line 130 of file sub_agent.c.

References initialize_agentx().

Referenced by mod_child_init().

Here is the call graph for this function:

Here is the caller graph for this function:

static int initialize_agentx ( void   )  [static]

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

Note:
This function never returns, so it should always be called from a sub-process.

Definition at line 90 of file sub_agent.c.

References register_with_master_agent().

Referenced by agentx_child().

Here is the call graph for this function:

Here is the caller graph for this function:

static void sigterm_handler ( int  signal  )  [static]

Definition at line 73 of file sub_agent.c.