| BITS Must Not Be Imported |
|
A common area of confusion among SNMP MIB designers is the use of BITS. Putting BITS in the IMPORTs clause of a MIB is illegal. The MIB compiler included with SilverCreek, the SNMP Test Suite from InterWorking Labs, will reject a MIB that has BITS in the IMPORTs, because it is wrong per RFC 2578. Other MIB compilers for other types of products, such as simulators, are very permissive; these MIB compilers will allow this error and many other errors to slide by in order to manage or simulate very badly written MIBs. BITS is not a TEXTUAL-CONVENTION. The standard TEXTUAL-CONVENTION types are defined in RFC 1903. Both RFC 1902 and 1903 define BITS, but as part of the OBJECT-TYPE and TEXTUAL-CONVENTION macros:
OBJECT-TYPE
MACRO ::=
(from RFC 1902)
TEXTUAL-CONVENTION
MACRO ::=
(from RFC 1903) Hence, BITS is an implicit part of the OBJECT-TYPE and TEXTUAL-CONVENTION macros. For BITS to be considered a TEXTUAL-CONVENTION (and thus need to be imported), BITS would need to have been defined along the lines of:
BITS
::= TEXTUAL-CONVENTION
Such a definition does not exist. The BITS clause is intended to add semantic clarity to the notion of assigning meaning to bits in an OCTET STRING. Please see Section 3.2 of RFC 2578 "Structure of Management Information Version 2" that states:
|