Previous Table of Contents Next


5.2.3 SNMPv2 SMI Notification Definitions

The SNMPv2 SMI’s new NOTIFICATION-TYPE macro defines the information contained within the unsolicited transmission of management information. This includes an SNMPv2-Trap-PDU or an Inform-Request-PDU. The SNMP Protocol Operations document (RFC 1905) contains details on using the NOTIFICATION-TYPE macro.

SMIv2 also references three other new ASN.1 macros: MODULE-COMPLIANCE, OBJECT-GROUP, and AGENT-CAPABILITIES, which are described in detail in RFC 1904 and discussed in Section 5.4.

5.3 The SNMPv2 Textual Conventions

The SMI defines a number of data types, such as INTEGER and OCTET STRING, that are used in defining managed objects. In some cases, it is useful to define new types, which are similar in syntax (form) but with a more precise semantics (meaning), than those types defined in the SMI. These newly defined types are called textual conventions, and they are specified in RFC 1903 [5-4]. The key advantage of these textual conventions is that they enable the human reader of a MIB module to more easily read and understand that module’s intent.

The textual convention consists of a data type with a specific name and associated syntax and semantics. An ASN.1 macro, TEXTUAL-CONVENTION, also found in RFC 1903, is used to convey that syntax and semantics. For example, the textual convention MacAddress represents an IEEE 802 MAC address, which is an OCTET STRING of size 6. In other words, the MacAddress type is based on the existing OCTET STRING type, but with the restrictions that it is limited to six octets in length and is defined to represent an IEEE 802 MAC address.

Within the TEXTUAL-CONVENTION macro, the DISPLAY-HINT clause is particularly useful because it describes how the value of the object will be displayed. It uses abbreviations such as x (hexadecimal), d (decimal), o (octal), and b (binary), and a (ASCII) to more fully define the display format.

Here is the TEXTUAL-CONVENTION macro from RFC 1903:

   SNMPv2-TC DEFINITIONS ::= BEGIN
   IMPORTS
            ObjectSyntax, TimeTicks
                     FROM SNMPv2-SMI;
   -- definition of textual conventions
   TEXTUAL-CONVENTION MACRO ::=
   BEGId                  "SYNTAX" (Syntax)
            VALUE NOTATION ::=
                                   value(VALUE Syntax)
            DisplayPart ::=
                                   "DISPLAY-HINT" Text
                                   | empty
            Status ::=
                                   "current"
                                   | "deprecated"
                                   | "obsolete"
            ReferPart ::=
                               d | empty
            -- uses the NVT ASCII character set
            Text ::= """" string """"
            Syntax ::=
                                   type (ObjectSyntax)
                                   | "BITS" "{" Kibbles "}"
            Kibbles ::=
                                     Kibble
                                   | Kibbles "," Kibble
            Kibble ::=
                                    identifier "(" nonNegativeNudmber ")"
   END

The following textual conventions have been defined for use with SNMPv2 [5-4]:

Convention Description

DisplayString Represents textual information taken from the NVT ASCII character set (see RFC 854).
PhysAddress Represents Media- or Physical-level addresses. (Originally from RFC 1213).
MacAddress An 802 MAC address represented in the “canonical” order defined by IEEE 802.1a; that is, it is represented as if it were transmitted least significant bit first, even though 802.5 requires MAC addresses to be transmitted most significant bit first. (Originally from RFCs 1230 and 1231.)
TruthValue Represents a boolean value, true or false. (Originally from RFC 1253.)
TestAndIncr Represents integer-valued information for atomic operations. Atomic operations are self-contained but are performed in a specific order or sequence. The TestAndIncr assures that these required sequences are maintained.
AutonomousType Represents an independently extensible type identification value. It may, for example, indicate a particular subtree with further MIB definitions, or define a particular type of protocol or hardware. (Originally from RFC 1316.)
InstancePointer A pointer to a row of a MIB table in the managed device. By convention, it is the name of the first columnar object in the conceptual row. Note that the term “conceptual row” defines all of the objects having the same instance value in a MIB table. The terms conceptual row and row are generally used interchangeably. (Originally from RFC 1316, but obsoleted in RFC 1903.)
VariablePointer A pointer to a specific object instance (from the obsoleted InstancePointer).
RowPointer A pointer to a conceptual row.
RowStatus Creates and deletes conceptual rows, and is used as the value of the SYNTAX clause for the status column of a conceptual row. (See the SMI document for further details; originally from RFC 1271, the first version of the RMON MIB.)
TimeStamp The value of the sysUpTime object at which a specific occurrence happened.
TimeInterval A period of time, measured in hundredths of a second, between two events.
DateAndTime A date-time specification, which can indicate the year, month, day, time, etc.
StorageType Describes the memory realization of a conceptual row, such as volatile, nonvolatile, read only, etc. (Originally from RFC 1447.)
TDomain Denotes a kind of transport service, such as those specified in the Transport Mappings document, RFC 1906.
TAddress Denotes a transport service address, such as those specified in the Transport Mappings document, RFC 1906.


Previous Table of Contents Next