[SNMP4J] AgenPro MIB compiler problem

Frank Fock fock at agentpp.com
Wed Sep 26 00:14:10 CEST 2007


Hi Ed,

There are many MIB compilers (including online
validation sites) that perform incomplete
syntax checks. This is something one should have
always in mind ;-)

The SEQUENCE definition is wrong, because in the
OBJECT-TYPE definition, you use
"RouterChassisAlarmBits" as syntax whereas in the
SEQUENCE you use "BITS". SMIv2 requires that the
syntax must be the exactly same (except that the
SEQUENCE syntax must not be extended by SIZE and
range restrictions, AKA subtyping) even if the base
types would match.

Best regards,
Frank

Ed Shober wrote:
> I'm having trouble compiling a MIB. The error code given is 1200. The
> message
> 
> seems to imply that a columnar OBJECT-TYPE cannot be associated with
> 
> something other than a SEQUENCE. I want scalar columns of INTEGER or
> 
> BITS. The MIB seems to validate with no errors using online validation
> sites.
> 
> Is this a limitation of AgenPro or am I trying to do something the wrong
> way?
> 
>  
> 
> Example:
> 
>  
> 
> RouterChassisAlarmBits ::= BITS
> 
> {
> 
>         powerSupply1    (0),
> 
>         powerSupply2    (1),
> 
>         fan             (2),
> 
>         xptPower        (3),
> 
>         smpte           (4)
> 
> }
> 
>  
> 
> routerChassisAlrmStatus OBJECT-TYPE
> 
>         SYNTAX     RouterChassisAlarmBits
> 
>         MAX-ACCESS read-only
> 
>         STATUS     current
> 
>         DESCRIPTION
> 
>                 "Router chassis alarm status" -- a bit set means alarm is
> active
> 
> ::= { routerChassisEntry 5 }
> 
>  
> 
> RouterChassisEntry ::= SEQUENCE
> 
> {
> 
>         routerChassisIndex      INTEGER,
> 
>         routerChassisName       DisplayString,
> 
>         routerChassisDescr      DisplayString,
> 
>         routerChassisType       RouterChassisType,
> 
>         routerChassisAlrmStatus BITS
> 
> }
> 
>  
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list