Re: How to know subagent successfully connects to master agent or not?

"Nikos Balkanas" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <004c01c97ff7$6949e570$02b2a8c0@tardis>
Try:

snmpd -f -Le -Dagentx

BR,
Nikos
  ----- Original Message ----- 
  From: Alexander Bubnov 
  To: [email protected] 
  Sent: Monday, January 26, 2009 4:35 PM
  Subject: How to know subagent successfully connects to master agent or not?


  Hello!

  I am playing around with NET-SNMP library... and just what to know subj.


  My code looks like the tutorial one (see section TUT:Writing a Subagent, http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent):

  int main() {

  ...

   netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, TRUE);
   netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DONT_PERSIST_STATE, TRUE);
   netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 100);


   netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET, "udp:192.168.89.130:705");


   init_agent("event_example");
   init_snmp("event_example");

  ...

  return EXIT_SUCCESS;

  }


  inside call of init_snmp, subagent tries to connect to master agent. Here connection can be fail. 

  What right way to know about that fail?


  Thanks in advance!

  -- 
  /BR, Alexander



------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  This SF.net email is sponsored by:
  SourcForge Community
  SourceForge wants to tell your story.
  http://p.sf.net/sfu/sf-spreadtheword


------------------------------------------------------------------------------


  _______________________________________________
  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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword

_______________________________________________
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.