Remove use of NET_LL_HDRLEN from net/arp logic. Use ETH_HDRLEN instead
This commit is contained in:
parent
25a9005ce7
commit
25d787ff12
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue