Textual Conventions for SNMPv1 and SNMPv2C

[This is preliminary documentation and subject to change.]

SNMP textual conventions map to CIM defined types. The following table defines the mapping where the SYNTAX clause explicitly refers to a textual convention or refers to an implied textual convention.

Table 3: Mapping SNMPv1 and SNMPv2C Textual Conventions

Textual convention Variant type Textual convention qualifier Encoding qualifier Object syntax qualifier Cimtype qualifier Default value
DateAndTime VT_BSTR DateAndTime OCTETSTRING DateAndTime string 0-0-0,0:0:0.0,+0:0
Displaystring VT_BSTR Displaystring OCTETSTRING Displaystring string
MacAddress VT_BSTR MacAddress OCTETSTRING MacAddress string 00:00:00:00:00:00
PhysAddress VT_BSTR PhysAddress OCTETSTRING PhysAddress string
SnmpUDPAddress VT_BSTR SnmpUDPAddress OCTETSTRING SnmpUDPAddress string 0.0.0.0/0
SnmpOSIAddress VT_BSTR SnmpOSIAddress OCTETSTRING SnmpOSIAddress string 00/00
SnmpIPXAddress VT_BSTR SnmpIPXAddress OCTETSTRING SnmpIPXAddress string 0.00:00:00:00:00:00.0

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 verbatim from the SYNTAX clause of the OBJECT-TYPE macro.

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

For textual conventions not present within the preceding table, the CIM-defined variant type, textual_convention qualifier, encoding qualifier, object_syntax qualifier, and CIMType qualifier are mapped using the primitive type mapping table specified previously and the underlying primitive type, possibly generated through a type assignment hierarchy.

The CIM named qualifier display_hint defines the DISPLAY-HINT clause present within a referenced SNMPv2C TEXTUAL-CONVENTION macro. Where the SYNTAX clause of the SNMPv2C OBJECT-TYPE macro references an SNMPv2C TEXTUAL-CONVENTION macro that contains a DISPLAY-HINT clause, the display_hint qualifier is set to the value of that DISPLAY-HINT clause. Where no reference is made to an SNMPv2C TEXTUAL-CONVENTION macro or no DISPLAY-HINT clause is present within the referenced SNMPv2C TEXTUAL-CONVENTION macro, the display_hint qualifier is not generated.

Example 1 (SNMPv1):

myNamedType ::= DISPLAYSTRING (SIZE (0..127))

    myNamedProperty OBJECT-TYPE
    SYNTAX  myNamedType
    ACCESS read-only
    STATUS MANDATORY
    DESCRIPTION ""

This SNMPv1 example generates the following CIM qualifiers:

object_syntax("myNamedType"),
textual_convention("DISPLAYSTRING"),
encoding("OCTETSTRING"),
variable_length("0..127")
 

Example 2 (SNMPv2C):

myDisplaystring ::= TEXTUAL-CONVENTION
DISPLAY-HINT "255a"
STATUS current
DESCRIPTION "" 
SYNTAX OCTET STRING (SIZE (0..127))

myNamedProperty OBJECT-TYPE
SYNTAX  myDisplaystring
MAX-ACCESS read-only
STATUS current
DESCRIPTION ""
 

This SNMPv2C example generates the following CIM qualifiers:

object_syntax("myDisplaystring"),
textual_convention("OCTETSTRING"),
encoding("OCTETSTRING"),
display_hint("255a"),
variable_length("0..127")