From owner-cvs-src-old@FreeBSD.ORG Wed Jun 15 22:13:33 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B381065670 for ; Wed, 15 Jun 2011 22:13:33 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 477D98FC12 for ; Wed, 15 Jun 2011 22:13:33 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p5FMDXZC070535 for ; Wed, 15 Jun 2011 22:13:33 GMT (envelope-from rodrigc@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p5FMDXW7070534 for cvs-src-old@freebsd.org; Wed, 15 Jun 2011 22:13:33 GMT (envelope-from rodrigc@repoman.freebsd.org) Message-Id: <201106152213.p5FMDXW7070534@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rodrigc@repoman.freebsd.org using -f From: Craig Rodrigues Date: Wed, 15 Jun 2011 22:13:22 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libstand tftp.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2011 22:13:33 -0000 rodrigc 2011-06-15 22:13:22 UTC FreeBSD src repository Modified files: lib/libstand tftp.c Log: SVN rev 223124 on 2011-06-15 22:13:22Z by rodrigc (1) When sending the TFTP RRQ packet to read a file, send along the "blksize" option specified in RFC2348, and the "tsize" option specified in RFC2349. Add code to parse the TFTP Option Acknowledgement (OACK) packet as specified in RFC2347. For TFTP servers which support the "blksize" option, we can specify a TFTP Data block size larger than the default 512 bytes specified in RFC1350. This offers greater read performance when downloading files. We request an initial size of 1428 bytes, which is less than the Ethernet MTU of 1500 bytes. If the TFTP server sends back an OACK packet, then use the block size specified in the OACK packet. Most times it is usually the same value as what we request. If the TFTP server supports RFC2348, we will see performance improvements by transferring files over TFTP with larger block sizes. If we do not get back an OACK packet, then we most likely we are interoperating with a legacy TFTP server that does not support TFTP extension options, so default to the block size of 512 bytes. (2) If the "tftp.blksize" environment variable is set, then take that value and use it when sending the TFTP RRQ packet, instead of 1428. This allows us to set different values of "tftp.blksize" in the loader, so that we can test out different TFTP block sizes at run time. Obtained from: Juniper Networks Fixed by: rodrigc Revision Changes Path 1.19 +229 -35 src/lib/libstand/tftp.c