- 论坛徽章:
- 0
|
我定义了如下的MIB文件,使用mib2c生成.h .c文件时总是提示如下错误:
============================ERROR INFO START==================
Cannot find module (AlarmTable-MIB): At line 0 in (none)
You didn't give mib2c a valid OID to start with. IE, I could not find
any information about the mib node "FirstTable-MIB". This could be caused
because you supplied an incorrectly node, or by the MIB that you're
trying to generate code from isn't loaded. To make sure your mib is
loaded, run mib2c using this as an example:
env MIBS="+MY-PERSONAL-MIB" mib2c FirstTable-MIB
You might wish to start by reading the MIB loading tutorial at:
http://www.net-snmp.org/tutorial-5/commands/mib-options.html
And making sure you can get snmptranslate to display information about
your MIB node. Once snmptranslate works, then come back and try mib2c
again.
==========================ERROR INFO END=================
请问高人mib2c到底要怎么使用?非常感谢!~
=========================MIB START======================
FirstTest-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY,
enterprises,
FROM SNMPv2-SMI;
FirstTestMIB MODULE-IDENTITY
LAST-UPDATED "200001100000Z" -- Midnight 10 January 2000
ORGANIZATION "AgentX Working Group"
CONTACT-INFO "sgudur@hotmail.com"
DESCRIPTION "This is the test MIB module"
REVISION "200001100000Z" -- Midnight 10 January 2000
DESCRIPTION "Initial version published as RFC 2742."
::= { enterprises 8888 }
AlarmInfoTable OBJECT-TYPE
SYNTAX SEQUENCE OF AlarmInfoEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "前台告警池,后台同步告警用"
::= { first_test 1 }
AlarmInfoTable OBJECT-TYPE
SYNTAX AlarmInfoEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "告警表结构"
INDEX { talarmNo }
::= { AlarmInfoTable 1 }
AlarmInfoEntry ::=
SEQUENCE
{
talarmNo Unsigned32,
talarmID Unsigned32,
talarmCode Unsigned32,
talarmTime OCTET STRING,
}
END
===========================MIB END================= |
|