blank.gif (43 bytes)

Church Of The
Swimming Elephant

dns | icmp | ietf | ined | inet | job | map | mib | netdb | ntp | snmp | sunrpc | syslog | term | udp

snmp getnext vbl [script]

The snmp# getnext session command retrieves the values of the lexicographical successors to the objects named in varbind list vbl. 

If the getnext session command contains a callback script, then the command sends the get-next-request and returns immediately. 

The result is the request id for the asynchronous request. The getnext session command is processed synchronously if the callback script is absent. In this case, the received varbind list is returned. 

The command fails with a Tcl error if the agent does not respond or if a protocol error happens.

To retrieve the whole MIB tree, you can use the result of a getnext command as an argument for the next get-next command. Below is a synchronous version that walks a complete MIB tree:

set vbl 1.3
while {! [catch {$s getnext $vbl} vbl]} {
    puts $vbl

The asynchronous version of this script requires you to define a procedure which calls itself asynchronously:

proc walk {s vbl err} {
  if {$err == “noError”} {
    puts $vbl
    $s getnext $vbl {walk “%S” “%V” “%E”}

$s getnext 1.3 { walk “%S” “%V” “%E” }



Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

Have you gone to church today?
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609