in reply to Re: Getting SNMPWalk to work with NetSNMP::agent
in thread Getting SNMPWalk to work with NetSNMP::agent

Thanks that worked ...
I used the following code to get the SNMPWALK working :

elsif ($mode == MODE_GETNEXT) { my $oidnum; if ( $oid lt new NetSNMP::OID("$rootOID.1.0") ) { $request->setOID("$rootOID.1.0"); my $count = `$perl $script 1`; $request->setValue(ASN_INTEGER, $count); } elsif ( $oid lt new NetSNMP::OID("$rootOID.2.0") ) { $request->setOID("$rootOID.2.0"); my $count = `$perl $script 2`; $request->setValue(ASN_INTEGER, $count); } elsif ( $oid eq new NetSNMP::OID("$rootOID.2.0") ) { $request->setOID("$rootOID.3.0"); my $count = `$perl $script 3`; $request->setValue(ASN_INTEGER, $count); } elsif ( $oid eq new NetSNMP::OID("$rootOID.3.0") ) { $request->setOID("$rootOID.4.0"); my $count = `$perl $script 4`; $request->setValue(ASN_INTEGER, $count); } elsif ( $oid eq new NetSNMP::OID("$rootOID.4.0") ) { $request->setOID("$rootOID.5.0"); my $count = `$perl $script 5`; $request->setValue(ASN_INTEGER, $count); } elsif ( $oid eq new NetSNMP::OID("$rootOID.5.0") ) { $request->setOID("$rootOID.6.0"); my $count = `$perl $script 6`; $request->setValue(ASN_INTEGER, $count); } elsif ( $oid eq new NetSNMP::OID("$rootOID.6.0") ) { $request->setOID("$rootOID.7.0"); my $count = `$perl $script 7`; $request->setValue(ASN_INTEGER, $count); } }