and added files
[bcm963xx.git] / userapps / opensource / net-snmp / perl / SNMP / examples / mibwalk.pl
1 # snmpwalk of entire MIB
2 # stop on error at end of MIB
3
4 use SNMP 1.8;
5 $SNMP::use_sprint_value = 1;
6 my $host = shift || localhost;
7 my $comm = shift || public;
8
9 $sess = new SNMP::Session(DestHost => $host, Community => $comm);
10
11 $var = new SNMP::Varbind([]);
12
13 do {
14   $val = $sess->getnext($var);
15   print "$var->[$SNMP::Varbind::tag_f].$var->[$SNMP::Varbind::iid_f] = ",
16         "$var->[$SNMP::Varbind::val_f]\n";
17 } until ($sess->{ErrorStr});