"smiGetNodeType" on a node from type "DisplayString"

Hi,
when I call "smiGetNodeType" on a node from type "DisplayString" (defined in RFC-1213 from OCTET STRING) the name in the SmiType structure is empty! Why isn't the name "DisplayString" set?
Regards,
Heiko

Hello Heiko!
On Wed, Jan 29, 2003 at 03:52:38PM +0100, Heiko.Eichberger@RSBICK.rohde-schwarz.com wrote:
when I call "smiGetNodeType" on a node from type "DisplayString" (defined in RFC-1213 from OCTET STRING) the name in the SmiType structure is empty! Why isn't the name "DisplayString" set?
How is your type defined? Is it just a reference to the type "DisplayString" or does your type include a range restriction (e.g. DisplayString (SIZE (0..6)))? In the second case, your type does not have a name because it is considered to be an implicit type which is derived from "DisplayString". To obtain the name "DisplayString" in this case, you can use the following code:
[snip] SmiType *type; char *name;
...
if( type->decl == SMI_DECL_IMPLICIT_TYPE ) { SmiType *parentType = smiGetParentType( type ); name = parent->name; } [snip]
Regards, Torsten
participants (2)
-
Heiko.Eichberger@RSBICK.rohde-schwarz.com
-
Torsten Klie