[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #42998] The netif hardware adddress length need to be
From: |
任海波 |
Subject: |
[lwip-devel] [bug #42998] The netif hardware adddress length need to be changed. |
Date: |
Sat, 16 Aug 2014 06:11:31 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; QQBrowser/7.7.24962.400) |
URL:
<http://savannah.nongnu.org/bugs/?42998>
Summary: The netif hardware adddress length need to be
changed.
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: hichard
Submitted on: Sat Aug 16 06:11:30 2014
Category: None
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: CVS Head
_______________________________________________________
Details:
Hello:
I have used lwip IPv6 for a long time. I find some problem which strongly
recommended to make modification.
Some code in the file netif.h as follow:
/** must be the maximum of all used hardware address lengths
across all types of interfaces in use */
#define NETIF_MAX_HWADDR_LEN 6U
This macro definition may be defined in the file opt.h and lwipopts.h.
Why? Recently, I use lwip IPv6 to IEEE 802.15.4. In Ieee 802.15.4, the MAC
Address is 8 byte length. First, I try to use the 802.15.4 as Virtual
Ethernet, But it can't comuniticate with contiki. Contiki is a OS for IEEE
802.15.4 using for 6lowpan. This is because Neighbor discovery protocol not
compatible.
Modification the NETIF_MAX_HWADDR_LEN for a configurition can let lwip to
support ieee 802.15.4.
The follow code in the file nd6.h.
PACK_STRUCT_BEGIN
struct lladdr_option {
PACK_STRUCT_FIELD(u8_t type);
PACK_STRUCT_FIELD(u8_t length);
PACK_STRUCT_FIELD(u8_t addr[NETIF_MAX_HWADDR_LEN]);
} PACK_STRUCT_STRUCT;
PACK_STRUCT_END
#ifdef PACK_STRUCT_USE_INCLUDES
# include "arch/epstruct.h"
#endif
The code in nd6.c which is relevant to struct lladdr_option also need to be
changed. Because the length in struct lladdr_option may be variable.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?42998>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #42998] The netif hardware adddress length need to be changed.,
任海波 <=