Remove use of NET_LL_HDRLEN from net/arp logic. Use ETH_HDRLEN instead

This commit is contained in:
Gregory Nutt 2014-11-15 09:13:50 -06:00
parent 25a9005ce7
commit 25d787ff12
4 changed files with 9 additions and 9 deletions

View File

@ -60,7 +60,7 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN])
/****************************************************************************
* Private Types
@ -106,7 +106,7 @@ void arp_arpin(FAR struct net_driver_s *dev)
FAR struct arp_hdr_s *parp = ARPBUF;
in_addr_t ipaddr;
if (dev->d_len < (sizeof(struct arp_hdr_s) + NET_LL_HDRLEN))
if (dev->d_len < (sizeof(struct arp_hdr_s) + ETH_HDRLEN))
{
nlldbg("Too small\n");
dev->d_len = 0;
@ -146,7 +146,7 @@ void arp_arpin(FAR struct net_driver_s *dev)
arp_dump(parp);
peth->type = HTONS(ETHTYPE_ARP);
dev->d_len = sizeof(struct arp_hdr_s) + NET_LL_HDRLEN;
dev->d_len = sizeof(struct arp_hdr_s) + ETH_HDRLEN;
}
break;

View File

@ -60,7 +60,7 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN])
/****************************************************************************
* Private Types
@ -115,7 +115,7 @@ void arp_format(FAR struct net_driver_s *dev, in_addr_t ipaddr)
arp->ah_protolen = 4;
eth->type = HTONS(ETHTYPE_ARP);
dev->d_len = sizeof(struct arp_hdr_s) + NET_LL_HDRLEN;
dev->d_len = sizeof(struct arp_hdr_s) + ETH_HDRLEN;
}
#endif /* CONFIG_NET_ARP */

View File

@ -57,7 +57,7 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[ETH_HDRLEN])
/****************************************************************************
* Private Types

View File

@ -58,8 +58,8 @@
****************************************************************************/
#define ETHBUF ((struct eth_hdr_s *)&dev->d_buf[0])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define ARPBUF ((struct arp_hdr_s *)&dev->d_buf[ETH_HDRLEN])
#define IPBUF ((struct arp_iphdr_s *)&dev->d_buf[ETH_HDRLEN])
/****************************************************************************
* Private Types
@ -247,7 +247,7 @@ void arp_out(FAR struct net_driver_s *dev)
memcpy(peth->src, dev->d_mac.ether_addr_octet, ETHER_ADDR_LEN);
peth->type = HTONS(ETHTYPE_IP);
dev->d_len += NET_LL_HDRLEN;
dev->d_len += ETH_HDRLEN;
}
#endif /* CONFIG_NET_ARP */