NET: Standardize naming of all protocal header lengths

This commit is contained in:
Gregory Nutt
2014-07-05 13:04:48 -06:00
parent c2fc299332
commit c5fc24e110
38 changed files with 127 additions and 128 deletions
+3 -3
View File
@@ -61,7 +61,7 @@
* Pre-processor Definitions
****************************************************************************/
#define IGMPBUF ((struct igmp_iphdr_s *)&dev->d_buf[NET_LLH_LEN])
#define IGMPBUF ((struct igmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
/****************************************************************************
* Private Functions
@@ -124,7 +124,7 @@ void igmp_input(struct net_driver_s *dev)
/* Verify the message length */
if (dev->d_len < NET_LLH_LEN+UIP_IPIGMPH_LEN)
if (dev->d_len < NET_LL_HDRLEN+IPIGMP_HDRLEN)
{
IGMP_STATINCR(g_netstats.igmp.length_errors);
nlldbg("Length error\n");
@@ -133,7 +133,7 @@ void igmp_input(struct net_driver_s *dev)
/* Calculate and check the IGMP checksum */
if (net_chksum((uint16_t*)&IGMPBUF->type, UIP_IGMPH_LEN) != 0)
if (net_chksum((uint16_t*)&IGMPBUF->type, IGMP_HDRLEN) != 0)
{
IGMP_STATINCR(g_netstats.igmp.chksum_errors);
nlldbg("Checksum error\n");