免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3123 | 回复: 1
打印 上一主题 下一主题

net-snmp error: "Unlinked OID" [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-18 20:28 |只看该作者 |倒序浏览
3可用积分
大家好,情况是这样的,有一块 arm 开发板,板上未移植net-snmp.
我在pc上用arm-linux-gcc交叉编译了一个使用了net-snmp API的程序。
下载到板上执行时,出现错误:
    Did not find 'mgmt' in module #-1 (RFC1213-MIB.txt)
    Unlinked OID in RFC1213-MIB: mib-2 ::= { mgmt 1 }
    Undefined identifier: mgmt near line 15 of RFC1213-MIB.txt
程序中载入MIB的代码为:
    init_mib();
    add_mibdir(".");
    mib_tree = read_mib("RFC1213-MIB.txt");
其中RFC1213-MIB.txt也下载到了开发板上。
FAQ的说法是:
    What about "unlinked OID"?
-------------------------

    This means that the library has been able to find the MIB module,
  and parse the individual objects defined in it, but is having problems
  linking them together into a consistent tree.  In particular, it
  can't find an object corresponding to the name within the braces
  (i.e. the 'xxx' in '{xxx 99}').

    This is probably due either to a typo in this name (remember that
  names are case sensitive, so a reference to 'xxx' will *not* match
  a definition of 'Xxx'), or else the name is defined in another MIB
  file, and this dependency is missing from the IMPORT clause of this
  MIB file.
我觉得的情况应该”this dependency is missing from the IMPORT clause of this
  MIB file."
我的想法是:应该载入定义了'mgmt‘的mib,可我不知道怎么载入多个mib.
以及怎么知道'mgmt‘定义在哪个文件中,望大虾指点。不甚感激.....

另外,能不能解释一下net-snmp中mib相关的知识,如“but is having problems
  linking them together into a consistent tree.”所说,好像要连接成一个连续
的树,那么这一步是谁在完成,以及至少需要哪几个mib.

谢谢!

[ 本帖最后由 fishvfr 于 2008-5-18 20:29 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-05-18 20:55 |只看该作者
自己顶一下,我读了一下 init_mib()的说明,
好像他会把add_mibdir()添加的路径加到搜多路径中,
于是我有往板上下载了SNMPv2-MIB.txt(我把MIB挨个浏览了一边,发现mgmt
定义在其中)。

问题解决。虽然有新的错误出现,不过好像是网络设置的问题了。真好,被问题堵着
的感觉最不爽了。

不过对于init_mib()和add_mibdir()的具体作用,以及上面提到的连接成连续的树
还是一团雾,希望大虾指点,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP