Commit | Line | Data |
---|---|---|
bb0cfa24 DF |
1 | /* |
2 | * Copyright (c) 1983 Regents of the University of California. | |
fca22868 | 3 | * All rights reserved. |
bb0cfa24 | 4 | * |
fca22868 | 5 | * Redistribution and use in source and binary forms are permitted |
f4f66d2c KB |
6 | * provided that the above copyright notice and this paragraph are |
7 | * duplicated in all such forms and that any documentation, | |
8 | * advertising materials, and other materials related to such | |
9 | * distribution and use acknowledge that the software was developed | |
10 | * by the University of California, Berkeley. The name of the | |
11 | * University may not be used to endorse or promote products derived | |
12 | * from this software without specific prior written permission. | |
13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
fca22868 | 16 | * |
f4f66d2c | 17 | * @(#)telnet.h 5.3 (Berkeley) %G% |
bb0cfa24 DF |
18 | */ |
19 | ||
89e49f55 BJ |
20 | /* |
21 | * Definitions for the TELNET protocol. | |
22 | */ | |
23 | #define IAC 255 /* interpret as command: */ | |
24 | #define DONT 254 /* you are not to use option */ | |
25 | #define DO 253 /* please, you use option */ | |
26 | #define WONT 252 /* I won't use option */ | |
27 | #define WILL 251 /* I will use option */ | |
28 | #define SB 250 /* interpret as subnegotiation */ | |
29 | #define GA 249 /* you may reverse the line */ | |
30 | #define EL 248 /* erase the current line */ | |
31 | #define EC 247 /* erase the current character */ | |
32 | #define AYT 246 /* are you there */ | |
33 | #define AO 245 /* abort output--but let prog finish */ | |
34 | #define IP 244 /* interrupt process--permanently */ | |
35 | #define BREAK 243 /* break */ | |
36 | #define DM 242 /* data mark--for connect. cleaning */ | |
37 | #define NOP 241 /* nop */ | |
38 | #define SE 240 /* end sub negotiation */ | |
529acda4 | 39 | #define EOR 239 /* end of record (transparent mode) */ |
89e49f55 BJ |
40 | |
41 | #define SYNCH 242 /* for telfunc calls */ | |
42 | ||
6640dd4c SL |
43 | #ifdef TELCMDS |
44 | char *telcmds[] = { | |
45 | "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", | |
46 | "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", | |
47 | }; | |
48 | #endif | |
89e49f55 | 49 | |
6640dd4c | 50 | /* telnet options */ |
89e49f55 BJ |
51 | #define TELOPT_BINARY 0 /* 8-bit data path */ |
52 | #define TELOPT_ECHO 1 /* echo */ | |
8f6b89f5 SL |
53 | #define TELOPT_RCP 2 /* prepare to reconnect */ |
54 | #define TELOPT_SGA 3 /* suppress go ahead */ | |
55 | #define TELOPT_NAMS 4 /* approximate message size */ | |
56 | #define TELOPT_STATUS 5 /* give status */ | |
57 | #define TELOPT_TM 6 /* timing mark */ | |
58 | #define TELOPT_RCTE 7 /* remote controlled transmission and echo */ | |
59 | #define TELOPT_NAOL 8 /* negotiate about output line width */ | |
60 | #define TELOPT_NAOP 9 /* negotiate about output page size */ | |
61 | #define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ | |
62 | #define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ | |
63 | #define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ | |
64 | #define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ | |
65 | #define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ | |
66 | #define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ | |
67 | #define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ | |
68 | #define TELOPT_XASCII 17 /* extended ascic character set */ | |
69 | #define TELOPT_LOGOUT 18 /* force logout */ | |
70 | #define TELOPT_BM 19 /* byte macro */ | |
71 | #define TELOPT_DET 20 /* data entry terminal */ | |
72 | #define TELOPT_SUPDUP 21 /* supdup protocol */ | |
6640dd4c SL |
73 | #define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ |
74 | #define TELOPT_SNDLOC 23 /* send location */ | |
3fd9f872 | 75 | #define TELOPT_TTYPE 24 /* terminal type */ |
6640dd4c | 76 | #define TELOPT_EOR 25 /* end or record */ |
8f6b89f5 | 77 | #define TELOPT_EXOPL 255 /* extended-options-list */ |
89e49f55 | 78 | |
89e49f55 | 79 | #ifdef TELOPTS |
c28ebf50 | 80 | #define NTELOPTS (1+TELOPT_EOR) |
3fd9f872 | 81 | char *telopts[NTELOPTS] = { |
89e49f55 BJ |
82 | "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", |
83 | "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", | |
84 | "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", | |
8f6b89f5 | 85 | "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", |
529acda4 MK |
86 | "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", |
87 | "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", | |
89e49f55 BJ |
88 | }; |
89 | #endif | |
6640dd4c SL |
90 | |
91 | /* sub-option qualifiers */ | |
92 | #define TELQUAL_IS 0 /* option is... */ | |
93 | #define TELQUAL_SEND 1 /* send option */ |