|
SNMP callback APIs are provided as hooks to the user / customer where they can have their own code instrumentation and change the value of certain parameters. Some of such Callback API's provided in SNMP Agent is listed below
If the user wants to close the snmp session which is already opened, then CloseSnmpSession() function can be used.
|
void CloseSnmpSession(TransportDomainInfo *tdInfo) |
Here,
tdInfo has the transport domain information
This function is defined in apiifc.c file present under "<project-name>/agent/source/protocols/snmp/src" directory can be used. CloseSnmpSession() function closes all the ports opened by the SNMP server for Request processing, Trap processing and also the proxy ports
StopSnmpAgentService() function can be used if the user wants to stop the SNMP server.
|
CHAR StopSnmpAgentService() |
This function is defined in the snmputils.c file and is present under the "<project-name>/agent/source/protocols/snmp/src/" directory. On invoking the StopSnmpAgentService() method, the agent will stop the snmp PDU request processing and also sending of traps / informs.
User can start the SNMP service, by using the StartSnmpAgentService() function defined in the snmputils.c present "<project-name>/agent/source/protocols/snmp/src/" directory.
|
CHAR StartSnmpAgentService(LONG port, CHAR *host) |
On calling this function, the agent will start the snmp server in the given port number. It starts a new snmp session.
Using the RestartSnmpAgentService() function, user can stop the SNMP server, change the agent port numbers if required and restart the snmp server.
|
CHAR RestartSnmpAgentService(LONG port, CHAR *host) |
RestartSnmpAgentService() function defined in the snmputils.c present "<project-name>/agent/source/protocols/snmp/src/" directory.
|