Question regarding indexes in Mib tables.

Paresh Borkar paresh____pspl.co.in
Fri Nov 1 15:05:02 CET 2002


Thanks.

One thing I notice with this index generation technique is that index would always be a number dotted
sequence. And the same would be displayed when I walk the mib table. It is not readable, when the
string as part of the index is displayed as a number dotted sequence. Would this always be the case?
Does some RFC enforce it to be this way?

Also,  please could you point me to the RFC which talks about the IMPLIED keyword.

Thanks,
Paresh.

Frank Fock wrote:

> Alex,
>
> Very well explained. I only have to add a method that
> could help converting an OCTET STRING (thus a OctetStr)
> to an OBJECT IDENTIFIER (Oidx): Oidx::from_string(..).
> See also
> http://www.agentpp.com/doc3.x/classOidx.html#d2
>
> An automatic conversion from native representation of
> index values to its OID representation needs MIB information
> which is not available (for reason) in AGENT++ at runtime.
>
> However you could use the Script tool of MIB Explorer or
> v2.0 of AgentGen Pro (which will be released in November)
> to generate index values for some static index values
> automatically.
>
> See the setIndexValues method in (line may be wrapped):
> http://www.mibexplorer.com/Help/HTML/API/com/agentpp/explorer/script/external/VariableBinding.html
>
> Best regards,
> Frank
>
> Alex Finogenov wrote:
> > Paresh,
> >
> > The type of index with which any given table must deal at any moment is
> > determined by this table's definition in the MIB (INDEX clause and the MIB
> > objects referenced in it). SNMP tables may utilize a few index types, some
> > of which are: integer-valued, IPAddress-valued, string-valued fixed length,
> > string-valued variable length preceded by IMPLIED keyword, string-valued
> > variable length not preceded by IMPLIED keyword, etc.
> >
> > In your message you are talking about the "string-valued variable length not
> > preceded by IMPLIED keyword". In other index types, for example, like the
> > fixed length indexes, the length of the index is not provided since,
> > according to its definition in the MIB, it _must_ always be of the same
> > length. I suggest reading Stallings' book (or SNMP RFCs) for details.
> >
> > Certain tools do not correctly or consistently interpret the MIBs. For
> > example, AdventNet's MIB browser sometimes interprets the fixed length index
> > as a variable length one and thus incorrectly encodes the index length in
> > the OID.
> >
> > I hope I answered the right question :).
> >
> > Alex F.
> >
> >
> >>-----Original Message-----
> >>From: Paresh Borkar [mailto:paresh____pspl.co.in]
> >>Sent: Thursday, October 31, 2002 6:21 AM
> >>To: agentpp-dl____agentpp.com
> >>Subject: Question regarding indexes in Mib tables.
> >>
> >>
> >>Hi,
> >>
> >>I have a question regarding use of indexes for rows in a mib
> >>table. The
> >>documentation for MibTable class says that for an variable
> >>sized object,
> >>the object is converted to an oid value by first encoding the
> >>length of
> >>its value and then its value. For example if I have an index of type
> >>octetstr with a value "abc", then it would be encoded as "3.97.98.99".
> >>
> >>My question is: is it required to pass in string indexes as
> >>above. Can't
> >>one pass in the index string value as is?
> >>I have seen that passing the string as is does not work, or
> >>am I missing
> >>something here.
> >>
> >>Also, the above technique ensures that the index is always a number
> >>dotted sequence. Is there any function in agent++/snmp++ library that
> >>does the above conversion?
> >>
> >>Regards,
> >>Paresh.
> >>
> >
> >




More information about the AGENTPP mailing list