> I am using the tree-structure from library/parse.h and would like > to know, if it's possible to get more specific informations about > a node. To be more precise, I want to know, whether an oid-leave belongs > to a table (e.g. the if-stuff under .1.3.6.1.2.1.2.2) or is an single > value (like sysDescr in .1.3.6.1.2.1.1.1). Can someone give me a hint?
The simplest way to detect a "leaf-node" (as opposed to an internal node) is to look at the 'type' field. This will be 0 for internal nodes, and non-0 for leaf nodes. But that doesn't distinguish between a scalar object and a column object (i.e. part of a table). Probably the easiest way to detect this is to follow the 'parent' link, and look at the 'indexes' field. If this is 0, then the original node was a scalar object. If it's non-NULL, then this is part of a table. Does that help? Dave ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
