1CURLOPT_TFTP_BLKSIZE(3)             libcurl            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       RFC 2348 is 8-65464 bytes. The default of 512 bytes  will  be  used  if
16       this  option  is  not  specified. The specified block size will only be
17       used pending support by the remote server. If the server does  not  re‐
18       turn  an option acknowledgment or returns an option acknowledgment with
19       no block size, 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
49ibcurl 8.2.1                     June 25, 2023         CURLOPT_TFTP_BLKSIZE(3)
Impressum