2014-06-19 23:59:00 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2021-11-26 21:20:18 +08:00
|
|
|
.\" * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2014-06-19 23:59:00 +08:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
.\" * are also available at https://curl.se/docs/copyright.html.
|
2014-06-19 23:59:00 +08:00
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" * SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
.\" *
|
2014-06-19 23:59:00 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\"
|
|
|
|
.TH CURLOPT_TFTP_BLKSIZE 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
|
|
|
|
.SH NAME
|
|
|
|
CURLOPT_TFTP_BLKSIZE \- TFTP block size
|
|
|
|
.SH SYNOPSIS
|
2021-11-26 21:20:18 +08:00
|
|
|
.nf
|
2014-06-19 23:59:00 +08:00
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize);
|
2021-11-26 21:20:18 +08:00
|
|
|
.fi
|
2014-06-19 23:59:00 +08:00
|
|
|
.SH DESCRIPTION
|
|
|
|
Specify \fIblocksize\fP to use for TFTP data transmission. Valid range as per
|
|
|
|
RFC2348 is 8-65464 bytes. The default of 512 bytes will be used if this option
|
|
|
|
is not specified. The specified block size will only be used pending support
|
2022-09-21 05:30:19 +08:00
|
|
|
by the remote server. If the server does not return an option acknowledgment
|
|
|
|
or returns an option acknowledgment with no block size, the default of 512
|
|
|
|
bytes will be used.
|
2014-06-19 23:59:00 +08:00
|
|
|
.SH DEFAULT
|
|
|
|
512
|
|
|
|
.SH PROTOCOLS
|
|
|
|
TFTP
|
|
|
|
.SH EXAMPLE
|
2017-05-31 17:56:28 +08:00
|
|
|
.nf
|
|
|
|
CURL *curl = curl_easy_init();
|
|
|
|
if(curl) {
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, "tftp://example.com/bootimage");
|
|
|
|
/* try using larger blocks */
|
|
|
|
curl_easy_setopt(curl, CURLOPT_TFTP_BLKSIZE, 2048L);
|
|
|
|
ret = curl_easy_perform(curl);
|
|
|
|
curl_easy_cleanup(curl);
|
|
|
|
}
|
|
|
|
.fi
|
2014-06-19 23:59:00 +08:00
|
|
|
.SH AVAILABILITY
|
|
|
|
Added in 7.19.4
|
|
|
|
.SH RETURN VALUE
|
|
|
|
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR CURLOPT_MAXFILESIZE "(3), "
|