Connected: An Internet Encyclopedia
7.7. Mapping of the INDEX clause
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1902
Up:
7. Mapping of the OBJECT-TYPE macro
Prev: 7.6. Mapping of the REFERENCE clause
Next: 7.8. Mapping of the AUGMENTS clause
7.7. Mapping of the INDEX clause
7.7. Mapping of the INDEX clause
The INDEX clause, which must be present if that object corresponds to
a conceptual row (unless an AUGMENTS clause is present instead), and
must be absent otherwise, defines instance identification information
for the columnar objects subordinate to that object.
The instance identification information in an INDEX clause must
specify object(s) such that value(s) of those object(s) will
unambiguously distinguish a conceptual row. The syntax of those
objects indicate how to form the instance-identifier:
- integer-valued: a single sub-identifier taking the integer value
(this works only for non-negative integers);
- string-valued, fixed-length strings (or variable-length preceded by
the IMPLIED keyword): `n' sub-identifiers, where `n' is the length
of the string (each octet of the string is encoded in a separate
sub-identifier);
- string-valued, variable-length strings (not preceded by the IMPLIED
keyword): `n+1' sub-identifiers, where `n' is the length of the
string (the first sub-identifier is `n' itself, following this,
each octet of the string is encoded in a separate sub-identifier);
- object identifier-valued (when preceded by the IMPLIED keyword):
`n' sub-identifiers, where `n' is the number of sub-identifiers in
the value (each sub-identifier of the value is copied into a
separate sub-identifier);
- object identifier-valued (when not preceded by the IMPLIED
keyword): `n+1' sub-identifiers, where `n' is the number of sub-
identifiers in the value (the first sub-identifier is `n' itself,
following this, each sub-identifier in the value is copied);
- IpAddress-valued: 4 sub-identifiers, in the familiar a.b.c.d
notation.
Note that the IMPLIED keyword can only be present for an object
having a variable-length syntax (e.g., variable-length strings or
object identifier-valued objects), Further, the IMPLIED keyword can
only be associated with the last object in the INDEX clause.
Finally, the IMPLIED keyword may not be used on a variable-length
string object if that string might have a value of zero-length.
Instances identified by use of integer-valued objects should be
numbered starting from one (i.e., not from zero). The use of zero as
a value for an integer-valued index object should be avoided, except
in special cases.
Objects which are both specified in the INDEX clause of a conceptual
row and also columnar objects of the same conceptual row are termed
auxiliary objects. The MAX-ACCESS clause for auxiliary objects is
"not-accessible", except in the following circumstances:
- within a MIB module originally written to conform to the SNMPv1
framework, and later converted to conform to the SNMPv2 framework;
or
- a conceptual row must contain at least one columnar object which is
not an auxiliary object. In the event that all of a conceptual
row's columnar objects are also specified in its INDEX clause, then
one of them must be accessible, i.e., have a MAX-ACCESS clause of
"read-only". (Note that this situation does not arise for a
conceptual row allowing create access, since such a row will have a
status column which will not be an auxiliary object.)
Note that objects specified in a conceptual row's INDEX clause need
not be columnar objects of that conceptual row. In this situation,
the DESCRIPTION clause of the conceptual row must include a textual
explanation of how the objects which are included in the INDEX clause
but not columnar objects of that conceptual row, are used in uniquely
identifying instances of the conceptual row's columnar objects.
Next: 7.8. Mapping of the AUGMENTS clause
Connected: An Internet Encyclopedia
7.7. Mapping of the INDEX clause