Lines Matching defs:curl
12 * are also available at https://curl.se/docs/copyright.html.
21 * SPDX-License-Identifier: curl
31 * You can achieve the same result as synctime using curl, awk and date.
35 * # date -s "`curl -sI https://nist.time.gov/timezone.cgi?UTC/s/0 \
39 * $ curl -sI https://nist.time.gov/timezone.cgi?UTC/s/0 \
94 #include <curl/curl.h>
191 void SyncTime_CURL_Init(CURL *curl, char *proxy_port,
195 curl_easy_setopt(curl, CURLOPT_PROXY, proxy_port);
198 curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
201 curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
203 curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, SyncTime_CURL_WriteOutput);
204 curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, SyncTime_CURL_WriteHeader);
207 int SyncTime_CURL_Fetch(CURL *curl, char *URL_Str, char *OutFileName,
215 curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
218 curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
221 curl_easy_setopt(curl, CURLOPT_URL, URL_Str);
222 res = curl_easy_perform(curl);
261 CURL *curl;
302 curl = curl_easy_init();
303 if(curl) {
314 SyncTime_CURL_Init(curl, conf->http_proxy, conf->proxy_user);
343 SyncTime_CURL_Fetch(curl, conf->timeserver, "index.htm",
374 curl_easy_cleanup(curl);