Mapping Variable-Length Subtype Definitions

[This is preliminary documentation and subject to change.]

The following mapping applies where the SYNTAX clause of the SNMPv1 and SNMPv2C OBJECT-TYPE macro refers to an SNMP primitive type, named type, or textual convention containing a subtype definition derived from a variable-length OCTET STRING or "Opaque".

The CIM named qualifier textual_convention defines the textual representation of the SYNTAX clause of the OBJECT-TYPE macro.

The CIM named qualifier object_syntax defines the named type definition present within the SYNTAX clause of the OBJECT-TYPE macro. The object_syntax is copied from the SYNTAX clause of the OBJECT-TYPE macro up to but not including the size constraints.

The CIM named qualifier encoding defines the SNMP type used when encoding SNMPv1 and SNMPv2C protocol frames.

The CIM property qualifier variable_length specifies the minimum, maximum, and fixed-length values associated with the type definition. The variable_length qualifier is implemented as a qualifier string in the following format where the variable-length values are represented as unsigned 32-bit integers:

(((0.9) .. (0.9)) | (0.9))(, (((0.9) .. (0.9)) | (0.9)))*
 

For example:

MySnmpOSIAddress ::=  TEXTUAL-CONVENTION

    DISPLAY-HINT    "*1x:/1x:"
    STATUS        current
    DESCRIPTION
            "Represents an OSI transport-address:

               octets   contents           encoding
                  1     length of NSAP     'n' as an unsigned-integer
                                              (either 0 or from 3 to 20)
               2..(n+1) NSAP                concrete binary representation
               (n+2)..m TSEL               string of (up to 64) octets
            "
    SYNTAX         OCTET STRING (SIZE (1|4..85))
 

This example maps to:

display_hint("*1x:/1x:"),
encoding("OCTETSTRING"),
textual_convention("OCTETSTRING"),
variable_length ("1,4..85")