I am learning net-snmp code-base. To parsing MIB.
In parse.c and parse.h
code keeps a hash bucket. (indexed bucket (tree list))
.
There is also a tree structure, Which contains a next pointer pointing to Next node in hashed list of names.
struct tree{
.
.
struct tree *next; // Next node in hashed list of names
int modid; // The module containing this node
}
I printed the MIB,
SNMP-FRAMEWORK-MIB:snmpFrameworkMIB(10) type=24 Next-> ' ipSystemStatsHCOctetGroup ipSystemStatsOutFragReqds ifStackGroup2 ifOutErrors '
I couldn't understand what is the relation among the name of objects appears after Next-> ?
What is the criteria on the basis of which object names are together? The Code is unclear to me at this point.
What is modid? Its value not equal to module OID!
NOTE: For purely traversing purpose in MIB-tree there is *child, *parent & *peer are given! Also modid
is not part of OID.
A Data-Structure named 'module compatability' in parse.h:
struct module_compatability {
const char *old_module;
const char *new_module;
const char *tag; /* NULL implies unconditional replacement,
* otherwise node identifier or prefix */
size_t tag_len; /* 0 implies exact match (or unconditional) */
struct module_compatability *next; /* linked list */
};
What is the use of this structure? Compatible in What sense ?