diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-15 13:13:23 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-15 13:13:23 -0600 |
commit | 24a33a43436bcc8430c5c1e6707dedc8c2531171 (patch) | |
tree | bf837b9244093960c729978056c8097c198541a0 /apps/netutils | |
parent | cf1c261a3dccb0f1ab7c98f1ad3900417b1d8262 (diff) | |
download | px4-nuttx-24a33a43436bcc8430c5c1e6707dedc8c2531171.tar.gz px4-nuttx-24a33a43436bcc8430c5c1e6707dedc8c2531171.tar.bz2 px4-nuttx-24a33a43436bcc8430c5c1e6707dedc8c2531171.zip |
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
Diffstat (limited to 'apps/netutils')
-rw-r--r-- | apps/netutils/tftpc/tftpc_internal.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/netutils/tftpc/tftpc_internal.h b/apps/netutils/tftpc/tftpc_internal.h index 436090193..31a3faade 100644 --- a/apps/netutils/tftpc/tftpc_internal.h +++ b/apps/netutils/tftpc/tftpc_internal.h @@ -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 |