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 7f70d2605e
commit 34bb359447
2 changed files with 15 additions and 5 deletions

View File

@ -77,9 +77,14 @@
/* For efficiency reasons, the size of the IO buffer should be a multiple
* of the TCP MSS value. Also, the current design requires that the IO
* buffer be sufficiently large to contain the entire GET request.
*
* In the case where there are multiple network devices with different
* link layer protocols (CONFIG_NET_MULTILINK), each network device
* may support a different TCP MSS value. Here we arbitrarily select
* the minimum MSS for that case.
*/
#define HTTPD_IOBUFFER_SIZE (3*TCP_MSS)
#define HTTPD_IOBUFFER_SIZE (3*MIN_TCP_MSS)
/* This is the maximum size of a file path */

View File

@ -84,15 +84,20 @@
#define TFTP_ERRHEADERSIZE 4
#define TFTP_DATAHEADERSIZE 4
/* The maximum size for TFTP data is determined by the configured uIP packet
* size (but cannot exceed 512 + sizeof(TFTP_DATA header).
/* The maximum size for TFTP data is determined by the configured UDP packet
* payload size (UDP_MSS), but cannot exceed 512 + sizeof(TFTP_DATA header).
*
* In the case where there are multiple network devices with different
* link layer protocols (CONFIG_NET_MULTILINK), each network device
* may support a different UDP MSS value. Here we arbitrarily select
* the minimum MSS for that case.
*/
#define TFTP_DATAHEADERSIZE 4
#define TFTP_MAXPACKETSIZE (TFTP_DATAHEADERSIZE+512)
#if UDP_MSS < TFTP_MAXPACKETSIZE
# define TFTP_PACKETSIZE UDP_MSS
#if MIN_UDP_MSS < TFTP_MAXPACKETSIZE
# define TFTP_PACKETSIZE MIN_UDP_MSS
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "uIP MSS is too small for TFTP"
# endif