please help: snmpset for octetstringhex
"Rajat Chadda" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have a problem doing an snmpset for a octetstringhex variable in Perl.
CLI works for me with CISCO-VTP-MIB.my:
rchadda@office:~/mibs$ snmpset -v 1 -c public x.x.x.x
vtpVlanEditDot10Said.1.22 x 000186B6
But can't get the Perl Syntax right :((
$varbind = new
SNMP::Varbind(['vtpVlanEditDot10Said',1.22,'0x000186B6','x']);
$session->set($varbind);
if ($session->{'ErrorNum'}) {
print "DBG: SNMP error: " . $session->{'ErrorStr'} . "\n";
}
Error thrown is:
DBG: SNMP error: (badValue) The value given has the wrong type or
length.
Any idea ?
Thanks in advance,
Rajat