Re: [libsmi] Retrieving Description

Diego Parrilla writes:
Diego> When I try to retrieve Description and/or Reference information Diego> from any node with the full OID (e.g.: .1.3.6.1.2.1.2.1), both Diego> fields return empty. But if I use the equivalent label of the Diego> OID ("ifNumber", I think...), these fields return the right Diego> values. I call the "smiGetNode" function for this action.
As Jochen already wrote, the correct way to write an OID is without the leading dot. I know that CMU/UCD do it differently and many people took over that style. But that does not make it legal.
Anyway, recent versions of libsmi have a special function call you should use instead of smiGetNode() in this case:
extern SmiNode *smiGetNodeByOID(unsigned int oidlen, SmiSubid oid[]);
This API function makes a lookup based on an OID and it does not care about the MIB module which actually contains the definition.
Juergen
participants (1)
-
Juergen Schoenwaelder