lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initial


From: Dirk Ziegelmeier
Subject: Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)
Date: Thu, 29 Sep 2016 22:00:02 +0200

Just saw one more thing: netif_create_ip6_linklocal_address() only works AFTER copying the MAC to netif->hwaddr.


Ciao
Dirk

--
Dirk Ziegelmeier * address@hidden * http://www.ziegelmeier.net

On Thu, Sep 29, 2016 at 8:35 PM, josephjah <address@hidden> wrote:
Dirk, thank you. This was a big help and worked perfectly.

Just for future reference in case anyone else comes across the thread, my
netif initialization code ended up taking the form:

IP6_ADDR2(&addr6, a, b, c, d, e, f, g, h);
interface6.mtu = _mtu;
interface6.name[0] = 't';
interface6.name[1] = 'p';
interface6.hwaddr_len = 6;
interface6.linkoutput = low_level_output;
interface6.ip6_autoconfig_enabled = 1;

netif_create_ip6_linklocal_address(&interface6, 1);
netif_add(&interface6, NULL, tapif_init, ethernet_input);
netif_set_default(&interface6);
netif_set_up(&interface6);

netif_ip6_addr_set_state(&interface6, 1, IP6_ADDR_TENTATIVE);
_mac.copyTo(interface6.hwaddr, interface6.hwaddr_len);
ip6_addr_copy(ip_2_ip6(interface6.ip6_addr[1]), addr6);

interface6.output_ip6 = ethip6_output;
interface6.state = this;
interface6.flags = NETIF_FLAG_LINK_UP | NETIF_FLAG_UP;



--
View this message in context: http://lwip.100.n7.nabble.com/lwIP-2-0-0-IPv6-Support-specifically-interface-initialization-tp27397p27444.html
Sent from the lwip-users mailing list archive at Nabble.com.

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]