44 #if LWIP_IPV6 && LWIP_ETHERNET 57 #define ETHTYPE_IPV6 0x86DD 60 #ifdef PACK_STRUCT_USE_INCLUDES 68 #ifdef PACK_STRUCT_USE_INCLUDES 73 #ifdef PACK_STRUCT_USE_INCLUDES 86 #ifdef PACK_STRUCT_USE_INCLUDES 90 #define SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE) 103 ethip6_send(
struct netif *
netif,
struct pbuf *p,
struct eth_addr *src,
struct eth_addr *dst)
105 struct eth_hdr *ethhdr = (
struct eth_hdr *)p->
payload;
107 LWIP_ASSERT(
"netif->hwaddr_len must be 6 for ethip6!",
109 SMEMCPY(ðhdr->dest, dst, 6);
111 ethhdr->type =
PP_HTONS(ETHTYPE_IPV6);
136 ethip6_output(
struct netif *netif,
struct pbuf *q,
const ip6_addr_t *ip6addr)
138 struct eth_addr dest;
145 (
"etharp_output: could not allocate room for header.\n"));
150 if (ip6_addr_ismulticast(ip6addr)) {
154 dest.addr[2] = ((
const u8_t *)(&(ip6addr->addr[3])))[0];
155 dest.addr[3] = ((
const u8_t *)(&(ip6addr->addr[3])))[1];
156 dest.addr[4] = ((
const u8_t *)(&(ip6addr->addr[3])))[2];
157 dest.addr[5] = ((
const u8_t *)(&(ip6addr->addr[3])))[3];
160 return ethip6_send(netif, q, (
struct eth_addr*)(netif->
hwaddr), &dest);
166 i = nd6_get_next_hop_entry(ip6addr, netif);
173 if (neighbor_cache[i].state == ND6_STALE) {
175 neighbor_cache[i].state = ND6_DELAY;
179 if ((neighbor_cache[i].state == ND6_REACHABLE) ||
180 (neighbor_cache[i].state == ND6_DELAY) ||
181 (neighbor_cache[i].state == ND6_PROBE)) {
184 SMEMCPY(dest.addr, neighbor_cache[i].lladdr, 6);
185 return ethip6_send(netif, q, (
struct eth_addr*)(netif->
hwaddr), &dest);
190 return nd6_queue_packet(i, q);
#define LWIP_DBG_LEVEL_SERIOUS
#define PACK_STRUCT_STRUCT
u8_t hwaddr[NETIF_MAX_HWADDR_LEN]
u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment)
#define PACK_STRUCT_FLD_8(x)
#define SMEMCPY(dst, src, len)
#define PACK_STRUCT_FIELD(x)
netif_linkoutput_fn linkoutput
#define LWIP_ASSERT(message, assertion)
#define PACK_STRUCT_FLD_S(x)
#define PACK_STRUCT_BEGIN
#define LWIP_ND6_DELAY_FIRST_PROBE_TIME
#define LWIP_DEBUGF(debug, message)