You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using smi.GetParentNode() and it always seems to return the same node that I pass it as a parameter instead of that node's parent.
e.g. The following code
node, _:=gosmi.GetNodeByOID(oid)
log.Printf("node name: %s::%s of %s", GetModule().Name, node.Name, node.Kind)
parent:=gosmi.CreateNode(smi.GetParentNode(node.GetRaw()))
log.Printf("parent name: %s::%s of %s", parent.GetModule().Name, parent.Name, parent.Kind)
produces the output
bug 2021/03/20 13:08:47 node name: IF-MIB::ifPhysAddress of Scalar
bug 2021/03/20 13:08:47 parent name: IF-MIB::ifPhysAddress of Scalar
when I'm expecting it to produce the output
bug 2021/03/20 13:08:47 node name: IF-MIB::ifPhysAddress of Scalar
bug 2021/03/20 13:08:47 parent name: IF-MIB::ifEntry of Column
I couldn't help but notice that the smi.GetParentNode() function searches for the given node a lot, but never actually dereferences the Parent field. That's probably the problem. Those data structures are sufficiently complicated that I can't work out what the correct fix is. (Any data structure in any programming language that handles ASN.1 source seems to be complicated).
Cheers
The text was updated successfully, but these errors were encountered:
Hi,
I'm using smi.GetParentNode() and it always seems to return the same node that I pass it as a parameter instead of that node's parent.
e.g. The following code
produces the output
when I'm expecting it to produce the output
I couldn't help but notice that the smi.GetParentNode() function searches for the given node a lot, but never actually dereferences the Parent field. That's probably the problem. Those data structures are sufficiently complicated that I can't work out what the correct fix is. (Any data structure in any programming language that handles ASN.1 source seems to be complicated).
Cheers
The text was updated successfully, but these errors were encountered: