Some minor clean-up of IPv4/6 flags

This commit is contained in:
Gregory Nutt
2015-01-24 07:29:43 -06:00
parent a19bec3be1
commit 96a53254dd
7 changed files with 56 additions and 18 deletions
+11 -3
View File
@@ -85,6 +85,8 @@
#include <debug.h>
#include <string.h>
#include <net/if.h>
#include <nuttx/net/netconfig.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
@@ -220,7 +222,9 @@ static uint8_t devif_reassembly(void)
{
g_reassembly_bitmap[i] = 0xff;
}
g_reassembly_bitmap[(offset + len) / (8 * 8)] |= ~g_bitmap_bits[((offset + len) / 8 ) & 7];
g_reassembly_bitmap[(offset + len) / (8 * 8)] |=
~g_bitmap_bits[((offset + len) / 8 ) & 7];
}
/* If this fragment has the More Fragments flag set to zero, we know that
@@ -450,10 +454,14 @@ int ipv4_input(FAR struct net_driver_s *dev)
goto drop;
}
/* Everything looks good so far. Now process the incoming packet
* according to the protocol.
/* Make sure that all packet processing logic knows that there is an IPv4
* packet in the device buffer.
*/
IFF_SET_IPv4(dev->d_flags);
/* Now process the incoming packet according to the protocol. */
switch (pbuf->proto)
{
#ifdef CONFIG_NET_TCP
+8 -2
View File
@@ -85,6 +85,8 @@
#include <debug.h>
#include <string.h>
#include <net/if.h>
#include <nuttx/net/netconfig.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
@@ -249,10 +251,14 @@ int ipv6_input(FAR struct net_driver_s *dev)
}
}
/* Everything looks good so far. Now process the incoming packet
* according to the protocol.
/* Make sure that all packet processing logic knows that there is an IPv6
* packet in the device buffer.
*/
IFF_SET_IPv6(dev->d_flags);
/* Now process the incoming packet according to the protocol. */
switch (ipv6->proto)
{
#ifdef CONFIG_NET_TCP