[AGENT++] Multiple agent

Jochen Katz katz at agentpp.com
Tue Aug 10 21:44:31 CEST 2004


Hi,

> Now I would like to run the same agent multiple times on the same machine
> attached to different IP addresses.
> All is fine on the receive part, trouble begins with sending traps: even
> after modifying the code in order to send traps from sockets
> bound to different interfaces the traps appears to come always from the same
> ip address.

which method are you using to send traps? If you use the
NotificationOriginator, the traps will have the address of the interface
that is used to send the trap as source address.

> Did I do something wrong ?
> Is it a limitation that comes from the network layer ? How can it be
> overcome ?

1) You can use the Snmp::trap() member function directly. You just have
to create the Snmp object with the address of the desired interface.

2) If all of the used IP addresses are valid for sending traps to the
agents, you could change the NotificationOriginator class to use the
socket of the Snmpx object of the RequestList [the one that is set using
reqList->set_snmp(&snmp) in main()].

Regards,
  Jochen



More information about the AGENTPP mailing list