lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initializat


From: josephjah
Subject: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)
Date: Mon, 26 Sep 2016 09:10:11 -0700 (MST)

Hello everyone!

I've got a few questions about IPv6 support. 

First, I've decided to try to use 2.0.0 RC2 for IPv6 support (is this
wise?).

Second, I've got a few questions about how to properly initialize an
interface for IPv6. I have experience working with lwip 1.4.1 in IPv4 mode
with no problem. However, I've spent a while trying to piece together clues
for IPv6 but I can't seem to find much in the way of documentation or
examples. Maybe you guys can send me in the right direction.

Here's my initialization code (modeled loosely after how I'd do things in
IPv4 mode).

static ip6_addr_t addr6;
IP6_ADDR2(&addr6, 0xfd56, 0x5799, 0xd8f6, 0x1238, 0x8c99, 0x93b4, 0x9d8e,
0x24f6);

ip_2_ip6(&interface6.ip6_addr[0])->addr[0] = addr6.addr[0];                     
ip_2_ip6(&interface6.ip6_addr[0])->addr[1] = addr6.addr[1];                     
ip_2_ip6(&interface6.ip6_addr[0])->addr[2] = addr6.addr[2];                     
ip_2_ip6(&interface6.ip6_addr[0])->addr[3] = addr6.addr[3];                     

netif_ip6_addr_set_state(&interface6, 0, IP6_ADDR_TENTATIVE); 
netif_add(&interface6, NULL, tapif_init, ethernet_input);

interface6.state = this;
interface6.output_ip6 = _etharp_output;
interface6.mtu = _mtu;
interface6.name[0] = 't';
interface6.name[1] = 'p';
interface6.hwaddr_len = 6;
_mac.copyTo(interface6.hwaddr, interface.hwaddr_len);
netif_set_default(&interface6);
netif_set_up(&interface6);


where IP6_ADDR2 is a macro I took and renamed from lwIP 1.4.1, which for
some reason is removed from lwIP 2.0.0?

So, in short, this initialization code is faulty/incorrect in some way but I
can't figure out how. Any suggestions?

Thanks in advance!
        



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



reply via email to

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