inc/arpa/telnet.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
#ifndef __ARPA_TELNET_H
00041
#define __ARPA_TELNET_H
00042
00043
#ifndef __SYS_W32API_H
00044
#include <sys/w32api.h>
00045
#endif
00046
00047
00048
00049
00050
#define IAC 255
00051
#define DONT 254
00052
#define DO 253
00053
#define WONT 252
00054
#define WILL 251
00055
#define SB 250
00056
#define GA 249
00057
#define EL 248
00058
#define EC 247
00059
#define AYT 246
00060
#define AO 245
00061
#define IP 244
00062
#define BREAK 243
00063
#define DM 242
00064
#define NOP 241
00065
#define SE 240
00066
#define EOR 239
00067
#define ABORT 238
00068
#define SUSP 237
00069
#define xEOF 236
00070
00071
#define SYNCH 242
00072
00073
#ifdef TELCMDS
00074
const char *telcmds[] = {
00075
"EOF",
"SUSP",
"ABORT",
"EOR",
00076
"SE",
"NOP",
"DMARK",
"BRK",
"IP",
"AO",
"AYT",
"EC",
00077
"EL",
"GA",
"SB",
"WILL",
"WONT",
"DO",
"DONT",
"IAC", 0
00078 };
00079
#else
00080
W32_DATA
const char *telcmds[];
00081
#endif
00082
00083
#define TELCMD_FIRST xEOF
00084
#define TELCMD_LAST IAC
00085
#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
00086
(unsigned int)(x) >= TELCMD_FIRST)
00087
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
00088
00089
00090
00091
#define TELOPT_BINARY 0
00092
#define TELOPT_ECHO 1
00093
#define TELOPT_RCP 2
00094
#define TELOPT_SGA 3
00095
#define TELOPT_NAMS 4
00096
#define TELOPT_STATUS 5
00097
#define TELOPT_TM 6
00098
#define TELOPT_RCTE 7
00099
#define TELOPT_NAOL 8
00100
#define TELOPT_NAOP 9
00101
#define TELOPT_NAOCRD 10
00102
#define TELOPT_NAOHTS 11
00103
#define TELOPT_NAOHTD 12
00104
#define TELOPT_NAOFFD 13
00105
#define TELOPT_NAOVTS 14
00106
#define TELOPT_NAOVTD 15
00107
#define TELOPT_NAOLFD 16
00108
#define TELOPT_XASCII 17
00109
#define TELOPT_LOGOUT 18
00110
#define TELOPT_BM 19
00111
#define TELOPT_DET 20
00112
#define TELOPT_SUPDUP 21
00113
#define TELOPT_SUPDUPOUTPUT 22
00114
#define TELOPT_SNDLOC 23
00115
#define TELOPT_TTYPE 24
00116
#define TELOPT_EOR 25
00117
#define TELOPT_TUID 26
00118
#define TELOPT_OUTMRK 27
00119
#define TELOPT_TTYLOC 28
00120
#define TELOPT_3270REGIME 29
00121
#define TELOPT_X3PAD 30
00122
#define TELOPT_NAWS 31
00123
#define TELOPT_TSPEED 32
00124
#define TELOPT_LFLOW 33
00125
#define TELOPT_LINEMODE 34
00126
#define TELOPT_XDISPLOC 35
00127
#define TELOPT_OLD_ENVIRON 36
00128
#define TELOPT_AUTHENTICATION 37
00129
#define TELOPT_ENCRYPT 38
00130
#define TELOPT_NEW_ENVIRON 39
00131
#define TELOPT_EXOPL 255
00132
00133
#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
00134
00135
#ifdef TELOPTS
00136
const char *telopts[NTELOPTS+1] = {
00137
"BINARY",
"ECHO",
"RCP",
"SUPPRESS GO AHEAD",
"NAME",
00138
"STATUS",
"TIMING MARK",
"RCTE",
"NAOL",
"NAOP",
00139
"NAOCRD",
"NAOHTS",
"NAOHTD",
"NAOFFD",
"NAOVTS",
00140
"NAOVTD",
"NAOLFD",
"EXTEND ASCII",
"LOGOUT",
"BYTE MACRO",
00141
"DATA ENTRY TERMINAL",
"SUPDUP",
"SUPDUP OUTPUT",
00142
"SEND LOCATION",
"TERMINAL TYPE",
"END OF RECORD",
00143
"TACACS UID",
"OUTPUT MARKING",
"TTYLOC",
00144
"3270 REGIME",
"X.3 PAD",
"NAWS",
"TSPEED",
"LFLOW",
00145
"LINEMODE",
"XDISPLOC",
"OLD-ENVIRON",
"AUTHENTICATION",
00146
"ENCRYPT",
"NEW-ENVIRON", 0
00147 };
00148
#define TELOPT_FIRST TELOPT_BINARY
00149
#define TELOPT_LAST TELOPT_NEW_ENVIRON
00150
#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
00151
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
00152
#endif
00153
00154
00155
00156
#define TELQUAL_IS 0
00157
#define TELQUAL_SEND 1
00158
#define TELQUAL_INFO 2
00159
#define TELQUAL_REPLY 2
00160
#define TELQUAL_NAME 3
00161
00162
#define LFLOW_OFF 0
00163
#define LFLOW_ON 1
00164
#define LFLOW_RESTART_ANY 2
00165
#define LFLOW_RESTART_XON 3
00166
00167
00168
00169
#define LM_MODE 1
00170
#define LM_FORWARDMASK 2
00171
#define LM_SLC 3
00172
00173
#define MODE_EDIT 0x01
00174
#define MODE_TRAPSIG 0x02
00175
#define MODE_ACK 0x04
00176
#define MODE_SOFT_TAB 0x08
00177
#define MODE_LIT_ECHO 0x10
00178
00179
#define MODE_MASK 0x1f
00180
00181
00182
00183
#define MODE_FLOW 0x0100
00184
#define MODE_ECHO 0x0200
00185
#define MODE_INBIN 0x0400
00186
#define MODE_OUTBIN 0x0800
00187
#define MODE_FORCE 0x1000
00188
00189
#define SLC_SYNCH 1
00190
#define SLC_BRK 2
00191
#define SLC_IP 3
00192
#define SLC_AO 4
00193
#define SLC_AYT 5
00194
#define SLC_EOR 6
00195
#define SLC_ABORT 7
00196
#define SLC_EOF 8
00197
#define SLC_SUSP 9
00198
#define SLC_EC 10
00199
#define SLC_EL 11
00200
#define SLC_EW 12
00201
#define SLC_RP 13
00202
#define SLC_LNEXT 14
00203
#define SLC_XON 15
00204
#define SLC_XOFF 16
00205
#define SLC_FORW1 17
00206
#define SLC_FORW2 18
00207
#define SLC_MCL 19
00208
#define SLC_MCR 20
00209
#define SLC_MCWL 21
00210
#define SLC_MCWR 22
00211
#define SLC_MCBOL 23
00212
#define SLC_MCEOL 24
00213
#define SLC_INSRT 25
00214
#define SLC_OVER 26
00215
#define SLC_ECR 27
00216
#define SLC_EWR 28
00217
#define SLC_EBOL 29
00218
#define SLC_EEOL 30
00219
00220
#define NSLC 30
00221
00222
00223
00224
00225
00226
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
00227
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
00228
"LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
00229
"MCL", "MCR", "MCWL", "MCWR", "MCBOL", \
00230
"MCEOL", "INSRT", "OVER", "ECR", "EWR", \
00231
"EBOL", "EEOL", \
00232
0
00233
#ifdef SLC_NAMES
00234
const char *slc_names[] = { SLC_NAMELIST };
00235
#else
00236
W32_DATA
const char *slc_names[];
00237
#define SLC_NAMES SLC_NAMELIST
00238
#endif
00239
00240
#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
00241
#define SLC_NAME(x) slc_names[x]
00242
00243
#define SLC_NOSUPPORT 0
00244
#define SLC_CANTCHANGE 1
00245
#define SLC_VARIABLE 2
00246
#define SLC_DEFAULT 3
00247
#define SLC_LEVELBITS 0x03
00248
00249
#define SLC_FUNC 0
00250
#define SLC_FLAGS 1
00251
#define SLC_VALUE 2
00252
00253
#define SLC_ACK 0x80
00254
#define SLC_FLUSHIN 0x40
00255
#define SLC_FLUSHOUT 0x20
00256
00257
#define OLD_ENV_VAR 1
00258
#define OLD_ENV_VALUE 0
00259
#define NEW_ENV_VAR 0
00260
#define NEW_ENV_VALUE 1
00261
#define ENV_ESC 2
00262
#define ENV_USERVAR 3
00263
00264
00265
00266
00267
00268
00269
00270
#define AUTH_WHO_CLIENT 0
00271
#define AUTH_WHO_SERVER 1
00272
#define AUTH_WHO_MASK 1
00273
00274
00275
00276
#define AUTH_HOW_ONE_WAY 0
00277
#define AUTH_HOW_MUTUAL 2
00278
#define AUTH_HOW_MASK 2
00279
00280
#define AUTHTYPE_NULL 0
00281
#define AUTHTYPE_KERBEROS_V4 1
00282
#define AUTHTYPE_KERBEROS_V5 2
00283
#define AUTHTYPE_SPX 3
00284
#define AUTHTYPE_MINK 4
00285
#define AUTHTYPE_SRP 5
00286
#define AUTHTYPE_CNT 6
00287
00288
#define AUTHTYPE_TEST 99
00289
00290
#ifdef AUTH_NAMES
00291
const char *authtype_names[] = {
00292
"NULL",
"KERBEROS_V4",
"KERBEROS_V5",
"SPX",
"MINK",
"SRP", 0
00293 };
00294
#else
00295
W32_DATA
const char *authtype_names[];
00296
#endif
00297
00298
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
00299
#define AUTHTYPE_NAME(x) authtype_names[x]
00300
00301
00302
00303
00304
#define ENCRYPT_IS 0
00305
#define ENCRYPT_SUPPORT 1
00306
#define ENCRYPT_REPLY 2
00307
#define ENCRYPT_START 3
00308
#define ENCRYPT_END 4
00309
#define ENCRYPT_REQSTART 5
00310
#define ENCRYPT_REQEND 6
00311
#define ENCRYPT_ENC_KEYID 7
00312
#define ENCRYPT_DEC_KEYID 8
00313
#define ENCRYPT_CNT 9
00314
00315
#define ENCTYPE_ANY 0
00316
#define ENCTYPE_DES_CFB64 1
00317
#define ENCTYPE_DES_OFB64 2
00318
#define ENCTYPE_CAST5_40_CFB64 8
00319
#define ENCTYPE_CAST5_40_OFB64 9
00320
#define ENCTYPE_CAST128_CFB64 10
00321
#define ENCTYPE_CAST128_OFB64 11
00322
#define ENCTYPE_CNT 12
00323
00324
#ifdef ENCRYPT_NAMES
00325
const char *encrypt_names[] = {
00326
"IS",
"SUPPORT",
"REPLY",
"START",
"END",
00327
"REQUEST-START",
"REQUEST-END",
"ENC-KEYID",
"DEC-KEYID",
00328 0
00329 };
00330
const char *enctype_names[] = {
00331
"ANY",
"DES_CFB64",
"DES_OFB64",
"UNKNOWN",
"UNKNOWN",
"UNKNOWN",
00332
"UNKNOWN",
"UNKNOWN",
"CAST5_40_CFB64",
"CAST5_40_OFB64",
00333
"CAST128_CFB64",
"CAST128_OFB64", 0,
00334 };
00335
#else
00336
W32_DATA
const char *encrypt_names[];
00337 W32_DATA
const char *enctype_names[];
00338
#endif
00339
00340
00341
#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
00342
#define ENCRYPT_NAME(x) encrypt_names[x]
00343
00344
#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
00345
#define ENCTYPE_NAME(x) enctype_names[x]
00346
00347
#endif
Generated on Wed Aug 4 08:55:45 2010 for Watt-32 tcp/ip by
1.3.8