Subject: [libsmi] problem restricting TimeTicks - bad error message???
From: Pete Flugstad <[email-masked]>
To: [email-masked]
Date: Mon, 31 Mar 2003 13:26:49 -0600
List-Id: Discussions concerned with the LIBSMI software <libsmi.ibr.cs.tu-bs.de>

I have encountered a mib (full mib attached) with the following entry:

testInteger OBJECT-TYPE
         SYNTAX          TimeTicks (500..12000)
         MAX-ACCESS      read-write
         STATUS          current
         DESCRIPTION
                 "Test Integer"
         ::=  { testObjects 1 }

When I run this through libsmi (0.4.1), smilint, I get:

test.mib:22: the SPPI construct/keyword `MAX-ACCESS' may not be used
              in a MIB

and it bails.  It's pointing at the SYNTAX line.  Now, I don't
claim to be a SMIv2 expert, but I believe the syntax is OK, isn't
it?  Maybe not?

Even if it's not, the error message is completely wrong and
misleading, as the problem has nothing at all to do with the
MAX-ACCESS line.

Pete Flugstad
Icon Labs
TEST-MIB DEFINITIONS ::= BEGIN

    IMPORTS
	MODULE-IDENTITY, OBJECT-IDENTITY, NOTIFICATION-TYPE,
	TimeTicks, OBJECT-TYPE,
	enterprises
		FROM SNMPv2-SMI;

testMibModule MODULE-IDENTITY
	LAST-UPDATED "200301230000Z"
	ORGANIZATION "World"
	CONTACT-INFO "Someplace"
	DESCRIPTION
		"Test module"
	::= { enterprises 5687 }

--- comment test

testObjects OBJECT IDENTIFIER ::= { testMibModule 1 }

testInteger OBJECT-TYPE
	SYNTAX          TimeTicks (500..12000)
	MAX-ACCESS  	read-write
	STATUS		current
	DESCRIPTION
	        "Test Integer"
	::=  { testObjects 1 }

testObjectIdentity2 OBJECT-IDENTITY
	STATUS		current
	DESCRIPTION
		        "Test Object Identity 2"
	::=  { testObjects 2 }

testObjectIdentity3 OBJECT-IDENTITY
	STATUS		current
	DESCRIPTION
		        "Test Object Identity 3"
	::=  { testObjects 3 }

testAlarms OBJECT IDENTIFIER ::= { testMibModule 2 }

testAlarmIdentity1 OBJECT-IDENTITY
	STATUS		current
	DESCRIPTION
		        "Test Alarm Identity 1"
	::=  { testAlarms 1 }

testAlarmIdentity2 OBJECT-IDENTITY
	STATUS		current
	DESCRIPTION
		        "Test Alarm Identity 2"
	::=  { testAlarms 2 }

testAlarmIdentity3 OBJECT-IDENTITY
	STATUS		current
	DESCRIPTION
		        "Test Alarm Identity 3"
	::=  { testAlarms 3 }

testTraps OBJECT IDENTIFIER ::= { testMibModule 3 }
testTrapPrefix OBJECT IDENTIFIER ::= { testTraps 0 }

testTrap NOTIFICATION-TYPE
   OBJECTS { testInteger }
   STATUS current
   DESCRIPTION
        "test trap"
   ::= { testTrapPrefix 1 }

END