Problem to determinate SNMP version

[email protected]
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I'm currently writing a Perl script using the Net-SNMP Perl API included in the
lastest release 5.3.0.1. But I have a little problem, and any help would be
greatly appreciated. :-)

I have to make various SNMP request to switches, but they are quite
heterogeneous : some of them support only SNMP v1, v2c max, or v3 max. So I
want to find a way to determinate the max version supported by a switch.
Here's the problem : as there is no specific SNMP query returning supported
version(s), I have the idea to use the behavior of the SNMP::Session
constructor which returns an object reference if connection successful or undef
in case of error.
Unfortunately, it doesn't work in the expected way. I have made a test on an old
switch supporting only SNMP v1. When I query it with v3, OK : SNMP::Session->new
returns "undef". But when I query it with v2c, how surprising :
SNMP::Session->new returns me a descriptor... :(

This situation is quite annoying for me. Is this a bug ? Or, if anyone has a
suggestion for a more reliable solution to obtain version, please tell me.


-------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
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.