1CURLOPT_TELNETOPTIONS(3) curl_easy_setopt options CURLOPT_TELNETOPTIONS(3)
2
3
4
6 CURLOPT_TELNETOPTIONS - custom telnet options
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TELNETOPTIONS,
12 struct curl_slist *cmds);
13
15 Provide a pointer to a curl_slist with variables to pass to the telnet
16 negotiations. The variables should be in the format <option=value>.
17 libcurl supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the
18 TELNET standard for details.
19
21 NULL
22
24 TELNET
25
27 CURL *curl = curl_easy_init();
28 if(curl) {
29 struct curl_slist *options;
30 options = curl_slist_append(NULL, "TTTYPE=vt100");
31 options = curl_slist_append(options, "USER=foobar");
32 curl_easy_setopt(curl, CURLOPT_URL, "telnet://example.com/");
33 curl_easy_setopt(curl, CURLOPT_TELNETOPTIONS, options);
34 ret = curl_easy_perform(curl);
35 curl_easy_cleanup(curl);
36 curl_slist_free_all(options);
37 }
38
40 Along with TELNET
41
43 Returns CURLE_OK if TELNET is supported, and CURLE_UNKNOWN_OPTION if
44 not.
45
47 CURLOPT_HTTPHEADER(3), CURLOPT_QUOTE(3),
48
49
50
51libcurl 7.61.1 May 31, 2017 CURLOPT_TELNETOPTIONS(3)