Network: All logic will now handle varialbe length link layer protocol headers within incoming packets. This permits use of multiple network interfaces with differing data links. For example, ETHERNET + SLIP

This commit is contained in:
Gregory Nutt
2014-11-15 13:13:23 -06:00
parent 5d05b00fda
commit 2e55db369d
28 changed files with 144 additions and 90 deletions
+1 -1
View File
@@ -66,7 +66,7 @@
* Pre-processor Definitions
****************************************************************************/
#define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
/****************************************************************************
* Public Variables
+2 -2
View File
@@ -65,8 +65,8 @@
* Pre-processor Definitions
****************************************************************************/
#define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define ICMPDAT (&dev->d_buf[NET_LL_HDRLEN + sizeof(struct icmp_iphdr_s)])
#define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
#define ICMPDAT (&dev->d_buf[NET_LL_HDRLEN(dev) + sizeof(struct icmp_iphdr_s)])
/* Allocate a new ICMP data callback */
+2 -2
View File
@@ -90,8 +90,8 @@ void icmp_poll(FAR struct net_driver_s *dev)
{
/* Setup for the application callback */
dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN + IPICMP_HDRLEN];
dev->d_snddata = &dev->d_buf[NET_LL_HDRLEN + IPICMP_HDRLEN];
dev->d_appdata = &dev->d_buf[NET_LL_HDRLEN(dev) + IPICMP_HDRLEN];
dev->d_snddata = &dev->d_buf[NET_LL_HDRLEN(dev) + IPICMP_HDRLEN];
dev->d_len = 0;
dev->d_sndlen = 0;
+1 -1
View File
@@ -57,7 +57,7 @@
* Pre-processor Definitions
****************************************************************************/
#define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN])
#define ICMPBUF ((struct icmp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)])
/****************************************************************************
* Public Variables