31#define IAC (unsigned char)255
32#define DONT (unsigned char)254
33#define DO (unsigned char)253
34#define WONT (unsigned char)252
35#define WILL (unsigned char)251
36#define SB (unsigned char)250
37#define GA (unsigned char)249
38#define EL (unsigned char)248
39#define EC (unsigned char)247
40#define AYT (unsigned char)246
41#define AO (unsigned char)245
42#define IP (unsigned char)244
43#define BREAK (unsigned char)243
44#define DM (unsigned char)242
45#define NOP (unsigned char)241
46#define SE (unsigned char)240
47#define EOR (unsigned char)239
48#define ABORT (unsigned char)238
49#define SUSP (unsigned char)237
50#define xEOF (unsigned char)236
52#define SYNCH (unsigned char)242
56 "EOF",
"SUSP",
"ABORT",
"EOR",
57 "SE",
"NOP",
"DMARK",
"BRK",
"IP",
"AO",
"AYT",
"EC",
58 "EL",
"GA",
"SB",
"WILL",
"WONT",
"DO",
"DONT",
"IAC", 0,
64#define TELCMD_FIRST xEOF
65#define TELCMD_LAST IAC
66#define TELCMD_OK(x) ((x) <= TELCMD_LAST && (x) >= TELCMD_FIRST)
67#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
70#define TELOPT_BINARY (unsigned char)0
71#define TELOPT_ECHO (unsigned char)1
72#define TELOPT_RCP (unsigned char)2
73#define TELOPT_SGA (unsigned char)3
74#define TELOPT_NAMS (unsigned char)4
75#define TELOPT_STATUS (unsigned char)5
76#define TELOPT_TM (unsigned char)6
77#define TELOPT_RCTE (unsigned char)7
78#define TELOPT_NAOL (unsigned char)8
79#define TELOPT_NAOP (unsigned char)9
80#define TELOPT_NAOCRD (unsigned char)10
81#define TELOPT_NAOHTS (unsigned char)11
82#define TELOPT_NAOHTD (unsigned char)12
83#define TELOPT_NAOFFD (unsigned char)13
84#define TELOPT_NAOVTS (unsigned char)14
85#define TELOPT_NAOVTD (unsigned char)15
86#define TELOPT_NAOLFD (unsigned char)16
87#define TELOPT_XASCII (unsigned char)17
88#define TELOPT_LOGOUT (unsigned char)18
89#define TELOPT_BM (unsigned char)19
90#define TELOPT_DET (unsigned char)20
91#define TELOPT_SUPDUP (unsigned char)21
92#define TELOPT_SUPDUPOUTPUT (unsigned char)22
93#define TELOPT_SNDLOC (unsigned char)23
94#define TELOPT_TTYPE (unsigned char)24
95#define TELOPT_EOR (unsigned char)25
96#define TELOPT_TUID (unsigned char)26
97#define TELOPT_OUTMRK (unsigned char)27
98#define TELOPT_TTYLOC (unsigned char)28
99#define TELOPT_3270REGIME (unsigned char)29
100#define TELOPT_X3PAD (unsigned char)30
101#define TELOPT_NAWS (unsigned char)31
102#define TELOPT_TSPEED (unsigned char)32
103#define TELOPT_LFLOW (unsigned char)33
104#define TELOPT_LINEMODE (unsigned char)34
105#define TELOPT_XDISPLOC (unsigned char)35
106#define TELOPT_ENVIRON (unsigned char)36
107#define TELOPT_AUTHENTICATION (unsigned char)37
108#define TELOPT_ENCRYPT (unsigned char)38
109#define TELOPT_EXOPL (unsigned char)255
112#define NTELOPTS (1+TELOPT_ENCRYPT)
115 "BINARY",
"ECHO",
"RCP",
"SUPPRESS GO AHEAD",
"NAME",
116 "STATUS",
"TIMING MARK",
"RCTE",
"NAOL",
"NAOP",
117 "NAOCRD",
"NAOHTS",
"NAOHTD",
"NAOFFD",
"NAOVTS",
118 "NAOVTD",
"NAOLFD",
"EXTEND ASCII",
"LOGOUT",
"BYTE MACRO",
119 "DATA ENTRY TERMINAL",
"SUPDUP",
"SUPDUP OUTPUT",
120 "SEND LOCATION",
"TERMINAL TYPE",
"END OF RECORD",
121 "TACACS UID",
"OUTPUT MARKING",
"TTYLOC",
122 "3270 REGIME",
"X.3 PAD",
"NAWS",
"TSPEED",
"LFLOW",
123 "LINEMODE",
"XDISPLOC",
"ENVIRON",
"AUTHENTICATION",
127#define TELOPT_FIRST TELOPT_BINARY
128#define TELOPT_LAST TELOPT_ENCRYPT
129#define TELOPT_OK(x) ((x) <= TELOPT_LAST && (x) >= TELOPT_FIRST)
130#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
134#define TELQUAL_IS (unsigned char)0
135#define TELQUAL_SEND (unsigned char)1
136#define TELQUAL_INFO (unsigned char)2
137#define TELQUAL_REPLY (unsigned char)2
138#define TELQUAL_NAME (unsigned char)3
145#define LM_FORWARDMASK 2
148#define MODE_EDIT 0x01
149#define MODE_TRAPSIG 0x02
151#define MODE_SOFT_TAB 0x08
152#define MODE_LIT_ECHO 0x10
154#define MODE_MASK 0x1f
157#define MODE_FLOW 0x0100
158#define MODE_ECHO 0x0200
159#define MODE_INBIN 0x0400
160#define MODE_OUTBIN 0x0800
161#define MODE_FORCE 0x1000
188#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
189 "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
190"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
197#define SLC_NAMES SLC_NAMELIST
200#define SLC_NAME_OK(x) ((x) >= 0 && (x) < NSLC)
201#define SLC_NAME(x) slc_names[x]
203#define SLC_NOSUPPORT 0
204#define SLC_CANTCHANGE 1
205#define SLC_VARIABLE 2
207#define SLC_LEVELBITS 0x03
214#define SLC_FLUSHIN 0x40
215#define SLC_FLUSHOUT 0x20
228#define AUTH_WHO_CLIENT 0
229#define AUTH_WHO_SERVER 1
230#define AUTH_WHO_MASK 1
235#define AUTH_HOW_ONE_WAY 0
236#define AUTH_HOW_MUTUAL 2
237#define AUTH_HOW_MASK 2
239#define AUTHTYPE_NULL 0
240#define AUTHTYPE_KERBEROS_V4 1
241#define AUTHTYPE_KERBEROS_V5 2
242#define AUTHTYPE_SPX 3
243#define AUTHTYPE_MINK 4
244#define AUTHTYPE_CNT 5
246#define AUTHTYPE_TEST 99
250 "NULL",
"KERBEROS_V4",
"KERBEROS_V5",
"SPX",
"MINK", 0,
256#define AUTHTYPE_NAME_OK(x) ((x) >= 0 && (x) < AUTHTYPE_CNT)
257#define AUTHTYPE_NAME(x) authtype_names[x]
263#define ENCRYPT_SUPPORT 1
264#define ENCRYPT_REPLY 2
265#define ENCRYPT_START 3
267#define ENCRYPT_REQSTART 5
268#define ENCRYPT_REQEND 6
269#define ENCRYPT_ENC_KEYID 7
270#define ENCRYPT_DEC_KEYID 8
274#define ENCTYPE_DES_CFB64 1
275#define ENCTYPE_DES_OFB64 2
280 "IS",
"SUPPORT",
"REPLY",
"START",
"END",
281 "REQUEST-START",
"REQUEST-END",
"ENC-KEYID",
"DEC-KEYID",
285 "ANY",
"DES_CFB64",
"DES_OFB64", 0,
293#define ENCRYPT_NAME_OK(x) ((x) >= 0 && (x) < ENCRYPT_CNT)
294#define ENCRYPT_NAME(x) encrypt_names[x]
296#define ENCTYPE_NAME_OK(x) ((x) >= 0 && (x) < ENCTYPE_CNT)
297#define ENCTYPE_NAME(x) enctype_names[x]