summaryrefslogtreecommitdiff
path: root/nuttx/net/devif
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-14 16:10:38 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-14 16:10:38 -0600
commiteac10c055d6b7a6f5ed825186f736ea8a840cbf6 (patch)
treee82cff258dd2a61632d2bdb04087ece64f22371b /nuttx/net/devif
parenta9ccb8c85c22dbbc63deda648ac0e539d854e81a (diff)
downloadpx4-nuttx-eac10c055d6b7a6f5ed825186f736ea8a840cbf6.tar.gz
px4-nuttx-eac10c055d6b7a6f5ed825186f736ea8a840cbf6.tar.bz2
px4-nuttx-eac10c055d6b7a6f5ed825186f736ea8a840cbf6.zip
Networking: (1) Copied all ICMP sources files to net/icmpv6 with proper renaming and removal of IPv4 logic, (2) remove IPv6 logic from files in net/icmp, (3) copied include/nuttx/icmp.h to icmpv6.h and removed IPv4 specific logic, (4) removed all IPv6 logic from icmp.h, (5) IP_HDRLEN became IPv4_HDRLEN and IPv6_HDRLEN, (6) ip_chksum() became ipv4_chksum() and ipv6_chksum(), and (7) added partial support for ICMPv6 statistics.
Diffstat (limited to 'nuttx/net/devif')
-rw-r--r--nuttx/net/devif/devif_input.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/net/devif/devif_input.c b/nuttx/net/devif/devif_input.c
index afdbd52af..b9673057b 100644
--- a/nuttx/net/devif/devif_input.c
+++ b/nuttx/net/devif/devif_input.c
@@ -167,7 +167,7 @@ static uint8_t devif_reassembly(void)
if (!g_reassembly_timer)
{
- memcpy(g_reassembly_buffer, &pbuf->vhl, IP_HDRLEN);
+ memcpy(g_reassembly_buffer, &pbuf->vhl, IPv4_HDRLEN);
g_reassembly_timer = CONFIG_NET_TCP_REASS_MAXAGE;
g_reassembly_flags = 0;
@@ -200,7 +200,7 @@ static uint8_t devif_reassembly(void)
/* Copy the fragment into the reassembly buffer, at the right offset. */
- memcpy(&g_reassembly_buffer[IP_HDRLEN + offset], (char *)pbuf + (int)((pbuf->vhl & 0x0f) * 4), len);
+ memcpy(&g_reassembly_buffer[IPv4_HDRLEN + offset], (char *)pbuf + (int)((pbuf->vhl & 0x0f) * 4), len);
/* Update the bitmap. */
@@ -282,7 +282,7 @@ static uint8_t devif_reassembly(void)
pbuf->len[0] = g_reassembly_len >> 8;
pbuf->len[1] = g_reassembly_len & 0xff;
pbuf->ipchksum = 0;
- pbuf->ipchksum = ~(ip_chksum(dev));
+ pbuf->ipchksum = ~(ipv4_chksum(dev));
return g_reassembly_len;
}
@@ -372,7 +372,7 @@ int devif_input(FAR struct net_driver_s *dev)
* the size of the IPv6 header (40 bytes).
*/
- iplen = (pbuf->len[0] << 8) + pbuf->len[1] + IP_HDRLEN;
+ iplen = (pbuf->len[0] << 8) + pbuf->len[1] + IPv6_HDRLEN;
#else
iplen = (pbuf->len[0] << 8) + pbuf->len[1];
#endif /* CONFIG_NET_IPv6 */
@@ -496,7 +496,7 @@ int devif_input(FAR struct net_driver_s *dev)
}
#ifndef CONFIG_NET_IPv6
- if (ip_chksum(dev) != 0xffff)
+ if (ipv4_chksum(dev) != 0xffff)
{
/* Compute and check the IP header checksum. */