lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] oxff==0x60 condition do not match for received IP6 pack


From: Ivan Delamer
Subject: Re: [lwip-users] oxff==0x60 condition do not match for received IP6 packet in tcipip_thread
Date: Tue, 11 Nov 2014 10:12:18 -0700

You need to check where p->payload is pointing at.

The first nibble of the first byte of an IPv6 packet is "6" which specifies that it is an IPv6 (and not IPv4) packet.

If that value is not 6 then there is a problem with the packet format.

Check to see if it is still pointing at the Ethernet header.

In that case, make sure you have defined LWIP_ETHERNET and that your netif has either NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET or both.

Then it will go through ARP or ND6 protocol first.

Cheers
Ivan


Date: Tue, 11 Nov 2014 05:40:13 -0700 (MST)
From: mfkexpress <address@hidden>
To: address@hidden
Subject: [lwip-users] oxff==0x60 condition do not match for received
        IP6 packet in tcipip_thread
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii

Hi,

I'm using lan9221 card in my device and trying to implement IPv6 in it.

I can see that IPv6 packets are received on my device but ip6_input() is not being called in tcpip_thread() because following condition do not satisfy in
my case:

#if LWIP_ETHERNET
      if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP |
NETIF_FLAG_ETHERNET)) {
        ethernet_input(msg->msg.inp.p, msg->msg.inp.netif);
      } else
#endif /* LWIP_ETHERNET */
#if LWIP_IPV6
if ((*((unsigned char *)(msg->msg.inp.p->payload)) & *0xf0) == 0x60)*
{
          ip6_input(msg->msg.inp.p, msg->msg.inp.netif);
      } else
#endif /* LWIP_IPV6 */
      {
        ip_input(msg->msg.inp.p, msg->msg.inp.netif);
      }

Can anyone please tell me why this condition do not match though my input
packets are IPv6 only and thay contains field "60" also.

Any help would be greatly appreciated.

Thanks & regards,
Mohsin




reply via email to

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