EX02-MIB DEFINITIONS ::= BEGIN -- This is a quick fix of EX01-MIB so no forward OID refs -- and "comment out" OID definition of o1. IMPORTS MODULE-IDENTITY, OBJECT-TYPE, Integer32, experimental FROM SNMPv2-SMI OBJECT-GROUP FROM SNMPv2-CONF; ex01Module MODULE-IDENTITY LAST-UPDATED "9602010000Z" ORGANIZATION "MIB Testers" CONTACT-INFO " Dave Perkins Email: dperkins@scruznet.com" DESCRIPTION "Test MIB module to show valid SMI constructs which are not valid in ASN.1." ::= { experimental 1194 } ex01Test OBJECT IDENTIFIER ::= { experimental 1195 } -- grab an OID aTable OBJECT-TYPE SYNTAX SEQUENCE OF AEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An example table." ::= { ex01Test 1 } aEntry OBJECT-TYPE SYNTAX AEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An entry in the example table." INDEX { aIndex } ::= { aTable 1 } AEntry ::= SEQUENCE { aIndex INTEGER, aOct1 OCTET STRING, aOct2 OCTET STRING, aInt1 Integer32 } aIndex OBJECT-TYPE SYNTAX INTEGER { red(1), green(2), blue(3) } MAX-ACCESS not-accessible STATUS current DESCRIPTION "Index for table." ::= { aEntry 1 } aOct1 OBJECT-TYPE SYNTAX OCTET STRING (SIZE(1..'10'H)) -- the above ^^^^^ is not valid ASN.1 -- since only an integer is allowed here MAX-ACCESS read-create STATUS current DESCRIPTION "An example object with OCTET STRING syntax." DEFVAL { "a default value" } -- the above ^^^^^^^^^^^^^^^^^ is not valid ASN.1 -- since only hex and bin strings are allowed as values -- of type OCTET STRING ::= { aEntry 2 } aOct2 OBJECT-TYPE SYNTAX OCTET STRING (SIZE(1..16)) MAX-ACCESS read-create STATUS current DESCRIPTION "An example object with OCTET STRING syntax." DEFVAL { '0a23bc'h } -- the above ^^^^^^^^^ is not valid ASN.1 -- since hex strings may contain only uppecase letters and -- must use an uppercase 'H' ::= { aEntry 3 } aInt1 OBJECT-TYPE SYNTAX Integer32(1..'0a'h) -- the above ^^^^^ is not valid ASN.1 -- since only an integer is allowed here (also, the -- hex string is not valid since it uses lowercase letters) MAX-ACCESS read-create STATUS current DESCRIPTION "An example object with Integer32 syntax." DEFVAL { '101'b } -- the above ^^^^^^^^ is not valid ASN.1 -- since the only integers and signed integers are allowed -- values of type INTEGER ::= { aEntry 4 } -- removed below -- o1 OBJECT IDENTIFIER ::= { ex01Test '5'H } -- the above ^^^^ is not valid ASN.1 -- since a hex string is not a valid choice here in the syntax, -- and integer must be used. oG OBJECT-GROUP OBJECTS { aOct1, aOct2, aInt1 } STATUS current DESCRIPTION "Group for objects." ::= { ex01Module 1 } END