summaryrefslogtreecommitdiffstats
path: root/nuttx/include/net
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-06-06 15:06:08 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2011-06-06 15:06:08 +0000
commite0b3ebce7f45ae093aa8b6257363043598081614 (patch)
tree8d3abea4c75673c0780e3b1c8d8d5a623b75f3a5 /nuttx/include/net
parent10184acdd204984b598e556579d702e0dd996915 (diff)
Fix minimum MTU... must be at lest 576
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3674 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include/net')
-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 2cbe7239c6..3cb2904ea3 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 f6aff58bd3..a0ba62ee10 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)