mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:53:33 +03:00
protocol source, all about protocols and uri schemes
Add protocol.h and protocol.c containing all about libcurl's known URI schemes and their protocol handlers (so they exist). Moves the scheme definitions from the various sources files into protocol.c. Schemes are known and used, even of the protocol handler is not build or just not implemented at all. Closes #20906
This commit is contained in:
parent
32531f20f9
commit
eb14705280
42 changed files with 1089 additions and 992 deletions
18
lib/tftp.c
18
lib/tftp.c
|
|
@ -1332,7 +1332,7 @@ static CURLcode tftp_setup_connection(struct Curl_easy *data,
|
|||
/*
|
||||
* TFTP protocol handler.
|
||||
*/
|
||||
static const struct Curl_protocol Curl_protocol_tftp = {
|
||||
const struct Curl_protocol Curl_protocol_tftp = {
|
||||
tftp_setup_connection, /* setup_connection */
|
||||
tftp_do, /* do_it */
|
||||
tftp_done, /* done */
|
||||
|
|
@ -1353,19 +1353,3 @@ static const struct Curl_protocol Curl_protocol_tftp = {
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* TFTP protocol handler.
|
||||
*/
|
||||
const struct Curl_scheme Curl_scheme_tftp = {
|
||||
"tftp", /* scheme */
|
||||
#ifdef CURL_DISABLE_TFTP
|
||||
ZERO_NULL,
|
||||
#else
|
||||
&Curl_protocol_tftp,
|
||||
#endif
|
||||
CURLPROTO_TFTP, /* protocol */
|
||||
CURLPROTO_TFTP, /* family */
|
||||
PROTOPT_NOTCPPROXY | PROTOPT_NOURLQUERY, /* flags */
|
||||
PORT_TFTP, /* defport */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue