Re: question about OCTET STRING encoding within an index

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 22 September 2010 21:48, Fulko Hew <[email protected]> wrote:
> While testing and reviewing my SNMP test harness I've come
> across an instance of a variable with an index I can't explain
> (on my Fedora box).
>
> snmpwalk -v1 -cpublic -On localhost vacmContextName
> .1.3.6.1.6.3.16.1.1.1.1.0 = STRING:
>
> So the index on this column is '.0' (which is defined as an OCTET STRING).
>
> What I'm confused about is... is the zero:
> a) the length of the non-existent NULL string that follows? or
> b) is it a string that contains a NULL?

It indicates an empty string of length 0 - i.e. the default context,
as mentioned in the DESCRIPTION of this object.

> ... ISTR that if [a string is] the last variable
> in an index list, that the length always is omitted?

Incorrect.

If a string-based object is the last index, then the length
*MAY* be omitted - but that only happens if the index is
defined as IMPLIED.
  This is true for the snmpNotifyTable, but not for the
vacmContextTable.


> Does this mean that an empty OCTET STRING (or OBJECT IDENTIFIER)
> as the last INDEX component is a special case?

No - it means that the indexing of the two tables are
defined differently.

Dave

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.