On Wed, 2005-05-18 at 10:19 -0400, Bellino, Phil wrote:
> Hello,
> I have an IPv6 application that needs to be told when the 2.6.11 kernel has
> accepted a router announcement prefix and has inserted that address into the
> appropriate interface.  This application will then set up and do the
> necessary binds to set up the tcp/ssh listen addresses correctly. 
>  
> Is there any code in place in the kernel that an application can key on to
> know when a new IPv6 address has been accepted from  the router or if a user
> has issued the "ip -6 addr add" or "ip -6 addr del" command?

In linux you can use the netlink(3) interface. Take a peek at Quagga for
some example code. Btw this is the generic interface, thus it also works
when eg the kernel/user/bgp/whatever adds those routes, thus is not 'ip'
dependent etc.

But... why don't you simply listen on :: with your application ?
That is getaddrinfo() without hints and a nice loop as per Eva's
great document which can be found at:
http://gsyc.escet.urjc.es/~eva/IPv6-web/ipv6.html 

Greets,
 Jeroen

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to