[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Agentx] Some confusion, while watching AgentX-Register-PDU in net-snmp 5.4
Hi,
Randy Presuhn wrote:
| Note that r.range_subid indicates the (1-based) index of
| this sub-identifier within the OID represented by r.subtree,
| regardless of whether or not r.subtree is encoded using a
| prefix. (See the example below.)
The above is a quote of RFC 2741 page 24.
"within the OID represented by r.subtree" tells me that the index is
into the *actual* complete OID. r.subtree is just a representation of
the complete OID.
The example shows an r.range_subid value of 5. For the example
to make sense, this is the fifth word in the encoding (with a value of 1),
not the fifth subidentifier of the object identifier it represents. For your
interpretation to be correct, r.range_subid in the example would
be 10.
The example on page 25 and 26 of RFC 2741 reads as follows:
The use of r.range_subid and r.upper_bound provide a general
shorthand mechanism for specifying a MIB region. For
example, if r.subtree is the OID 1.3.6.1.2.1.2.2.1.1.7,
r.range_subid is 10, and r.upper_bound is 22, the specified
MIB region can be denoted 1.3.6.1.2.1.2.2.1.[1-22].7.
Registering this region is equivalent to registering the
union of subtrees
1.3.6.1.2.1.2.2.1.1.7
1.3.6.1.2.1.2.2.1.2.7
1.3.6.1.2.1.2.2.1.3.7
...
1.3.6.1.2.1.2.2.1.22.7
Following that example, I would say that 14 is the correct value
for r.range_subid in Mark's original example.
Note that the text says "r.subtree", *not* "r.region", and thus is not
in terms of the complete object identifier that r.region encodes.
At least that's how I read it.
Either the example is incorrect, or the explanatory text is unclear, or both. :-)
I think, this has been clarified in RFC 2741 which obsoletes 2257 ;-)
I supposed it could be more clear. The proof of the pudding would be
an interop-fest, I supposed.
I have implemented AgentX++ and SNMP4J-AgentX according to
RFC2741 and so far got no complains about interoperability
issues - except those I had with the NET-SNMP master and
sub-agents regarding handling of search-ranges and region
registration. The bug(s) Mark found might be one reason
for that.
Regards,
Frank Fock