Zhouhuai Shen wrote:
> Hi all,
> 
> Is it possible to set the layer 3 source IP address for a trap packet to 
> a certain interface on the device, other than the outgoing interface?
> 
> I have tried to set the member localname of the netsnmp_session data 
> structure to the desired interface address in the function 
> send_trap_to_sess() in agent_trap.c, but it doesn't work. The localname 
> in the function is null, I suppose the source interface for the trap 
> packet will be filled up later on.
> 
> Can anyone please give me some help?

You can use '[snmp] clientaddr' option to set source address of UDP 
packet with the trap and with patch [1] you can use 'v1trapaddress' 
option to set address of the agent sent inside the trap.

[1]: 
http://sourceforge.net/tracker/index.php?func=detail&aid=1916840&group_id=12694&atid=312694

Jan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to