[Q] wait on snmp walk?

Robert Seeger (Robert_Seeger@BayNetworks.COM)
Fri, 20 Jun 1997 16:46:36 -0400

I'm trying to find a way to have a command executed when an snmp walk is
completed. For example, I want to be able to 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>

Ie, 'snmp walk' is called asynchronously. Then, when it is finished
'doNextThing' is called. However, while the walk is being done, other code
can be processed. I know there is an snmp wait command, I just don't know if
it can do what I want it to do. Can anyone tell me if this can be done and,
if so, how? I don't have much in the way of sample code, which is my usual
method for learning how to do things.

In addition, I have a question unrelated to scotty. Does anyone know if
there is a way to put a function on the event queue? I want to be able to
have a function that takes care of a queue of information. Whenever
information get's handed to the queue, I want to add an event to the
'event queue' to run another function that will process whatever is on the
stack. For example:

>proc addQueue item {
> global theQueue
>
> lappend theQueue $item
> addevent checkQueue
>}

Thus, when the program gets a chance, it will call the function checkQueue
to handle any data it contains. I'm sure it can be done, I just don't have
any idea how.

Thanks in advance,
Robert Seeger


========================================
Robert Seeger
Network Engineer
Bay Networks

Tel: (518) 237-2087
Pager: (800) SKY-8888 Pin#1264792
Fax: (518) 237-2593
Email: rseeger@baynetworks.com
Address: 224 5th Ave
Lansingburgh, NY 12180
========================================

--
!! 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.