【发布时间】:2012-09-29 17:10:50
【问题描述】:
我正在学习 net-snmp 代码库。解析 MIB。
在parse.c and parse.h 代码中保留了一个哈希桶。 (indexed bucket (tree list)).
还有一个树形结构,其中包含一个指向Next node in hashed list of names.的next指针
struct tree{
.
.
struct tree *next; // Next node in hashed list of names
int modid; // The module containing this node
}
我打印了 MIB,
SNMP-FRAMEWORK-MIB:snmpFrameworkMIB(10) type=24 Next-> ' ipSystemStatsHCOctetGroup ipSystemStatsOutFragReqds ifStackGroup2 ifOutErrors '
Next->之后出现的对象名称之间的关系我不明白?
基于哪些对象名称在一起的标准是什么? 目前我还不清楚该准则。
什么是模态?它的值不等于模块 OID!
注意:对于 MIB 树中的纯粹遍历目的,给出了 *child、*parent 和 *peer! modid 也不是 OID 的一部分。
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 */
};
这个结构有什么用?什么意义上的兼容?
【问题讨论】:
标签: c network-programming snmp net-snmp nms