et/icmpv6: Remove the coupling between ICMPv6 and Ethernet by moving all Ethernet stuff to neighbor_ethernet_out.c and make the mac address as first field.

This commit is contained in:
Xiang Xiao
2018-11-09 15:41:23 -06:00
committed by Gregory Nutt
parent a3cda3867b
commit 4f25b83f8f
12 changed files with 60 additions and 275 deletions
+2 -2
View File
@@ -128,8 +128,8 @@
* layer address taking into account a header of the two-bytes.
*/
#define ICMPv6_OPT_SIZE(a) (((a) + 2 + 7) & ~7)
#define ICMPv6_OPT_OCTECTS(a) (((a) + 2 + 7) >> 3)
#define ICMPv6_OPT_SIZE(a) ((a) > 0 ? ((a) + 2 + 7) & ~7 : 0)
#define ICMPv6_OPT_OCTECTS(a) ((a) > 0 ? ((a) + 2 + 7) >> 3 : 0)
/****************************************************************************
* Public Type Definitions
+1 -5
View File
@@ -212,8 +212,8 @@ struct netdev_maxaddr_s
struct netdev_varaddr_s
{
uint8_t nv_addrlen;
uint8_t nv_addr[RADIO_MAX_ADDRLEN];
uint8_t nv_addrlen;
};
#endif
@@ -255,9 +255,6 @@ struct net_driver_s
uint16_t d_pktsize; /* Maximum packet size */
#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_NET_6LOWPAN) || \
defined(CONFIG_NET_BLUETOOTH) || defined(CONFIG_NET_IEEE802154)
/* Link layer address */
union
@@ -275,7 +272,6 @@ struct net_driver_s
struct netdev_varaddr_s radio;
#endif
} d_mac;
#endif /* CONFIG_NET_ETHERNET || CONFIG_NET_6LOWPAN ... || CONFIG_NET_IEEE802154 */
/* Network identity */
+1 -1
View File
@@ -103,8 +103,8 @@
struct pktradio_addr_s
{
uint8_t pa_addrlen; /* Length of the following address */
uint8_t pa_addr[RADIO_MAX_ADDRLEN];
uint8_t pa_addrlen; /* Length of the following address */
};
/* Different packet radios may have different properties. If there are