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