From: Carlos Zampar on
Hi,

I want to listen the trap and send this trap to another plataform. At
first time and search in web I try this:
-------------------------------------------
require 'snmp'

m = SNMP::TrapListener.new(:Host => '10.10.5.114',:Port => 162,
:Community => 'public',:MaxReceiveBytes => 18000) do |manager|
manager.on_trap_default { |trap| p trap


SNMP::Manager.open(:Host => '10.10.5.56',:TrapPort => 2017,:Version =>
:SNMPv1,:MaxReceiveBytes => 18000) do |snmp|
snmp.trap_v1(
"enterprises.9",
"10.10.5.56", #example I want put the trap data here
:enterpriseSpecific,
42,
12345)
#[VarBind.new("1.3.6.1.2.3.4", Integer.new(1))])
end

}
end
m.join
-------------------------------------------------------------------------------

My question is how to put the trap data listened to send snmp trap like
a original trap. I try to search for examples in web but I don't find a
good example for this use.

Thanks in advance. Carlos.
--
Posted via http://www.ruby-forum.com/.