I have a simple Scotty script to receive traps. If I send a trap from my
machine (using HP's SNMP++ command line program), it shows correct IP
address. But when I receive traps from my embedded agent, the FromIPAddress
shows up as 127.0.0.1. If I use a commercial Trap browser to see the traps
received from the aagent, I get correct IP address of the agent.
Also a side question. If I have 2 network cards in my machine, how do I tell
Scotty to listen for traps one of them? The address option is not there for
snmp listener.
Any help?
vishi
**********************************************
proc OpenSnmp {} {
set snmpId [snmp listener -port 162]
return $snmpId
}
proc CloseSnmp {SnmpId} {
$SnmpId destroy
}
proc TrapCallBack {result} {
set fromIpAddr [lindex $result 0]
puts "Trap Received from $fromIpAddr"
}
set snmpId [OpenSnmp]
set cb "TrapCallBack {%A {%V}}"
set result [$snmpId bind trap $cb]
vwait forever
-- !! 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 : Thu Jan 03 2002 - 14:56:26 MET