cURL / Mailing Lists / curl-library / Single Mail

curl-library

TFTP Option Negotiation

From: Chad Monroe <cmonroe_at_occamnetworks.com>
Date: Tue, 23 Dec 2008 15:09:02 -0800

Hi,

I plan to use libcurl to perform FTP and TFTP downloads within an
application I am writing an am curious if there is any specific reason
why libcurl does not support TFTP option negotiation. One of the
biggest benefits I see to supporting option negotiation would be the
ability to use the tsize option in the RRQ. With this, the option
acknowledgment would return the expected transfer size and
Curl_pgrsSetDownloadSize() could be called to set a valid download
size for use by the users progress callback. As part of this, the
user's write callback does not have to realloc each time data comes in
from libcurl, they can allocate memory once after the option
acknowledgement is received and simply copy data with each successive
call to their write callback.

Another useful option is blksize; transferring with 512 byte packets
reduces throughput, especially over an Ethernet medium where we can
use up to 1500 byte packets before seeing fragmentation.

If this support doesn't exist simply because no one has added it yet,
I'd be happy to add it. If it is for some other reason, I'm curious as
to why. Thanks!

-- 
Chad Monroe
Received on 2008-12-24