Hello,
I am working to support IPv6 in our current code which is running IPv4 on lwip. We are using a raw api approach.
Following is how I did network interface initialization for IPv6. Plz guide me if anything is missing here and if possible provide any reference of it.
ip_addr_t ip;
ipaddr_aton(str, &ip); //str is IP address string it may be ipv4 or ipv6
if(IP_IS_V6(&ip)) //for IPv6
{
netif_create_ip6_linklocal_address(netif, 1); // create link local address from MAC
netif_ip6_addr_set(netif, 1, ip_2_ip6(&ip));
netif_ip6_addr_set_state(netif, 0, IP6_ADDR_TENTATIVE);
netif_ip6_addr_set_state(netif, 1, IP6_ADDR_PREFERRED);
netif_set_up(netif);
return;
}
Thanks in advance!