1CURLOPT_TELNETOPTIONS(3)            libcurl           CURLOPT_TELNETOPTIONS(3)
2
3
4

NAME

6       CURLOPT_TELNETOPTIONS - set of telnet options
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TELNETOPTIONS,
12                                 struct curl_slist *cmds);
13

DESCRIPTION

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 TEL‐
18       NET standard for details.
19

DEFAULT

21       NULL
22

PROTOCOLS

24       TELNET
25

EXAMPLE

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

AVAILABILITY

40       Along with TELNET
41

RETURN VALUE

43       Returns CURLE_OK if TELNET is supported,  and  CURLE_UNKNOWN_OPTION  if
44       not.
45

SEE ALSO

47       CURLOPT_HTTPHEADER(3), CURLOPT_QUOTE(3),
48
49
50
51ibcurl 8.2.1                    April 26, 2023        CURLOPT_TELNETOPTIONS(3)
Impressum