1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_TFTP_BLKSIZE 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_MAXFILESIZE (3) 9Protocol: 10 - TFTP 11--- 12 13# NAME 14 15CURLOPT_TFTP_BLKSIZE - TFTP block size 16 17# SYNOPSIS 18 19~~~c 20#include <curl/curl.h> 21 22CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize); 23~~~ 24 25# DESCRIPTION 26 27Specify *blocksize* to use for TFTP data transmission. Valid range as per 28RFC 2348 is 8-65464 bytes. The default of 512 bytes is used if this option is 29not specified. The specified block size is only used if supported by the 30remote server. If the server does not return an option acknowledgment or 31returns an option acknowledgment with no block size, the default of 512 bytes 32is used. 33 34# DEFAULT 35 36512 37 38# EXAMPLE 39 40~~~c 41int main(void) 42{ 43 CURL *curl = curl_easy_init(); 44 if(curl) { 45 CURLcode res; 46 curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/bootimage"); 47 /* try using larger blocks */ 48 curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 2048L); 49 res = curl_easy_perform(curl); 50 curl_easy_cleanup(curl); 51 } 52} 53~~~ 54 55# AVAILABILITY 56 57Added in 7.19.4 58 59# RETURN VALUE 60 61Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 62