Networking: Final detangle off IPv4 and IPv6 TCP/UDP send logic. The Networking subsystem now compiles with IPv6 enabled

This commit is contained in:
Gregory Nutt
2015-01-18 08:56:05 -06:00
parent ea52bda8f9
commit f7663ef0ab
18 changed files with 637 additions and 382 deletions
+5 -5
View File
@@ -104,8 +104,8 @@
/* Macros */
#define BUF ((FAR struct net_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
#define FBUF ((FAR struct net_iphdr_s *)&g_reassembly_buffer[0])
#define BUF ((FAR struct ipv4_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
#define FBUF ((FAR struct ipv4_hdr_s *)&g_reassembly_buffer[0])
/* IP fragment re-assembly */
@@ -151,8 +151,8 @@ static uint8_t g_reassembly_flags;
#if defined(CONFIG_NET_TCP_REASSEMBLY) && !defined(CONFIG_NET_IPv6)
static uint8_t devif_reassembly(void)
{
FAR struct net_iphdr_s *pbuf = BUF;
FAR struct net_iphdr_s *pfbuf = FBUF;
FAR struct ipv4_hdr_s *pbuf = BUF;
FAR struct ipv4_hdr_s *pfbuf = FBUF;
uint16_t offset;
uint16_t len;
uint16_t i;
@@ -311,7 +311,7 @@ nullreturn:
int ipv4_input(FAR struct net_driver_s *dev)
{
FAR struct net_iphdr_s *pbuf = BUF;
FAR struct ipv4_hdr_s *pbuf = BUF;
uint16_t iplen;
/* This is where the input processing starts. */
+2 -2
View File
@@ -104,7 +104,7 @@
/* Macros */
#define BUF ((FAR struct net_ipv6hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
#define BUF ((FAR struct ipv6_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
/****************************************************************************
* Public Data
@@ -139,7 +139,7 @@
int ipv6_input(FAR struct net_driver_s *dev)
{
FAR struct net_ipv6hdr_s *pbuf = BUF;
FAR struct ipv6_hdr_s *pbuf = BUF;
uint16_t iplen;
/* This is where the input processing starts. */