Re: getifaddrs() and IPv6 link-local addresses
Simon Perreault <[email protected]> Fri, 31 Aug 2012 09:15:00 -0400
| Newsgroups | gmane.os.openbsd.ipv6 |
|---|---|
| Message-ID | <[email protected]> |
Le 2012-08-31 03:34, Tomek Mrugalski a =E9crit : > If you decide that for some reason you do not want to fix this, I think it's pretty clear that something has to be fixed. I'm wondering why FreeBSD doesn't have the same issues. Looking at the=20 code I can't figure it out. > What's the recommended API a userland application (dhcpv6 client) shoul= d > use for adding/updating lifetimes/removing IPv6 addresses on an > interface? It's all ioctls. add: SIOCAIFADDR_IN6 remove: SIOCDIFADDR_IN6 update lifetime: SIOCSIFALIFETIME_IN6 Check out ifconfig.c for examples. http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/ifconfig/ifconfig.c > How about the same for configuring prefixes? Not sure what you mean. The SIOCAIFADDR_IN6 ioctl takes a struct=20 in6_aliasreq argument, which has a prefix mask member. Simon