blank.gif (43 bytes)

Church Of The
Swimming Elephant

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

snmp# set vbl [script]

The snmp# set session command can be used to create and modify MIB instances. The varbind list vbl for set-requests must contain at least the object identifier and the new value as described above. 

If the set session command contains a callback script, then the command sends the set-request and returns immediately. The result is the request id for the asynchronous request. 

The set 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.

Below is a synchronous example that shows how you can change the sysContact.0 and sysLocation.0 variables of the system group.
 

set vbl [list \
  [list SNMPv2-MIB!sysContact.0 “Bert Nase”]\
  [list SNMPv2-MIB!sysLocation.0 “Hall6, Floor 5”]\
]
set err [catch {$s set $vbl} vbl]
if {$err == 1} {
  exit 1
}

Note that it is always recommended to use the Tcl list command to build the varbind list. This makes sure that quoting is done in the correct way. The asynchronous version of the command looks as follows:

set vbl [list \
  [list SNMPv2-MIB!sysContact.0 “Bert Nase”]\
  [list SNMPv2-MIB!sysLocation.0 “Hall6, Floor 5”]\
]
$s set $vbl {
  if {”%E” != “noError”} {
    exit 1
  }
}

 

 

Cotse.Net

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

 
.
www.cotse.com
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 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

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