00001 #ifndef HEADER_CURL_ARPA_TELNET_H
00002 #define HEADER_CURL_ARPA_TELNET_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef CURL_DISABLE_TELNET
00025
00026
00027
00028 #define CURL_TELOPT_BINARY 0
00029 #define CURL_TELOPT_ECHO 1
00030 #define CURL_TELOPT_SGA 3
00031 #define CURL_TELOPT_EXOPL 255
00032 #define CURL_TELOPT_TTYPE 24
00033 #define CURL_TELOPT_NAWS 31
00034 #define CURL_TELOPT_XDISPLOC 35
00035
00036 #define CURL_TELOPT_NEW_ENVIRON 39
00037 #define CURL_NEW_ENV_VAR 0
00038 #define CURL_NEW_ENV_VALUE 1
00039
00040
00041
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
00066
00067 #define CURL_xEOF 236
00068 #define CURL_SE 240
00069 #define CURL_NOP 241
00070 #define CURL_DM 242
00071 #define CURL_GA 249
00072 #define CURL_SB 250
00073 #define CURL_WILL 251
00074 #define CURL_WONT 252
00075 #define CURL_DO 253
00076 #define CURL_DONT 254
00077 #define CURL_IAC 255
00078
00079
00080
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
00091 #define CURL_TELCMD_MAXIMUM CURL_IAC
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
00103
00104 #endif