Re: Changing originator IP in trap/inform

This is a discussion on Re: Changing originator IP in trap/inform within the SNMP Coders forums, part of the Networking and Network Related category; On Wed, Jul 19, 2006 at 03:04:09PM +0100, Dave Shield wrote: > On 19/07/06, santhosh.sundarasamy@...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-19-2006
Magnus Fromreide
 
Posts: n/a
Default Re: Changing originator IP in trap/inform

On Wed, Jul 19, 2006 at 03:04:09PM +0100, Dave Shield wrote:
> On 19/07/06, santhosh.sundarasamy@wipro.com
> <santhosh.sundarasamy@wipro.com> wrote:
> > I have notification originator application, which uses Net-SNMP APIs
> > and runs as a separate process (not part of snmpd).

>
> Presumably this runs as an AgentX subagent - yes?
>
> > Net-SNMP APIs assigns the local IP address as the source IP. I am
> > trying to assign a different IP address as source IP by assigning a
> > different IP address for the variable 'localname' in snmp_session structure.
> > But this didn't work.
> >
> > Is there a way to change the source IP in the PDU before notification
> > originator sends the trap/inform?

>
> Which API are you using to generate the trap? In particular, are you
> using SNMPv1 or SNMPv2 syntax? If the latter, try appending a
> 'snmpTrapAddress' varbind to the payload list, with the address you
> want to use. I'm not sure whether that will do the trick or not, but
> it's worth a try.


It could work, there is sadly a misalignment in the code so if you have the
functions that converts from v2-notification to v1-trap and back and calls
them like:

res = v2tov1(v1tov2(v2tov1(v1tov2(inputV1))));

then res != inputV1.

Additionally, snmpd is wery keen on replacing the source address so it might
be that you loose anyway.

/MF

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:12 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0