TNM SNMP Data Types
Opaque
Opaque values were used in early versions of SNMP to exchange arbitrary
ASN.1/BER encoded values.
The SNMP engine of the Tnm extension also uses the Opaque data type
to pass values with an unknown ASN.1/BER encoding to the script layer.
This is especially useful if new tagged types are added to SNMP and agents
ship those new types via an SNMP version that does not know about this
type.
The primitive Tcl string representation for an Opaque value is a string
containing hexadecimal numbers (from 00 to ff) separated by colons. The
hexadecimal number corresponds to the ASN.1/BER encoded value. Note, Opaque
is only supported for backward compatibility and it should only be used
in rare cases.
The Tnm extension returns values in the primitive string representation
if no other formatting rules apply. Formatting rules defined in MIB modules
are applied automatically (see the documentation for the Tnm::mib
command on how to load MIB modules).
This includes the interpretation if DISPLAY-HINTs as well as the conversion
of integer values to the corresponding enumeration. For example, DisplayString
values are automatically converted from the primitive OCTET STRING representation
into a human readable ASCII string by applying the “225a” DISPLAY-HINT,
and values of type Truth-Value are returned as “true” or “false” instead
of 1 and 2 (RFC 1903).
Explicit conversions are possible by using the Tnm::mib format and Tnm::mib
scan commands as described in the Tnm::mib manual page.
|