(usagi-users 03355) Re: IPv6 kerenl mechanism
Jeroen Massar <[email protected]>
| Newsgroups | gmane.linux.ipv6.usagi.users,gmane.network.ipv6.general |
|---|---|
| Organization | Unfix |
| Message-ID | <[email protected]> |
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
signature.asc
(application/pgp-signature, 240 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Jeroen Massar / http://unfix.org/~jeroen/ iD4DBQBCjEBDKaooUjM+fCMRAitPAKCJQNNGkZfsE/1cXA0+j20rlCkpVACWKpJv TKRuN+bhwX4xtvVm92tkGQ== =fzXc -----END PGP SIGNATURE-----