A minor amendment to what Mike said:
2008/7/30 Mike Ayers <[EMAIL PROTECTED]>:
> The MIB says:
<snip/>
> [SNIP]
> ifIndex OBJECT-TYPE
> SYNTAX InterfaceIndex
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> ::= { ifEntry 1 }
> [/SNIP]
>
> You will never see one of these objects.
In a well-designed table, this would be true, for exactly the reasons
Mike outlines:
> Why? Because it's an index (see the INDEX clause of ifEntry),
> and in SNMP indices are never returned as objects, since they
> are already included as part of the OID.
Unfortunately, the ifTable is a hold-over from the very beginning of
SNMP, when men were men, women were women, and MIB table
design was not particularly well understood.
So this particular index column *does* actually appear in the output
of the agent. This information is completely redundant, and there's
no point in returning it like this, but the MAX-ACCESS clause says
"read-only" so the agent will return it.
A better designed table would have a MAX-ACCESS clause of
"not-accessible", and would indeed omit the index column
altogether.
So:
> To sum it all up the first returnable object is
> ifTable.ifEntry.ifDescr, or ifTable.1.2 .
> If you get next on ifTable, the correct response is ifTable.1.2.(first
> index).
> If you get next on ifIndex.1, or ifTable.1.1, the correct response is
> ifTable.1.2.(first index).
*ought* to be true, but isn't.
The first returnable object is actually ifTable.ifEntry.ifIndex (ifTable.1.1)
and these GETNEXTs would actually return ifTable.1.1.(first index)
Dave
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders