Not getting values in some fields of SmiNode structure.

I am also experiencing the similar problem. I am trying to find the current value of a node by accessing "value" field of SmiNode but it always returns SMI_BASETYPE_UNKNOWN. Can somebody please help me to find out the current value and default values of each node.
My code looks
for(smiNode = smiGetFirstNode(module, SMI_NODEKIND_ANY); smiNode; smiNode = smiGetNextNode(smiNode, SMI_NODEKIND_ANY)) { SmiType * type = smiGetNodeType(smiNode); printf("%s\t", smiNode->name); printf ("%i\n", smiNode->nodekind); printf("%s\n", formatvalue(&smiNode->value, type));
};
Thanks

Hi!
Shubha> I am also experiencing the similar problem. I am trying to Shubha> find the current value of a node by accessing "value" field of Shubha> SmiNode but it always returns SMI_BASETYPE_UNKNOWN.
SmiNode->value.basetype is different from SMI_BASETYPE_UNKNOWN only when the according OBJECT-TYPE does provide a DEFVAL subclause.
Shubba> Can somebody please help me to find out the current value and Shubha> default values of each node.
What do you mean by ``current value''? libsmi does not process any agent data!
Shubha> My code looks
Shubha> for(smiNode = smiGetFirstNode(module, SMI_NODEKIND_ANY); Shubha> smiNode; smiNode = smiGetNextNode(smiNode, SMI_NODEKIND_ANY)) Shubha> { Shubha> SmiType * type = smiGetNodeType(smiNode); Shubha> printf("%s\t", smiNode->name); Shubha> printf ("%i\n", smiNode->nodekind); Shubha> printf("%s\n", formatvalue(&smiNode->value, Shubha> type)); Shubha> };
This code does not make sense, because not all nodes do contain a default value. You should only process smiNode->value, if (smiNode->value.basetype != SMI_BASETYPE_UNKNOWN).
-frank
participants (2)
-
Frank Strauss
-
Shubha Simhadri