Syntax
#include <snmp_dpi.h> void DPIdisconnect_from_agent( /* disconnect from DPI (agent)*/ int handle); /* close this connection */
Parameters
handle
Return Values
If successful, a positive integer that represents the connection is returned. It is to be used as a handle in subsequent calls to DPI transport-related functions.
If failure, a negative integer is returned. It indicates the kind of error that occurred. See Return Codes from DPI Transport-Related Functions for a list of possible error codes.
Description
The DPIdisconnect_from_agent() function is used at the subagent side to terminate a connection to the DPI capable SNMP agent.
Examples
#include <snmp_dpi.h> int handle;
handle = DPIconnect_to_agent_TCP("localhost", "loopback");
if (handle < 0) {
printf("Error %d from connect\n",handle);
exit(1);
} /* endif */
/* do useful stuff */
DPIdisconnect_from_agent(handle);
Related Information