Your problem was niggling me so I tried it myself.
Other than the $ip value, I used exactly what you have (with the mismatched quote problem fixed).
Here's my code:
#!perl use strict; use warnings; use Net::SNMP; my $ip = '127.0.0.1'; my $SESSION = Net::SNMP->session (-hostname=>$ip, -community=>"private +"); $SESSION->set_request(-varbindlist=> ['1.3.6.1.4.1.6080.3.1.2.4.0', IN +TEGER, 1]); print $SESSION->error();
And here's the output:
$ net_snmp_problem.pl No response from remote host "127.0.0.1"
As you can see, no problem with INTEGER.
Furthermore, when I ran it without fixing the quotes, I got:
Can't find string terminator "'" anywhere before EOF at ./net_snmp_pro +blem.pl line 12.
which suggests that you're posting different code to what you're actually running.
Anyway, if you're still having difficulties, my best advice would be to re-install Net::SNMP.
-- Ken
In reply to Re^5: Net::SNMP ASN1 Type error
by kcott
in thread Net::SNMP ASN1 Type error
by jbumsted
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |