| < Prev | Back to Table of Contents | Next > |
The following table provides a basic mapping of Scotty MIB database related commands to MIB Smithy SDK. The information may be helpful as a starting point for migrating legacy scripts to use MIB Smithy SDK's native APIs for quering MIB module properties.
| Querying the MAX-/MIN-/ACCESS Property | |
|---|---|
| Scotty 2.0 | mib ?-exact? access label |
% mib access sysDescr |
|
| Scotty 3.0 | Tnm::mib ?-exact? access label |
% Tnm::mib access sysDescr |
|
| MIB Smithy SDK | $db get ?-exact? -access label |
% smilib get -access sysDescr |
|
| Getting a list of children in OID space | |
| Scotty 2.0 | mib ?-exact? successor label |
% mib successor system |
|
| Scotty 3.0 | Tnm::mib children label |
% Tnm::mib children system |
|
| MIB Smithy SDK | $db get ?-exact? -subnodes
label |
% smilib get -subnodes system |
|
| Comparing OID Values | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib compare oid1 oid2 |
% Tnm::mib compare 1.3.6.1 1.3.6.2 |
|
| MIB Smithy SDK | $db oidcmp ?options? oid1
oid2 |
% smilib oidcmp 1.3.6.1 1.3.6.2 |
|
| Querying the DEFVAL Property | |
| Scotty 2.0 | mib ?-exact? defval label |
% mib defval ifRcvAddressType
(zero-length string returned) |
|
| Scotty 3.0 | Tnm::mib ?-exact? defval label |
% Tnm::mib defval ifRcvAddressType |
|
| MIB Smithy SDK | $db get ?-exact? -defval label |
% smilib get -defval ifRcvAddressType |
|
| Querying the DESCRIPTION Property | |
| Scotty 2.0 | mib ?-exact? description label |
% mib description sysDescrA textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software. |
|
| Scotty 3.0 | Tnm::mib description label |
% Tnm::mib description sysDescrA textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software. |
|
| MIB Smithy SDK | $db get ?-exact? -description
label |
% smilib get -descr sysDescrA textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software. |
|
| Querying the DISPLAY-HINT Property | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib ?-exact? displayhint
label |
% Tnm::mib displayhint DisplayString |
|
| MIB Smithy SDK | $db get ?-exact? -format label |
% smilib get -format DisplayString |
|
| Querying the Enumerations List of the SYNTAX Property | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib enums type ?varName? |
% mib enums ifType |
|
| MIB Smithy SDK | smilib get ?-exact? -enums
label |
% smilib get -enums ifType |
|
| Determining if a Record is Defined | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib exists label |
% mib exists system |
|
| MIB Smithy SDK | $db is defined label |
% smilib is defined system |
|
| Determining the MIB File for a Record | |
| Scotty 2.0 | mib ?-exact? file label |
% mib file system |
|
| Scotty 3.0 | Tnm::mib file label |
% Tnm::mib file system |
|
| MIB Smithy SDK | $db get -filename fileHandle |
% set fullName [smilib get -fullname system] |
|
| Formatting Data Using DISPLAY-HINT | |
| Scotty 2.0 | mib ?-exact? format name value |
| Scotty 3.0 | Tnm::mib format name value |
| MIB Smithy SDK | $db format ?-nocomplain? name
value |
% smilib format RowStatus 6 |
|
| Querying the INDEX Property | |
| Scotty 2.0 | mib ?-exact? index label |
% mib index sysORTable |
|
| Scotty 3.0 | Tnm::mib index label |
% Tnm::mib index sysORTable |
|
| MIB Smithy SDK | $db get ?-exact? -index label |
% smilib get -index sysORTable |
|
| Querying Constants (e.g. macro names) | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib info subject ?pattern? |
| MIB Smithy SDK | Not Supported |
| Determining a Record's Label (Descriptor) | |
| Scotty 2.0 | mib ?-exact? name oid |
% mib name 1.3.6.1.2.1.1.1 |
|
| Scotty 3.0 | Tnm::mib label oid |
% Tnm::mib label 1.3.6.1.2.1.1.1 |
|
| MIB Smithy SDK | smilib get ?-exact? -name oid |
% smilib get -name 1.3.6.1.2.1.1.1 |
|
| Determining OID Length | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib length label |
% Tnm::mib length system |
|
| MIB Smithy SDK | llength [split [$db get -fulloid label]
.] |
% llength [split [$db get -fulloid system] .] |
|
| Loading MIB Files | |
| Scotty 2.0 | mib load filename |
% mib load IANAifType-MIB.mib |
|
| Scotty 3.0 | Tnm::mib load filename |
% Tnm::mib load IANAifType-MIB.mib |
|
| MIB Smithy SDK | $db import -file filename |
% smilib import -file IANAifType-MIB.mib |
|
| Determining Record Type/Macro | |
| Scotty 2.0 | mib ?-exact? macro label |
% mib macro sysDescr |
|
| Scotty 3.0 | Tnm::mib macro label |
% Tnm::mib macro sysDescr |
|
| MIB Smithy SDK | $db whatis label |
% smilib whatis sysDescr |
|
| Determining Group Members | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib member label |
% Tnm::mib member systemGroup |
|
| MIB Smithy SDK | $db get -members label |
% smilib get -members systemGroup sysDescr
sysObjectID sysUpTime sysContact sysName sysLocation
sysServices sysORLastChange sysORID sysORUpTime
sysORDescr |
|
| Determining a Record's Parent Module | |
| Scotty 2.0 | mib ?-exact? module label |
% mib module system |
|
| Scotty 3.0 | Tnm::mib module label |
% Tnm::mib module system |
|
| MIB Smithy SDK | lindex [split [smilib get -container
label] !] 1 |
% lindex [split [smilib get -container system] !]
1 |
|
| Determining a Record's OID Value | |
| Scotty 2.0 | mib ?-exact? oid label |
% mib oid system |
|
| Scotty 3.0 | Tnm::mib oid label |
% Tnm::mib oid system |
|
| MIB Smithy SDK | $db get -fulloid label |
% smilib get -fulloid system |
|
| purpose | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib pack oid value ?value
...? |
example |
|
| MIB Smithy SDK | Not Supported |
| Determining an OID's Parent Record | |
| Scotty 2.0 | mib ?-exact? parent label |
% mib parent sysDescr |
|
| Scotty 3.0 | Tnm::mib parent label |
% Tnm::mib parent sysDescr |
|
| MIB Smithy SDK | set fulloid [$db get ?-exact? -fulloid
label] |
% set fulloid [smilib get -fulloid sysDescr] |
|
| Querying the Size/Range of the SYNTAX Property | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib range label |
% mib size sysDescr |
|
| MIB Smithy SDK | $db get ?-exact? -range $db get
?-exact? -size |
% smilib get -size sysDescr |
|
| Scanning DISPLAY-HINT Formatted Values | |
| Scotty 2.0 | mib ?-exact? scan name value |
example |
|
| Scotty 3.0 | Tnm::mib scan nodeOrType value |
example |
|
| MIB Smithy SDK | Not Supported (scanning is not possible in all cases) |
| Querying the STATUS Property | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib status label |
% Tnm::mib status sysDescr |
|
| MIB Smithy SDK | $db get -status label |
% smilib get -status sysDescr |
|
| OID Prefix Comparison | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib subtree oid1 oid2 |
% Tnm::mib subtree system sysDescr |
|
| MIB Smithy SDK | $db oidcmp -subtree parent
child |
% smilib oidcmp -subtree system sysDescr |
|
| Querying the SYNTAX Property | |
| Scotty 2.0 | mib ?-exact? syntax label |
% mib syntax sysDescr |
|
| Scotty 3.0 | Tnm::mib syntax label |
% Tnm::mib syntax sysDescr |
|
| MIB Smithy SDK | $db get -syntax label |
% smilib get -syntax sysDescr |
|
| Querying TEXTUAL-CONVENTION Details for OBJECT-TYPEs | |
| Scotty 2.0 | mib ?-exact? tc label |
% mib tc sysDescr |
|
| Scotty 3.0 | Not Supported |
| MIB Smithy SDK | Not Supported |
| Decoding INDEX Values from OIDs | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib unpack oid |
% Tnm::mib unpack sysORDescr.6 |
|
| MIB Smithy SDK | $db get -indexparts oid |
% smilib get -indexparts sysORDescr.6 |
|
| Determining Notification Members | |
| Scotty 2.0 | Not Supported |
| Scotty 3.0 | Tnm::mib variables label |
% Tnm::mib variables linkUp |
|
| MIB Smithy SDK | $db get -members label |
% smilib get -members linkUp |
|
| Walking a Subtree | |
| Scotty 2.0 | mib ?-exact? walk varName label
command |
% mib walk x sysORTable { puts $x } |
|
| Scotty 3.0 | Tnm::mib ?-exact? walk varName label
command |
% Tnm::mib walk x sysORTable { puts $x } |
|
| MIB Smithy SDK | Not Supported |
| < Prev | Back to Table of Contents | Next > |