Home

MIB Smithy

  1. Up to Table of Contents

Querying Typedef Properties

Syntax:

% dbcmd get property ?property ...? typedef

Returns:

  • The value of the specified property or properties (see below).

Properties:

-asn1type
Returns the base ASN.1 or SNMP data type that the queried ASN.1 Type Assignment or TEXTUAL-CONVENTION is derived from and that OBJECT-TYPEs referencing the queried record in their SYNTAX are encoded as. This option automates the process of determining the base type where the SYNTAX field references a derived type. Returns undefined or an empty string (depending on SDK version) if the base type could not be determined due to a missing dependency. Note that it is not legal for TEXTUAL-CONVENTIONs to be derived from other TEXTUAL-CONVENTIONs.
-comments
Returns the textual comments associated with record, other than those that are assigned to any named-number enumerations.
-container
Returns the fully-qualified name of the record in which the queried record is contained. This property equivalent to -fullname for the container record, or for the queried record with the last envelope stripped off.
-description
Returns the body of text corresponding to the DESCRIPTION field of a TEXTUAL-CONVENTION record.
-enumdecl

Returns the as-declared list of named-number enumerations allowed for (or as-refined-by) the type definition. Returns an empty string if the type definition has no declared enumerations. Each list element is its self a list of two or three elements corresponding to the name, value and any comments associated with the value. Hex and binary enumeration values are not converted to integers in the result.

{ name value ?comments? } ...

-enums
Returns the as-inherited list of named-number enumerations allowed by the type definition. If the type definition contains an enumerated refinement then it is returned as in -enumdecl. Otherwise, if it is derived from another type (Note: not legal with TEXTUAL-CONVENTIONs) that contains an enumeration refinement, then its enumeration list is returned. In any case, hex and binary enumeration values are converted to integers in the result.
-format
Returns the value of the DISPLAY-HINT field for a TEXTUAL-CONVENTION record, if any.
-fullname
Returns the fully-qualified name of the record in the form accepted by the SDK as a search query. For this record type, that is the file handle, the module name and the record name joined together with a ! (exclamation point), as in @File2!SNMPv2-TC!RowStatus.
-name
Returns the unqualified name of the ASN.1 Type Assignment or TEXTUAL-CONVENTION.
-range
Returns the as-inherited list of discrete ranges allowed by the type definition. If the type definition contains a range refinement then it is returned as in -rangedecl. Otherwise, if it is derived from another type (Note: not legal with TEXTUAL-CONVENTIONs) that contains a range refinement, then its range list is returned.
-rangedecl
Returns the as-declared list of discrete ranges allowed for (or as-refined-by) the type definition. Returns an empty string if the type definition has no declared range refinement. Each list element is a minimum/maximum value pair, regardless of whether or not the minimum and maximum values are equal.
-reference
Returns the body of text corresponding to the REFERENCE field of a TEXTUAL-CONVENTION record.
-size
Returns the as-inherited list of discrete lengths allowed by the type definition. If the type definition contains a size refinement then it is returned as in -sizedecl. Otherwise, if it is derived from another type (Note: not legal with TEXTUAL-CONVENTIONs) that contains a size refinement, then its size list is returned.
-sizedecl
Returns the as-declared list of discrete lengths allowed for (or as-refined-by) the type definition. Returns an empty string if the type definition has no declared length refinement. Each list element is a minimum/maximum length pair, regardless of whether or not the minimum and maximum lengths are equal.
-status
Returns the value of the STATUS field for a TEXTUAL-CONVENTION record.
-subtype
Returns a list of name+value pairs equivalent to the components field of the -syntaxdecl option, including any further structure/subtype information thereof.
-syntax
Returns the data type from which the ASN.1 Type Assignment or TEXTUAL-CONVENTION is derived. For structured and subtyped types, this is only the data type (e.g. SEQUENCE OF) and does not include any subtype or refinment information.
-syntaxdecl

Returns the full as-declared syntax/type information for the ASN.1 Type Assignment or TEXTUAL-CONVENTION as a list of name+value pairs suitable for use with Tcl's array set command. The fields include:

components
For structured types and subtypes, this field contains a list subtype or structure elements that are themselves a list of the same format as that returned by the -syntaxdecl option.
enums
The as-declared list of named-number enumerations allowed for (or as-refined-by) the data type. (See -enumdecl below for details.)
name
The name portion for ASN.1 "named" types. For the components field (see above), this is most often the name of a column in a SEQUENCE definition for a conceptual table.
range
The as-declared list of discrete ranges allowed for (or as-refined-by) the data type or component. (See -rangedecl below for details.)
size
The as-declared list of discrete lengths allowed for (or as-refined-by) the data type or component. (See -sizedecl below for details.)
syntax
The as-declared data type from which the ASN.1 Type Assignment or TEXTUAL-CONVENTION is derived.
tag
The as-declared tag specifying the encoding for the data type or component. This field is only used in the SMI Base Modules and other generic ASN.1 modules such as those defining SNMP its self. (See -tag below for details.)
-tag
Returns an empty string for non-tagged types. For tagged types, returns a list containing three elements of the form: { mode class value } where mode is either EXPLICIT or IMPLICIT, class is either APPLICATION, UNIVERSAL, PRIVATE or CONTEXT, and value is the tag value.
  1. Up to Table of Contents