Re: SNMP create event

Juergen Schoenwaelder (schoenw@gaertner.de)
Wed, 30 Jul 1997 00:10:16 +0200

Heiko Boch <boch@lrc.di.epfl.ch> said:

Heiko> I have problems with the create event of a Scotty SNMP agent.
Heiko> As far as I understand from the manual page, a script bound
Heiko> to a SNMP create event is being executed when a manager tries
Heiko> to access a non-existing MIB variable instance. In order to
Heiko> process such a request, the agent script bound to the create
Heiko> event has to create a new instance by using "$snmp instance".

Heiko> First, am I right so far?

Mostly. Scotty currently automatically creates a Tcl array variable
for the new instance, which is called like the object type and indexed
by the instance identifiert. This is not really very flexible, but I
never got around to change this behaviour.

Heiko> Second, I never get a create event. For example does the
Heiko> test agent given below never print the create me message
Heiko> when I issue the following request:

Heiko> snmp alias snmpOpt [ list -address $address \
Heiko> -port $port -community $community -version SNMPv1 ]
Heiko> set s [ snmp session -alias snmpOpt ]
Heiko> $s set [ list [ list sysDescr.0 "Heiko's test system" ] ]

Heiko> Am I missing something?

Yes, two things: First, scotty automatically creates an instance
sysDescr.0 and hence your set will modify the sysDescr.0 variable and
not create a new one. Second, sysDescr is read-only so setting it or
even creating it won't work anyway.
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.