Hi Magnus,

Thanks for the input.
Will get back to you after testing .

Thanks
Giridhar
-----Original Message-----
From: Magnus Fromreide [mailto:ma...@lysator.liu.se] 
Sent: Saturday, March 02, 2013 3:33 AM
To: AR, Giridhar
Cc: net-snmp-coders@lists.sourceforge.net
Subject: Re: IPV6 netsnmp_transport_open_server

On Thu, 2013-02-28 at 08:29 +0000, AR, Giridhar wrote:
> Hello,
>  
> We are not able to receive traps on ipv6 address in my application.
> Our application is not able to open the Traplistener on IPv6 on Suse 
> SLES 11, Redhat 5.6 and Windows Server 2008 R2.
> We have set the preferred address as IPV6. Port 162 is not getting 
> banded to IPV6 address.
>  
> The think the  following netsnmp code is having problem
>  
> /* open the trap_session */
> SOCK_STARTUP;
> transport = netsnmp_transport_open_server("snmptrap", "udp:162");

The above line says "Start listening on UDP IPv4 port 162". I think that might 
be the reason it fails to listen to IPv6.

Now, you are not entierly clear about wether this is our or your code that 
tries to listen for snmp traps.

If it is our code then your options are:

* Tell it to listen for udp6 addresses - give it the argument "udp6".
* Change the default port and not tell it to listen for anything special
  The way to change the default is to add
    defDomain snmptrap udp6
  to the relevant config file.

If it is your code then you have other options

/* open the trap_session */
SOCK_STARTUP;
/* change the default domain for snmptrap */ 
netsnmp_register_default_domain("snmptrap", "udp6"); transport = 
netsnmp_transport_open_server("snmptrap", NULL);

or you could just tell it to open the default port for the snmptrap application 
using the udp6 domain:

/* open the trap_session */
SOCK_STARTUP;
transport = netsnmp_transport_open_server("snmptrap", "udp6");

or, if you just want to open that udp6 port and ignore the librarys frantic 
efforts to help you:

/* open the trap_session */
SOCK_STARTUP;
transport = netsnmp_transport_open_server("snmptrap", "udp6:162");

/MF

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to