[AGENT++] How to set local ip address?
Jochen Katz
katz at agentpp.com
Thu Dec 1 23:07:43 CET 2005
Hi,
> I use Snmp::trap method to send snmptrap to a server, and the origin host
> have two interfaces, lan0 and lan1.
> But the server will receive the trap from "10.70.11.84". How can I specify
> the source ip address of snmptrap?
Snmp::trap() uses the already open socket of the Snmp object to send the
trap. if you listen on "0.0.0.0", the OS selects the "best" source
address automatically.
If you want to have the specific source address, you have to create a
temporary Snmp object with this address.
Regards,
Jochen
More information about the AGENTPP
mailing list