arpa_telnet.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_ARPA_TELNET_H
00002 #define HEADER_CURL_ARPA_TELNET_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 #ifndef CURL_DISABLE_TELNET
00025 /*
00026  * Telnet option defines. Add more here if in need.
00027  */
00028 #define CURL_TELOPT_BINARY   0  /* binary 8bit data */
00029 #define CURL_TELOPT_ECHO     1  /* just echo! */
00030 #define CURL_TELOPT_SGA      3  /* Suppress Go Ahead */
00031 #define CURL_TELOPT_EXOPL  255  /* EXtended OPtions List */
00032 #define CURL_TELOPT_TTYPE   24  /* Terminal TYPE */
00033 #define CURL_TELOPT_NAWS    31  /* Negotiate About Window Size */
00034 #define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
00035 
00036 #define CURL_TELOPT_NEW_ENVIRON 39  /* NEW ENVIRONment variables */
00037 #define CURL_NEW_ENV_VAR   0
00038 #define CURL_NEW_ENV_VALUE 1
00039 
00040 /*
00041  * The telnet options represented as strings
00042  */
00043 static const char * const telnetoptions[]=
00044 {
00045   "BINARY",      "ECHO",           "RCP",           "SUPPRESS GO AHEAD",
00046   "NAME",        "STATUS",         "TIMING MARK",   "RCTE",
00047   "NAOL",        "NAOP",           "NAOCRD",        "NAOHTS",
00048   "NAOHTD",      "NAOFFD",         "NAOVTS",        "NAOVTD",
00049   "NAOLFD",      "EXTEND ASCII",   "LOGOUT",        "BYTE MACRO",
00050   "DE TERMINAL", "SUPDUP",         "SUPDUP OUTPUT", "SEND LOCATION",
00051   "TERM TYPE",   "END OF RECORD",  "TACACS UID",    "OUTPUT MARKING",
00052   "TTYLOC",      "3270 REGIME",    "X3 PAD",        "NAWS",
00053   "TERM SPEED",  "LFLOW",          "LINEMODE",      "XDISPLOC",
00054   "OLD-ENVIRON", "AUTHENTICATION", "ENCRYPT",       "NEW-ENVIRON"
00055 };
00056 
00057 #define CURL_TELOPT_MAXIMUM CURL_TELOPT_NEW_ENVIRON
00058 
00059 #define CURL_TELOPT_OK(x) ((x) <= CURL_TELOPT_MAXIMUM)
00060 #define CURL_TELOPT(x)    telnetoptions[x]
00061 
00062 #define CURL_NTELOPTS 40
00063 
00064 /*
00065  * First some defines
00066  */
00067 #define CURL_xEOF 236 /* End Of File */
00068 #define CURL_SE   240 /* Sub negotiation End */
00069 #define CURL_NOP  241 /* No OPeration */
00070 #define CURL_DM   242 /* Data Mark */
00071 #define CURL_GA   249 /* Go Ahead, reverse the line */
00072 #define CURL_SB   250 /* SuBnegotiation */
00073 #define CURL_WILL 251 /* Our side WILL use this option */
00074 #define CURL_WONT 252 /* Our side WON'T use this option */
00075 #define CURL_DO   253 /* DO use this option! */
00076 #define CURL_DONT 254 /* DON'T use this option! */
00077 #define CURL_IAC  255 /* Interpret As Command */
00078 
00079 /*
00080  * Then those numbers represented as strings:
00081  */
00082 static const char * const telnetcmds[]=
00083 {
00084   "EOF",  "SUSP",  "ABORT", "EOR",  "SE",
00085   "NOP",  "DMARK", "BRK",   "IP",   "AO",
00086   "AYT",  "EC",    "EL",    "GA",   "SB",
00087   "WILL", "WONT",  "DO",    "DONT", "IAC"
00088 };
00089 
00090 #define CURL_TELCMD_MINIMUM CURL_xEOF /* the first one */
00091 #define CURL_TELCMD_MAXIMUM CURL_IAC  /* surprise, 255 is the last one! ;-) */
00092 
00093 #define CURL_TELQUAL_IS   0
00094 #define CURL_TELQUAL_SEND 1
00095 #define CURL_TELQUAL_INFO 2
00096 #define CURL_TELQUAL_NAME 3
00097 
00098 #define CURL_TELCMD_OK(x) ( ((unsigned int)(x) >= CURL_TELCMD_MINIMUM) && \
00099                        ((unsigned int)(x) <= CURL_TELCMD_MAXIMUM) )
00100 #define CURL_TELCMD(x)    telnetcmds[(x)-CURL_TELCMD_MINIMUM]
00101 
00102 #endif /* CURL_DISABLE_TELNET */
00103 
00104 #endif /* HEADER_CURL_ARPA_TELNET_H */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:01