Re: [tkined] ASN.1 Restriction on Object Identifiers

From: Pete Flugstad (pete_flugstad@icon-labs.com)
Date: Fri Jan 18 2002 - 20:11:34 MET


Sanapoori, Hari wrote:

> Hi,
>
> I am using scotty.3-new version of which has basic support for SNMPv3.
> Recently, I am seeing some problem while parsing the output from our switch.
> The scotty is returning ERROR if the oid is above 2.40. I traced the error
> and here is the piece of code from where the scotty errors out.
>
> /*
> * Check the ASN.1 restrictions on object identifier values.
> */
>
> if ((oidPtr->length < 2)
> || (oidPtr->elements[0] > 2 || oidPtr->elements[1] > 40)) {
> TnmOidFree(oidPtr);
> return TCL_ERROR;
>
> The comment says that, ASN.1 restrictions on OID. I am looking for some
> documentation to get more information. Any help in understanding the problem
> or any solution to the problem would be helpful for me.

X.209 is the document to look at. I found the following

comp.protocols.snmp posting useful:

http://groups.google.com/groups?selm=Pine.BSF.4.21.0109021709280.1338-100000%40shell5.ba.best.com&output=gplain

Hope this link works. The long and the short of it is that
if the first and second OID element are outside the ranges
of the above check, then the receiving SNMP entity cannot
uniquely decode the OID. This is because the first two
OIDs are encoded "specially" in order to save space.
Rather a major pain actually but there you are.

Pete

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.



This archive was generated by hypermail 2b29 : Sun Jan 20 2002 - 05:13:01 MET