From 24a33a43436bcc8430c5c1e6707dedc8c2531171 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 15 Nov 2014 13:13:23 -0600 Subject: 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 --- apps/netutils/tftpc/tftpc_internal.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'apps/netutils') 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 -- cgit v1.2.3