[Top][All Lists]

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

[lwip-users] netif setup for IPv6 traffic (static /128 address assignmen

From: josephjah
Subject: [lwip-users] netif setup for IPv6 traffic (static /128 address assignment)
Date: Tue, 24 Jul 2018 23:01:15 -0700 (MST)

Hello, I'm trying to assign a static /128 address to a netif but I think I'm
doing something wrong. I'm using 2.0.3 (also tested latest mater). I can see
packets are being correctly received but when ethip6_output() is called it
can't seem to find the proper interface to send out on. I've stepped through
the code for a bit and it seems like it can't get what it needs from the ND6
module, almost as if there are no destination cache/hints. Does my
initialization code look sane? Do I need to set additional flags or enable a
module of some sort? Thanks in advance guys.

// For instance, I want to assign: fde4:da74:55b2:b9ee:6a99:930f:26b9:2df0

static ip6_addr_t ipaddr;
memcpy(&(ipaddr.addr), ip.rawIpData(), sizeof(ipaddr.addr));
lwipdev->mtu = MY_MTU;
lwipdev->name[0] = 'l';
lwipdev->name[1] = '0'+lwipInterfacesCount;
lwipdev->hwaddr_len = 6;
lwipdev->linkoutput = lwip_eth_tx;
lwipdev->ip6_autoconfig_enabled = 1;
mac.copyTo(lwipdev->hwaddr, lwipdev->hwaddr_len);
netif_add(lwipdev, NULL, NULL, NULL, NULL, tapif_init, ethernet_input);
lwipdev->state = this;
netif_create_ip6_linklocal_address(lwipdev, 1);
s8_t idx = 1;
netif_add_ip6_address(lwipdev, &ipaddr, &idx);
netif_ip6_addr_set_state(lwipdev, 1, IP6_ADDR_TENTATIVE);
lwipdev->output_ip6 = ethip6_output;

Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

reply via email to

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