阅读:4100回复:4
net-snmp或者ucd-snmp的MIB定义扩展问题关注
Hi,朋友们!
目前我想自己定一个MIB,下面是这个MIB的内容。 在该MIB文件中定义了Trap的种类、内容、格式和企业自定义的多个对象。(MIB1结构) InocuLAN-Alarm-MIB DEFINITIONS ::= BEGIN IMPORTS enterprises FROM RFC1065-SMI OBJECT-TYPE FROM RFC-1212 TRAP-TYPE FROM RFC-1215; cheyenne OBJECT IDENTIFIER ::= { enterprises 46 } inoculan OBJECT IDENTIFIER ::= { cheyenne 879 } inoculanNLMRev OBJECT IDENTIFIER ::= { inoculan 1 } -- ************************************************************************* -- InocuLAN (1.3.6.1.4.1.46.879) -- ************************************************************************** inoculanNLMRevMajor OBJECT-TYPE SYNTAX INTEGER (0..65535) ACCESS read-only STATUS mandatory DESCRIPTION \"The major revision level of the NLM (left of the decimal). Used for presence checking.\" ::= { inoculanNLMRev 1 } inoculanNLMRevMinor OBJECT-TYPE SYNTAX INTEGER (0..65535) ACCESS read-only STATUS mandatory DESCRIPTION \"The minor revision level of the NLM (right of the decimal).\" ::= { inoculanNLMRev 2 } inoculanParmsTrapEnable OBJECT-TYPE SYNTAX INTEGER (0..1) ACCESS read-write STATUS mandatory DESCRIPTION \"Indicates whether agent should or should not send traps.\" ::= { inoculan 2 } inoculanParmsPollTime OBJECT-TYPE SYNTAX INTEGER (60..2592000) ACCESS read-write STATUS mandatory DESCRIPTION \"Seconds between checking for traps.\" ::= { inoculan 3 } inoculanServerName OBJECT-TYPE SYNTAX OCTET STRING ACCESS read-only STATUS mandatory DESCRIPTION \"NetWare Server Which Generated Error\" ::= {inoculan 4} inoculantrapdesc OBJECT-TYPE SYNTAX OCTET STRING ACCESS read-only STATUS optional DESCRIPTION \"A description of a specific Cheyenne trap\" ::= {inoculan 5} -- ************************************************************************* -- traps -- ************************************************************************** inoculantrapHigh TRAP-TYPE ENTERPRISE inoculan VARIABLES { inoculanServerName, inoculantrapdesc } DESCRIPTION \"InocuLAN Critical Trap.\" --#TYPE \"InocuLAN Critical\" --#SUMMARY \"%s InocuLAN: %s \" --#ARGUMENTS {0,1} --#SEVERITY CRITICAL --#STATE DEGRADED ::= 1 inoculantrapMed TRAP-TYPE ENTERPRISE inoculan VARIABLES { inoculanServerName, inoculantrapdesc } DESCRIPTION \"InocuLAN Minor Trap\" --#TYPE \"InocuLAN Warning\" --#SUMMARY \"%s InocuLAN: %s \" --#ARGUMENTS {0,1} --#SEVERITY MINOR --#TIMEINDEX 1 --#STATE OPERATIONAL ::= 2 inoculantrapLow TRAP-TYPE ENTERPRISE inoculan VARIABLES { inoculanServerName, inoculantrapdesc } DESCRIPTION \"InocuLAN Informational Trap\" --#TYPE \"InocuLAN Informational\" --#SUMMARY \"%s InocuLAN: %s \" --#ARGUMENTS {0,1} --#SEVERITY INFORMATIONAL --#STATE OPERATIONAL ::= 3 END 问题1: 如果我要把这个MIB转换成MIB2的应该怎么做? 问题2: 如果我想再MIB文件中加入sysObjectID,识别的依据是RFC1213定义的MIB库中System组sysObjectID。该如何再MIB中定义? 问题3:如何使用mib2c,添加你所要的代码。在ucd-snmp或者net-snmp中如何用MIB2c自动生成.h和.c 文件阿?能详细说说么? 多谢了,答完了,我会给你加分的哦.. |
|
沙发#
发布于:2003-11-12 19:42
哥们,能不能请问你一个问题,如何定义MIB.
急!!! |
|
板凳#
发布于:2003-11-27 17:26
我无论如何不能生成.c .h文件
用的是net-snmp 5.0.8 export MIBS=ALL mib2c -c mib2c.old-api.conf TCP-MIB /usr/local/bin/mib2c ustScalarSet \"TCP-MIB.txt\" -f ustScalarSet 我想用TCP-MIB试一下,到底应该怎么用呢? you didn\'t give me a valid OID to start with at /usr/local/bin/mib2c line 115. |
|
地板#
发布于:2003-11-29 00:58
mib2c -c mib2c.old-api.conf tcp
好好看看README和FAQ |
|
地下室#
发布于:2005-01-15 16:15
哥们,能不能请教你一个问题
我用vc开发一个交换机的监控软件 请问在vc中要加入那些api 怎么访问mib表 |
|
|