[tkined] SNMP Community defaults

From: Robert Dahlem (Robert.Dahlem@ffm2.siemens.de)
Date: Wed Oct 04 2000 - 13:32:18 MET DST


Hi,

There is a problem with scotty 2.1.10 concerning the community name
defaults:

In /usr/lib/tkined1.4.10/tkined.defaults I can add entries like:

    snmp.community.HOSTNAME: SNMPCOMM

with HOSTNAME being the name or IP address of a host and COMMNAME
being the community name.

In /usr/lib/tkined1.4.10/apps/library.tcl is a procedure SnmpOpen with
some code dealing with the default communities.

Unfortunately this code does things in an order I consider wrong: It
first sets default community names from tkined.defaults and after that
it overwrites the community names according to the SNMP protocol
version used.

I propose the following patch to cure that problem:

--- library.tcl.orig Wed Oct 4 12:22:41 2000
+++ library.tcl Wed Oct 4 12:22:51 2000
@@ -973,9 +973,6 @@
            -window $snmp_window -delay $snmp_delay \
            -version $protocol]

- if {[info exists default(community.$ip)]} {
- $s configure -community $default(community.$ip)
- }
     if {[info exists default(port.$ip)]} {
        $s configure -port $default(port.$ip)
     }
@@ -995,6 +992,9 @@
            ined acknowledge "Unsuppoted version \"$protocol\" for $id
\[$ip\]"
            return
        }
+ }
+ if {[info exists default(community.$ip)]} {
+ $s configure -community $default(community.$ip)
     }

     if {[info exists default(timeout.$ip)]} {

Regards,
        Robert

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



This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:54 MET