1CURLOPT_TFTP_BLKSIZE(3)    curl_easy_setopt options    CURLOPT_TFTP_BLKSIZE(3)
2
3
4

NAME

6       CURLOPT_TFTP_BLKSIZE - TFTP block size
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize);
12

DESCRIPTION

14       Specify blocksize to use for TFTP data transmission. Valid range as per
15       RFC2348 is 8-65464 bytes. The default of 512 bytes will be used if this
16       option  is  not  specified.  The specified block size will only be used
17       pending support by the remote server. If the server does not return  an
18       option  acknowledgement  or  returns  an option acknowledgement with no
19       blksize, the default of 512 bytes will be used.
20

DEFAULT

22       512
23

PROTOCOLS

25       TFTP
26

EXAMPLE

28       CURL *curl = curl_easy_init();
29       if(curl) {
30         curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/bootimage");
31         /* try using larger blocks */
32         curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 2048L);
33         ret = curl_easy_perform(curl);
34         curl_easy_cleanup(curl);
35       }
36

AVAILABILITY

38       Added in 7.19.4
39

RETURN VALUE

41       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
42       if not.
43

SEE ALSO

45       CURLOPT_MAXFILESIZE(3),
46
47
48
49libcurl 7.85.0                   May 17, 2022          CURLOPT_TFTP_BLKSIZE(3)
Impressum