Re: [tkined] Can scotty support SNMPv2-trap

From: Van Trinh (van.trinh@sun.com)
Date: Fri Jun 16 2000 - 17:06:41 MET DST


Juergen Schoenwaelder writes:
>
> >>>>> Van Trinh writes:
>
> Van> Could someone tell me if scotty supports SNMPv2-trap and if so
> Van> how do i enable it, it seems that the default is SNMPv1-trap and
> Van> that's all it does? My scotty version is 2.1.10.
>
> Configure your session to use SNMPv2c:
>
> set s [snmp session -version SNMPv2c]
> $s trap coldStart {}
>
> [You can't use snmpV2-trap with SNMPv1.]
>

Thanks for the advice. I knew how to achieve that from the command line.

I didn't make it clear from my post that from the command line but my
question is when user invokes trap sink via "SNMP Monitor menu" from the
tkined tool, it doesn't offer the same flexibility.

I spend some time digging around last night and came up with this
workaround:

Make global snmp_protocol visible in TrapSink procedure (found in
snmp_monitor.tcl) like this (see diff -cw below) then it can be
controlled via "Set SNMP Parameter" option.

*** /home/vtrinh/scotty/scotty-2.1.10/tkined/apps/snmp_monitor.tcl Thu Jun 15 18:03:34 2000
--- /home/vtrinh/scotty/scotty-2.1.10/tkined/apps/snmp_monitor_org.tcl Mon Jun 29 11:35:06 1998
***************
*** 590,599 ****
  }
  
  proc TrapSink {args} {
- global snmp_protocol
      static ts
      if {![info exists ts]} {
! set ts [snmp session -version $snmp_protocol]
      }
      switch $args {
          "" {
--- 590,598 ----
  }
  
  proc TrapSink {args} {
      static ts
      if {![info exists ts]} {
! set ts [snmp session -port 162]
      }
      switch $args {
          "" {
***************
*** 618,626 ****
  }
  
  proc "Trap Sink" {list} {
- global snmp_protocol
      set res [ined request "Listen for SNMP trap messages?" \
! [list [list $snmp_protocol: [TrapSink] radio listen ignore]] "accept cancel"]
      if {[lindex $res 0] == "cancel"} return
      TrapSink [lindex $res 1]
  }
--- 617,624 ----
  }
  
  proc "Trap Sink" {list} {
      set res [ined request "Listen for SNMP trap messages?" \
! [list [list SNMPv1: [TrapSink] radio listen ignore]] "accept cancel"]
      if {[lindex $res 0] == "cancel"} return
      TrapSink [lindex $res 1]
  }

> /js
>
> --
> Juergen Schoenwaelder Technical University Braunschweig
> <schoenw@ibr.cs.tu-bs.de> Dept. Operating Systems & Computer Networks
> Phone: +49 531 391 3289 Bueltenweg 74/75, 38106 Braunschweig, Germany
> Fax: +49 531 391 5936 <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>
>
>

-- 
Van
--
!! 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:46 MET