RE: How to catch errors in init_snmp

"Arnaud BODENAN" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
The only work-around I found is to test the return code of the function 
register_int_index, which fails if it is unable to connect to the master 
agent.

I would prefer to catch the error message displayed in the function 
subagent_open_master_session.

This is not possible?

>From: "Arnaud BODENAN" <[email protected]>
>To: [email protected]
>Subject: How to catch errors in init_snmp
>Date: Mon, 16 Oct 2006 17:28:36 +0200
>
>Hi,
>
>The function init_snmp is prototyped as a void function but can generate
>errors.
>
>Example:
>If I set an invalid address in the variable NETSNMP_DS_AGENT_X_SOCKET, an
>error is triggered in init_snmp:
>Error: Failed to connect to the agentx master agent
>(tcp:TEST_UNKONOWN_HOST:1450): Unknown host (tcp:ptxskplus55:1450) (No such
>file or directory)
>
>How can I catch this error ? Is there a function in net-snmp that checks 
>for
>errors arising in init_snmp ?
>
>Thanks
>
>Arnaud.
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job 
>easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>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

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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.