OBJECT-TYPE MACRO ::= BEGIN TYPE NOTATION ::= "SYNTAX" Syntax UnitsPart "MAX-ACCESS" Access "STATUS" Status "DESCRIPTION" Text –必须使用该子句 ReferPart IndexPart DefValPart VALUE NOTATION ::= value(VALUE ObjectName) -- 基础类型或其子类型、文本约定或其子类型、BITS伪类型 Syntax ::= type | "BITS" "{" NamedBits "}" NamedBits ::= NamedBit| NamedBits "," NamedBit NamedBit ::= identif?ier "(" number ")" -- number is nonnegative –- 以文本描述该对象的类型单位,如,单位seconds UnitsPart ::= "UNITS" Text| empty -- 访问权限是由小到大排列的 Access ::= "not-accessible"| "accessible-for-notify" | "read-only"| "read-write"| "read-create" -- "current", "deprecated", "obsolete",分别表示:当前使用、不赞成使用、作废 -- 对于自定义的MIB,需要管理的对象,当然选择"current"状态(同SMIv1的mandatory) Status ::= "current"| "deprecated"| "obsolete" -- 当该对象已经在其他模块中定义,则在此说明原来的定义信息,一般企业和个人不使用 ReferPart ::= "REFERENCE" Text| empty -- AUGMENTS用于扩展表格中的列 IndexPart ::= "INDEX" "{" IndexTypes "}"| "AUGMENTS" "{" Entry "}"| empty IndexTypes ::= IndexType| IndexTypes "," IndexType IndexType ::= "IMPLIED" Index| Index Index ::= value(ObjectName) -- ObjectName ::= OBJECT IDENTIFIER Entry ::= value(ObjectName) DefValPart ::= "DEFVAL" "{" Defvalue "}"| empty -- 定义默认值,可选。一般只在支持动态创建表格对象时使用 Defvalue ::= value(ObjectSyntax) --对象语法对应数据类型的值 | "{" BitsValue "}" BitsValue ::= BitNames| empty BitNames ::= BitName| BitNames "," BitName BitName ::= identif?ier -- 除双引号外的7位ASCII字符、制表符TAB、空格、\n或\n\r Text ::= value(IA5String) END