Re: [tkined] Wish list for scotty

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Sat, 4 Jul 1998 20:07:54 +0200

>>>>> Vincent Qing Yin writes:

Vincent> I wish the following feature could be added to scotty in the
Vincent> future...

[snip]

Vincent> The binding to non-leaf node is currently evaluated _after_
Vincent> the leaf node. I'd like to see a binding that's evaluated
Vincent> _before_ the leaf node is reached, even if the leaf node
Vincent> doesn't exist. That is, I'd like the traversal of the mib
Vincent> tree to evaluate scripts on its way down as well as on its
Vincent> way up.

Vincent> Let's call it `bindbefore'. So the Tcl script will read
Vincent> snmp0 bindbefore tcpConnTable get { # Try to find tcp
Vincent> connection based on %o and %i # then... %S instance
Vincent> tcpConnState.%o $currState }

Vincent> That way, by the time the mib tree traversal reaches the leaf
Vincent> node, the new row will have been inserted into the
Vincent> tcpConnTable. And we refreshed only the portion of the table
Vincent> that's actually requested in the GET.

I agree that there should be better "hooks" in order to update the
instances before the processing of a get/getnext request starts. But I
am not so sure what the future of all this might be in the light of
AgentX. It would be necessary to define the mechanism in such a way
that it could be used to export MIB information via AgentX.

Vincent> If there's a good way to achieve similar result in the
Vincent> current version of scotty, I'd love to learn about it for my
Vincent> project.

You can bind a script to a begin event which takes place whenever the
processing of an SNMP request starts. You can look into the varbind
list and determine yourself whether you have to update instances or
not. It is not as nice as a special binding, but you should be able to
do what you want with a few lines of Tcl code.
Juergen

Juergen Schoenwaelder schoenw@ibr.cs.tu-bs.de http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, 38106 Braunschweig, Germany. (Tel. +49 531 / 391 3283)

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