tkined-1.3.3 and scotty-2.0.0 (trying to keep my promise)

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Sat, 12 Aug 1995 00:20:08 +0200

Hi!

I have moved tkined-1.3.3 and scotty-2.0.0 on our ftp server. I will
upload a copy to the Tcl/Tk archive ftp.aud.alcatel.com soon. These
are the `official' Tcl7.4 and Tk4.0 based versions and I will not fix
any bugs in older versions.

ftp://ftp.ibr.cs.tu-bs.de/pub/local/tkined/tkined-1.3.3.tar.gz
ftp://ftp.ibr.cs.tu-bs.de/pub/local/tkined/scotty-2.0.0.tar.gz

Tkined-1.3.3 does not add any new functionality. I only tried to fix
the most serious bugs that were introduced while moving to Tk4.0.
Scotty-2.0.0 has some new features and some incompatible changes
relative to scotty-1.99.6:

o The mibtree script in the examples directory is now a stand-alone MIB
browser. I like it, perhaps you will do too.

o There is a SNMP configuration mechanism which allows to define aliases
for SNMP session parameters. Lets look at an example:

snmp alias read "-community public"
snmp alias write "-community private"

snmp alias gate/read "-address 1.2.3.4 -alias read"
snmp alias gate/write "-address 1.2.3.4 -alias write"

These alias definitions are read from one of the startup files
(e.g. ~/.scottyrc or /usr/local/lib/scotty/site/init.tcl) and you
can use them like

snmp session -alias gate/read

to create a session handle. Note, you can change the write community
for all hosts just by changing the write alias definition. This can
be used to build very flexible SNMP configurations and is needed to
handle SNMPv2 parameters in a reasonable way.

Tkined scripts will honor the "SNMP alias" attribute. You can set this
attribute e.g. to "gate/read" and the SNMP scripts will pick up the
right SNMP session.

o There is support for the SNMPv2 USEC proposal currently discussed in
the SNMPv2 working group. I hope that this one will replace the party
based SNMPv2 configuration model, but we will have to wait what the
working group decides. If you don't know what I am talking about,
please just ignore this stuff.

o The safe Tcl extension is included in the scotty sources. This will
allow to write SNMP agents that can safely execute scripts send to
them over the network. Use the --with-stcl configure option and read
the man pages in the stcl0.2 directory.

o The SNMP binding mechanism has changed. Lets first look at the manager
side of SNMP:

$s bind "" recv {puts "received %T from %A:%P"}
$s bind "" send {puts "sending %T to %A:%P"}

These two commands create bindings that are evaluated whenever a
valid SNMP packet is received or send using the session handle $s.
Trap bindings are done in the same way:

$s bind "" trap {puts "oouch"}

The scotty agent uses the same syntax (that's why there is the ""
argument above). Note, scripts bound to an instance are also bound
to a session handle. This change requires usually to rewrite some
parts of agent scripts. This change was necessary to make use of
the safe Tcl extension. An example:

set i [interp create -safe]
set a [snmp session -port 1701 -agent $i]

$a bind "" begin {puts "beginning to process %T request %R"}
$a bind "" end {puts "processing of %T request %R done"}

This example creates a safe Tcl interpreter and a SNMP agent session
that will use this safe interpreter to evaluate call-backs. The begin
and end bindings are evaluated before and after a complete SNMP
request has been processed. Instance specific bindings are created
as usual:

$a bind mib-2 get {puts "%T request"}

Note that a save Tcl interpreter does not have a puts command. So
will have to define an alias like:

$i alias puts puts stderr

o The SNMP code is now re-organized and I also removed a set of malloc()
free() calls which makes SNMP processing faster on machines that have
slow memory management in their libc. There are also some stronger
checks for incoming SNMP messages. Previous versions did accept nearly
everything, which was not good for obvious security reasons.

Puh. Thats all for now. I am sure I missed some important things and
of course I did not tell you about all the new bugs. :-)

Juergen