On Fri, Mar 14, 2008 at 9:47 AM, Nguyen Dinh Nam <[EMAIL PROTECTED]>
wrote:
> I want to write an embedded Perl extension to replace the built in value
> of
> .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifDescr.* ==
> .1.3.6.1.2.1.2.2.1.2 with my own values, such as the long description of the
> interface instead of interface name.
>
> I tried to register my own handler to .1.3.6.1.2.1.2.2.1.2 and make a
> $request->setValue(ASN_OCTET_STR, $long_description); but the result is not
> correct:
> $ snmpget -v 1 -c system localhost .1.3.6.1.2.1.2.2.1.2.5
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: IF-MIB::ifDescr.5
>
> Please give me a hint on this problem, thank you
>
>
Thank you all, I have solved the bug.
The error
"No Such Object available on this agent at this OID" (-v 2c)
or
"Reason: (noSuchName) There is no such variable name in this MIB." (-v 1)
when writing extension in embedded Perl is caused by putting the embedded
Perl code in a different namespace (using package My::Name::Space;)
-------------------------------------------------------------------------
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-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders