MIB Walker Reference

Links
MIBWalker (top
level object)
Provides methods to load an existing MIB Walk Database, to navigate
SNMP walk files, to retrieve SNMP variables from an agent, to set the
values of SNMP objects.
The top level object to access the SNMP MIB Walker is called "UnbrowseSNMP.MIBWalker"
Creating the top level object
|
VBScript
Set
Walker
= CreateObject("UnbrowseSNMP.MIBWalker")
|
Ruby
walker = WIN32OLE.New("UnbrowseSNMP.MIBWalker") |
Events
None
Properties and Methods
| Name |
Parameters |
Access |
Description |
| NewWalker |
MIBWalkSession object -
return value |
NA |
Create a new MIB Walk Session |
OpenWalkSession
|
String - Path Name |
NA |
Open the MIB Walk database file specified.
Note: Unbrowse SNMP stores each MIB walk session in a database file
with the file extension *.VOWLK |
Save
|
None |
NA |
Save changes to the MIB walk database |
| SaveAs |
String - Path Name |
NA |
Save changes to the MIB walk database into the file
specified |
| Discard |
None |
NA |
Discard all changes made to the MIB walk database file |
| WalkerCount |
Numeric |
Read |
Return the number of MIB Walk Session in the database |
GetWalkerByIndex
|
Numeric - Index
MIBWalkSession object - return value |
NA |
Return the MIBWalkSession object identified by the index |
| GetLatestWalker |
MIBWalkSession object -
return value |
NA |
Return the latest MIBWalkSession |
MIBWalkSession
Provides access to MIB Walking facilities. Allows you to retrieve and
set SNMP objects in a real snmp agent such as
routers, switches, servers, etc.
Events
| Event Name |
Parameters |
Description |
| WNF_GetLimit |
Numeric |
Indicates progress of retreiving scalar variables.
The number of nodes retrieved is returned in the event parameters. |
| WNF_GetComplete |
None |
Indicates completion of scalar varibles.
All scalar variables have been retrieved from the agent. |
| WNF_WalkLimit |
MIBWalkNode - the table object
Numeric - table leaf
Numeric - number of indexes retrieved |
Indicates progress of table retrieval |
| WNF_WalkComplete |
MIBWalkNode - the table node object |
Indicates completion of table retrieval |
| WNF_EOW |
|
Indicates succesful end of MIB Walking |
| WNF_Error |
Numeric - error code
String - error text |
Indicates premature end of MIB Walking due to error
The numeric error code is for Unleash Networks debugging purposes. |
Properties and Methods
| Name |
Parameters |
Access |
Description |
| Name |
String |
Read
Write |
An optional name attached to this MIBWalkSession. |
| StartTime |
Numeric |
Read |
Start time in seconds since Jan 1 1970 |
| GetWalkTree |
MIBWalkTree object -
Return value |
Read |
Return the MIBWalkTree.
A MIBWalkTree is a collection of SNMP Nodes that were retrieved from
the agent. |
| Status |
Numeric |
Read |
A number representing the status of the MIBWalkSession.
See the VSnWStatus enumeration for a list of all valid status codes |
| DoWalk |
|
NA |
Retrieve requested SNMP objects from the agent.
This method does not return until the operation is complete. |
| DoWalk_Thr |
|
NA |
Retrieve requested SNMP objects from the agent. Use
events to notify progress.
This method fires events to notify your script of progress. |
| DoBulkWalk_Thr |
|
NA |
Same as DoWalk_Thr, but uses SNMP GETBULK operations. |
| SetAgent |
SnmpAgent object |
NA |
Set the target agent |
| GetAgent |
SnmpAgent object - return
value |
NA |
Retrieve the target agent |
| Cancel |
|
NA |
Cancel the SNMP retrieval operation in progress |
| GetResults |
MIBWalkResults object -
Return value |
Read |
Return the MIBWalkResults object associated with this
walk session.
You must use the MIBWalkResults object to navigate the OIDs and Values
retrieved from the agent. |
MaxRepetitions
|
Numeric |
Read
Write |
Max repetitions for GETBULK |
NumRepeaters
|
Numeric |
Read
Write |
Num repeaters for GETBULK |
| TryMaxPacking |
Bool |
Read
Write |
Try to pack as many OIDs in a PDU as you can |
| PerformReachTest |
Bool |
Read
Write |
Perform a simple reachability test by retrieving
sysUpTime before trying to walk the agent MIB. |
| DoSet |
MIBWalkNode - node
String - index in OID format
String - value |
NA |
Perform a SNMP Set on a MIBWalkNode |
DoBulkSet
|
Array of Indexes
Array of MIBWalkNodes
Array of Values |
NA |
This is a bulk version of the DoSet method |
| DoSet_SMI |
SnmpAgent object
A MIBNode object
An Index string
A Value string |
NA |
Set the value of the specified node.
Use MIBNode object instead of MIBWalkNode object. Hence the SMI
qualifier in the method name. |
| DoBulkSet_SMI |
SnmpAgent object
String - an index
Array of MIBNode objects
Array of Value strings |
NA |
Set operation using MIBNode objects instead of
MIBWalkNode objects. |
MIBWalkResults
Provides methods to navigate the results of a MIB walk.
Events
None
Properties and Methods
| Name |
Parameters |
Access |
Description |
| TotalRetrieved |
Numeric |
Read |
Total number of objects retrieved from the agent |
| ScalarsRetrieved |
Numeric |
Read |
Total number of scaler objects (non indexed) retrieved |
| StartTime |
Numeric |
Read |
Start time in seconds since Jan 1, 1970 |
| ElapsedTime |
Numeric |
Read |
Total time taken to retrieve the objects in seconds. |
| GetWalkTree |
MIBWalkTree object -
Return value |
Read |
Returns the MIBWalkTree object |
MIBWalkTree
Provides methods to navigate the nodes in a MIBWalk
Events
None
Properties and Methods
| Name |
Parameters |
Access |
Description |
| AddSmiNode |
MIBNode object |
NA |
Add this MIB node to the list of nodes you want to
retrieve from the agent. |
| AddSmiNodes |
Array of MIBNode objects |
NA |
Add these MIB nodes to the list of nodes you wish to
retrieve from the agent |
| ChildCount |
Numeric |
Read |
The number of children of this walk tree. This
represents the
immediate children only. You have to navigate the methods in the
MIBWalkNode objects to look deeper. |
| ChildByIdx |
Numeric - Index
MIBWalkNode object - return value |
NA |
Return the child node at the specified index |
MIBWalkNode
Properties and values of a single SNMP node. You can also
navigate the MIB tree from each node by following
the child nodes.
Events
None
Properties and Methods
| Name |
Parameters |
Access |
Description |
| Name |
String |
Read |
Name property |
| OIDName |
String |
Read |
OIDName property |
| OID |
String |
Read |
OID |
| ModuleName |
String |
Read |
Name of the defining MIB module |
| BaseType |
Numeric - see the BaseType
enum |
Read |
The SMI base type of the node.
See the BaseType enumeration for a list of valid values. |
| TableVarbindCount |
Numeric |
Read |
Number of valid rows (indexes) retrieved |
| TableVarbindByIdx |
Varbind object - return
value |
|
Get the varbind at the specified index. The valid
ranges are 0 to TableVarbindCount -1 |
| HasScalarVarbind |
Bool |
Read |
Was a valid scalar varbind retrieved from the agent for
this node ? |
| ScalarVarbind |
Varbind object - return
value |
Read |
Return the scalar varbind |
| FirstChild |
MIBWalkNode object -
return value |
NA |
Returns the first child of this MIBNode.
Example :
Set tableEntry = TblNode.FirstChild |
| ChildCount |
Numeric |
Read |
Returns the total number of immediate children |
| ChildByIdx |
Numeric - Index value
MIBWalkNode object - return value |
NA |
Returns the immediate child identified by the index |
| Typename |
String |
NA |
Typename property |
| Units |
String |
NA |
Units property |
| WNodeType |
Numeric - see WalkNodeType
enum |
NA |
The node type.
See the WalkNodeType enum for a list of valid node types |
Varbind
A simple variable binding. A varbind is an association
of an OID with a value.
Events
None
Properties and Methods
| Name |
Parameters |
Access |
Description |
| OID |
String |
Read |
The OID of the varbind. For table resuts, this is the
index part of the OID.
|
| Value |
String |
Read |
The value |
Enumerations
WalkStatus Enumeration
typedef enum {
VSNW_STATUS_IDLE
= 0,
VSNW_STATUS_INPROGRESS =
1,
VSNW_STATUS_OK
= 2,
VSNW_STATUS_FAIL
= 3,
VSNW_STATUS_USERCANCEL =
4,
VSNW_STATUS_FREEZE
= 5,
VSNW_STATUS_ENABLE =
6,
VSNW_STATUS_DISABLE
= 7,
} VSnWStatus;
WalkNodeType enumeration
typedef enum {
VSNW_NODETYPE_LEAF_SCALAR
= 0,
VSNW_NODETYPE_LEAF_VECTOR
= 1,
VSNW_NODETYPE_TABLE
= 2,
VSNW_NODETYPE_TABLE_ENTRY
= 3,
VSNW_NODETYPE_LEAF_VECTOR_INDEX =
4,
} VSnWNodeType;
|
|
|