Re: [Q] wait on snmp walk?

Juergen Schoenwaelder (schoenw@gaertner.de)
Sat, 21 Jun 1997 19:56:50 +0200

Robert_Seeger@BayNetworks.COM (Robert Seeger) said:

Robert> I'm trying to find a way to have a command executed when an
Robert> snmp walk is completed. For example, I want to be able to
Robert> write code like this:

>set sess [snmp session -address 1.2.3.4]
>$sess walk x ipAdEntAddr "printfFunc $x"
>wait $sess "doNextThing $sess"
>puts "Working . . ."
><more code>

Robert> Ie, 'snmp walk' is called asynchronously. Then, when it is
Robert> finished 'doNextThing' is called. However, while the walk is
Robert> being done, other code can be processed.

The `walk' command does not work asynchronously. It is a synchronous
getnext/getbulk loop and you can't process other events inside. Well,
you can process events by calling `update' in the body of the loop.
But you have to be careful and you should fully understand the
implications of doing nested events. An asynchronous version of the
walk command is on the TODO list, but it is not likely that it will
happen soon. You can however write a simple Tcl-only solution with the
getnext command yourself.

Robert> In addition, I have a question unrelated to scotty. Does
Robert> anyone know if there is a way to put a function on the event
Robert> queue?

Please read the after(n) and the fileevent(n) Tcl man pages. The Tnm
extension provides a command for operations that should be done
regularly. Read the job(n) man page for details.
Juergen

-- 
Juergen Schoenwaelder     <schoenw@gaertner.de>     (Tel: +49-531-23873-0)
Gaertner Datensysteme, Hamburger Strasse 273a, 38114 Braunschweig, Germany
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.