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
12       blocksize);
13

DESCRIPTION

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

DEFAULT

23       512
24

PROTOCOLS

26       TFTP
27

EXAMPLE

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

AVAILABILITY

39       Added in 7.19.4
40

RETURN VALUE

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

SEE ALSO

46       CURLOPT_MAXFILESIZE(3),
47
48
49
50libcurl 7.79.1                 November 04, 2020       CURLOPT_TFTP_BLKSIZE(3)
Impressum