summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-06 15:06:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-06 15:06:08 +0000
commitb47a9d79bb418b3009489b28ebfa0d3d579ceb0a (patch)
tree8d3abea4c75673c0780e3b1c8d8d5a623b75f3a5 /nuttx/include
parenta5955f1c84d42d78af27a298f3cdb54e9cd9bff0 (diff)
downloadpx4-nuttx-b47a9d79bb418b3009489b28ebfa0d3d579ceb0a.tar.gz
px4-nuttx-b47a9d79bb418b3009489b28ebfa0d3d579ceb0a.tar.bz2
px4-nuttx-b47a9d79bb418b3009489b28ebfa0d3d579ceb0a.zip
Fix minimum MTU... must be at lest 576
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3674 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/net/uip/uip-arch.h2
-rw-r--r--nuttx/include/net/uip/uipopt.h12
2 files changed, 13 insertions, 1 deletions
diff --git a/nuttx/include/net/uip/uip-arch.h b/nuttx/include/net/uip/uip-arch.h
index 2cbe7239c..3cb2904ea 100644
--- a/nuttx/include/net/uip/uip-arch.h
+++ b/nuttx/include/net/uip/uip-arch.h
@@ -117,7 +117,7 @@ struct uip_driver_s
#ifdef CONFIG_NET_MULTIBUFFER
uint8_t *d_buf;
#else
- uint8_t d_buf[CONFIG_NET_BUFSIZE + 2];
+ uint8_t d_buf[CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE];
#endif
/* d_appdata points to the location where application data can be read from
diff --git a/nuttx/include/net/uip/uipopt.h b/nuttx/include/net/uip/uipopt.h
index f6aff58bd..a0ba62ee1 100644
--- a/nuttx/include/net/uip/uipopt.h
+++ b/nuttx/include/net/uip/uipopt.h
@@ -134,6 +134,18 @@
#define UIP_REASS_MAXAGE (20*10) /* 20 seconds */
+/* Network drivers often receive packets with garbage at the end
+ * and are longer than the size of packet in the TCP header. The
+ * following "fudge" factor increases the size of the I/O buffering
+ * by a small amount to allocate slightly oversize packets. After
+ * receipt, the packet size will be chopped down to the size indicated
+ * in the TCP header.
+ */
+
+#ifndef CONFIG_NET_GUARDSIZE
+# define CONFIG_NET_GUARDSIZE 2
+#endif
+
/* ICMP configuration options */
#if !defined(CONFIG_NET_ICMP) || defined(CONFIG_DISABLE_CLOCK)