Home
You are not currently signed in.

MIB Smithy

  1. Up to Table of Contents

Determining Record Types

Given a search string, in particular an OID, it is often useful to determine what type of record it corresponds to. This information is available by way of the whatis database subcommand. The SDK also provides an API to perform the reverse action (seeing whether or not a record is of a specified type) using the is subcommand. See Built-in Pattern Matching for details.

Syntax:

% dbcmd whatis recordName

Where:

dbcmd
is the name of the database; and
recordName
is a record search string (name, OID, or combination of such) identifying the record in question.

Returns:

  • The return value generally corresponds to the name of the macro used to define the record in normal SMI syntax:
capability
AGENT-CAPABILITIES Statement.
compliance
MODULE-COMPLIANCE Statement.
conformance-group
GROUP reference within MODULE-COMPLIANCE module reference.
conformance-module
MODULE or SUPPORTS module reference ("conformance module") within an AGENT-CAPABILITIES or MODULE-COMPLIANCE statement.
file
File Record.
leaf
OBJECT-TYPE definition (including tables/rows).
module
MIB Module.
moduleid
MODULE-IDENTITY Statement.
node
OID Value Assignment or OBJECT-IDENTITY (see note).
notification
NOTIFICATION-TYPE or TRAP-TYPE definition.
notify-group
NOTIFICATION-GROUP definition.
object-group
OBJECT-GROUP definition.
typedef
ASN.1 Type Assignment or TEXTUAL-CONVENTION.
undefined
No record exists with the given search pattern.
valuedef
ASN.1 Value Assignment (see note).
variation
OBJECT or VARIATION reference within an MODULE-COMPLIANCE or AGENT-CAPABILITIES module reference.

See Also

Notes

ASN.1 value assignments of types other than OBJECT IDENTIFIER are forbidden by the SMI. The SDK treats OID value assignments as indistinguishable from OBJECT-IDENTITY statements without descriptions (although, strictly speaking, OBJECT-IDENTITY "registers" an OID while an OID value assignment does not according to the SMI rules). Therefore, when a module is loaded from file, this command will return "node" for OID value assignments as well as for OBJECT-IDENTITY statement. As well, the "node" record type should be used when creating either from Tcl.
  1. Up to Table of Contents