I am using the following code in a Perl script:

my $result = $snmpSession->set_request(-varbindlist => [
($remoteStatusOid, INTEGER, 4),
($remoteInterfaceOid, INTEGER32, $neInterfaceIndex),
($remoteMacOid, OCTET_STRING, $currentMeterMacNoColons),
($remoteDekOid, OCTET_STRING, $meterDek),
($remoteEksOid, INTEGER32, $neEksIndex),
($remoteNekOid, OCTET_STRING, $neNek)
]);
if (!defined($result)) {
print "Error: " . $snmpSession->error . "\n\n";
next;
}

I keep seeing this output: "Error: Received wrongLength(8) error-status at error-index 3". When it says "error-index 3", it is referring to the line with $remoteMacOid. (And actually, I moved some lines around and it gives the same error to all of the lines that contain OCTET_STRING.) Strange that it would complain about the length, because OCTET_STRING can be any length, right? The $currentMeterMacNoColons variable has a value that is 12 characters, but I tried some tests with strings varying from 1 to 16 characters and I always got that same error. What is going on here?

Thanks,
Spencer


__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users