I am assigning ipv6 address using ioctl() system call prgramtically. I want to know if there is a way, i can find the assigned ip is tentative/duplicate ?
Thanks.
I am assigning ipv6 address using ioctl() system call prgramtically. I want to know if there is a way, i can find the assigned ip is tentative/duplicate ?
Thanks.
Host: Enumerate the interfaces with getifaddrs()
.
(edit) Looks like you need to call sysctl(NET_IPV6_OPT_DAD_ENABLE)
before getifaddrs()
?
http://lwn.net/Articles/218597/
Network: Send an ICMP ping is the typical but not fool proof method that DHCP servers use.
It is assumed if you are setting the IP then you are implementing a form of DHCP and you control all the addresses for that segment. Otherwise just use the link-local scope already unique addresses.
You can read TENTATIVE flag of IPv6 Address as below:
Indicates flags that are set on the multicast address. As of RFC 2373, the only flag defined is the Transient (T) flag. The T flag uses the low-order bit of the Flags field.
* If 0, the multicast address is a permanently assigned, well-known multicast address allocated by the Internet Assigned Numbers Authority (IANA).
* If 1, the multicast address is a not permanently assigned, or transient.