Home
You are not currently signed in.

MIB Smithy

  1. Up to Table of Contents

Querying Object Properties

Syntax:

% dbcmd get property ?property ...? object

Returns:

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

Properties:

-access
Returns the value of the ACCESS or MAX-ACCESS field for an OBJECT-TYPE record.
-asn1type
Returns the base ASN.1 or SNMP data type that values of this OBJECT-TYPE 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.
-augments
Returns an identifier or OID value corresponding to the AUGMENTS field of the OBJECT-TYPE. If the object has no AUGMENTS defined, the value of the AUGMENTS field for its parent or child is returned as appropriate. This allows the augmented table to be determined from a column or table object directly, rather than having to query the augmenting row specifically.
-augmentsdecl
Returns an identifier or OID value corresponding to the AUGMENTS field of the OBJECT-TYPE. Unlike -augments, this property will not look to other objects if the queried object has no AUGMENTS specification its self.
-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.
-defval

Returns the default value (DEFVAL) specification for the OBJECT-TYPE, if any. The format for the value returned is a two element list consisting of a type and value, where the type provides contextual information about how the DEFVAL was specified that might not otherwise be available (e.g. distinguishing between an identifier and a character string that happens to look like an identifier). Returns an empty string if no DEFVAL is defined for the OBJECT-TYPE. The keywords that may be returned for the type field are:

identifier
Indicates that the provided value is an identifier, as in DEFVAL { xyz }.
idlist
Indicates that the provided value is a list of identifiers, as in DEFVAL {{bit1, bit2, bit3}}.
integer
Indicates that the provided value is an integer value, as in DEFVAL { -1 }.
objectid
Indicates that the provided value is an object identifier, as in DEFVAL {{ xyz 1 }}. In this case, the format for the returned value is the same as that for the -valuedecl property.
string
Indicates that the provided value is a character string, hex string, or binary string, as in DEFVAL { "" }, DEFVAL { '12AB'H } or DEFVAL { '00001111'B }. For the character string form, surrounding quotes are stripped.
-description
Returns the body of text corresponding to the DESCRIPTION field of the OBJECT-TYPE record.
-enumdecl

Returns the as-declared list of named-number enumerations allowed for the OBJECT-TYPE definition. Returns an empty string if the OBJECT-TYPE has no declared enumerations. Each list element is in turn 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 OBJECT-TYPE definition. If the OBJECT-TYPE contains an enumerated refinement then it is returned as in -enumdecl. Otherwise, if it references a non-base type 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.
-extends
Returns the value of the EXTENDS field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier). If the object has no EXTENDS value defined, the EXTENDS property for its parent or child is returned as appropriate. This allows the EXTENDS value to be obtained from a column or table object directly, rather than having to query the row definition specifically. If no EXTENDS value is defined, an empty string is returned.
-extendsdecl
Returns the value of the EXTENDS field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier). If none is defined for the object, an empty string is returned. No other related objects will be queried.
-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-MIB!sysDescr.
-fulloid
Returns the absolute (or as close as possible) OID value for the record, in dotted numeric notation (e.g. 1.3.6....). If the OID is not able to be resolved all the way to one of the root nodes (ccitt, iso, joint-iso-ccitt), due to one or more dependent modules not being present in the database, then the first component will be that of the descriptor that could not be resolved.
-index
Returns a list of identifiers or OID values corresponding to the list of column objects (SMIv1/v2) or column types (SMIv1) referenced by the INDEX field of the OBJECT-TYPE. If the last index is defined using the IMPLIED keyword then the item returned for that index will be prefixed by the * (asterisk) character. If the object has no INDEX defined, the value of the INDEX property for its parent, child, or augmented table is returned as appropriate. This allows the index list to be obtained from a column or table object directly, rather than having to query the row definition specifically.
-indexdecl
Returns the "as-declared" list of identifiers or OID values corresponding to the list of column objects (SMIv1/v2) or column types (SMIv1) referenced by the INDEX field of the OBJECT-TYPE. If the last index is defined using the IMPLIED keyword then the item returned for that index will be prefixed by the * (asterisk) character. Unlike -index, this property will not look to other objects if the queried object has no INDEX specification its self.
-indexparts
Returns a list containing information about parsed instance subidentifiers corresponding to each of the INDEX objects for the queried object. Each list element is a list of three elements: the name of the INDEX object, an OBJECT IDENTIFIER value fragment representing the parsed subidentifiers, and finally the value extracted from those subidentifiers. For numeric types, the value is the same as the subidentifier. For other types, the value may exclude the first subidentifier depending on whether or not the index is IMPLIED, and character index types are returned as raw bytes (byte array Tcl_Objs). The values are not otherwise formatted in any way (i.e., DISPLAY-HINTs are not automatically applied).
-name
Returns the unqualified name of the OBJECT-TYPE record.
-oid
Returns the OID value for the record, in dot-delimited notation, with the module name and name portion of name-and-number forms (if any) stripped out. That is, a.1.2.3 will be returned even if the OID value is declared in the ASN.1 as { EX-MIB.a b(1) c(2) 3 }.
-oidsuffix
Returns a dot-delimited list of "extra" subidentifiers specified in the record search string that were not part of the matched portion that pointed to this record. e.g., the -oidsuffix property for sysDescr.0 is 0.
-piberrors

Returns a list corresponding to the INSTALL-ERRORS field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier), in the same format as -enumdecl. If none is defined for the object, an empty string is returned. Hex and binary enumeration values are not converted to integers in the result.

{ name value ?comments? } ...

-pibindex
Returns the value of the PIB-INDEX field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier). If the object has no PIB-INDEX defined, the value of the PIB-INDEX property for its parent, child, or augmented table is returned as appropriate. This allows the PIB-INDEX value to be obtained from a column or table object directly, rather than having to query the row definition specifically. If no PIB-INDEX value is defined, an empty string is returned.
-pibindexdecl
Returns the value of the PIB-INDEX field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier). If none is defined for the object, an empty string is returned. No other related objects will be queried.
-pibreferences
Returns the value of the PIB-REFERENCES field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier). If none is defined for the object, an empty string is returned.
-pibtag
Returns the value of the PIB-TAG field of a COPS-PR-SPPI (PIB) OBJECT-TYPE (normally an identifier). If none is defined for the object, an empty string is returned.
-range
Returns the as-inherited list of discrete ranges allowed by the OBJECT-TYPE definition. If the OBJECT-TYPE contains a range refinement then it is returned as in -rangedecl. Otherwise, if it references a non-base type that contains a range refinement, then its range list is returned.
-rangedecl
Returns the as-declared list of discrete ranges allowed for the OBJECT-TYPE definition. Returns an empty string if the OBJECT-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 the OBJECT-TYPE record.
-row
Returns the name of the conceptual row OBJECT-TYPE associated with the specified object (i.e., the parent of a column or first child of a conceptual table).
-size
Returns the as-inherited list of discrete lengths allowed by the OBJECT-TYPE definition. If the OBJECT-TYPE contains a size refinement then it is returned as in -sizedecl. Otherwise, if it references a non-base type that contains a size refinement, then its size list is returned.
-sizedecl
Returns the as-declared list of discrete lengths allowed for the OBJECT-TYPE definition. Returns an empty string if the OBJECT-TYPE definition has no declared size 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 the OBJECT-TYPE record.
-subids
Returns a list of integers representing the next subidentifier for each record whose OID values are assigned immediately subordinate to the OID value of the record search string. For example, if records assigned the OID values x.1 and x.2, then the -subids property for x is the list { 1 2 }.
-subnodes
Returns a list of records whose OID values are assigned immediately subordinate to the OID value of the record search string and that are defined in the same module. An element may be returned as a relative OID for "implicit" node definitions (e.g., assuming records are assigned values x.1.1 and x.1.2, but none are defined for x.1, then the result will include the value x.1).
-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 referenced by the OBJECT-TYPE's SYNTAX field. For 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 information for the OBJECT-TYPE record as a list of name+value pairs suitable for use with Tcl's array set command. The format is the same as that returned for Type Assignments and TEXTUAL-CONVENTIONs.
-table
Returns the name of the conceptual table OBJECT-TYPE associated with the specified object (i.e., the second parent of a column or first parent of a conceptual row).
-uniquedecl
Returns a list corresponding to the column objects called out by the UNIQUENESS field of a COPS-PR-SPPI (PIB) OBJECT-TYPE. If no UNIQUENESS columns are listed, an empty list is returned. No other related objects will be queried.
-uniqueness
Returns the list of column objects specified by the UNIQUENESS field of a COPS-PR-SPPI (PIB) OBJECT-TYPE. If the object has no UNIQUENESS defined, the UNIQUENESS field for its parent, child, or augmented table is returned as appropriate. This allows the UNIQUENESS list to be obtained from a column or table object directly, rather than having to query the row definition specifically. If no UNIQUENESS columns are listed, an empty list is returned.
-units
Returns the text corresponding to the UNITS field of the OBJECT-TYPE record.
-value
Equivalent to -oid for get operations.
-valuedecl
Returns the "as-declared" OID value for the record, in dot-delimited notation. If the first component is specified using module.descriptor form it is returned as module:descriptor. That is, SNMPv2-MIB:system.1 will be returned if the OID value is declared in the ASN.1 it as { SNMPv2-MIB.system 1 }.
  1. Up to Table of Contents