[AGENT++] Agent Address V1 trap

Cristian Saavedra cristianpsg at gmail.com
Fri Nov 1 19:51:34 CET 2013


Hi,

I'm trying to change the originator agent Ipaddress to a desired one.

I'm setting the value on the pdu with the following

UdpAddress add("192.168.1.20");
pdu.set_v1_trap_address(add);

It seems the library is taking the change however when I check the trap
source is still saying the localhost IpAddress
There is no way to assign the V1 ipAddress to the from address?

$ ./snmpTraps localhost -v1 -P10162
SNMP++ Trap to localhost SNMPV1 Community=public
20131101.18:47:17: 21713: (7)INFO   : SNMPMessage: Setting v1 trap address:
(192.168.1.20)
20131101.18:47:17: 21713: (4)DEBUG  : SNMPMessage: return value for build
message: (0)
SNMP++ Trap Send Status = Success


$ ./receive_trap
Trying to register for traps on port 10162.
Waiting for traps/informs...
press return to stop
20131101.18:48:25: 22011: (4)DEBUG  : SNMPMessage: Trap address of received
v1 trap: (192.168.1.20)
reason: -7
msg: SNMP++: Received SNMP Notification (trap or inform)
from: 127.0.0.1/48547
ID:  1.3.6.1.6.3.1.1.5.1
Type:164
Oid: 1.3.6.1.4.1.11.2.16.2
Val: SNMP++ Trap Send Test





Best Regards,
Cristian Saavedra


More information about the AGENTPP mailing list