Agent & Subagent connection status

"girish" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
		
Hi all,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I'm using agent-subagent approach. I want to know how we can get information that master and subagents have been connected. Also whenever master goes down i want to inform the same to my subagent.&nbsp; How I get this information..??? Any api for the same? Here in my subagent initialization code. Please
help in this regard.&nbsp; void *snmpsubagent(void *){&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp; syslog = 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);&nbsp;netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET,&nbsp;&nbsp;&nbsp; "tcp:localhost:705");&nbsp;&nbsp; SOCK_STARTUP;&nbsp;&nbsp;&nbsp; if(!(init_agent("subagent_daemon")))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug("Subagent-daemon is up and running.");&nbsp;&nbsp;&nbsp; else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; err("Subagent-daemon could not be initialized.");&nbsp;&nbsp;&nbsp; init_myMIBScalars();&nbsp;&nbsp;&nbsp; init_myMIBTables();&nbsp;&nbsp;&nbsp; init_snmp("subagent_daemon");&nbsp;&nbsp;&nbsp; snmp_shutdown("subagent_daemon");&nbsp;
 &nbsp;&nbsp; SOCK_CLEANUP;&nbsp;&nbsp;&nbsp; return(NULL);}


Regards,
Girish

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.