| 1 |
doda |
6806 |
/* |
| 2 |
|
|
* Copyright (C) 1994-1998 T. Teranishi |
| 3 |
nmaya |
9048 |
* (C) 2007- TeraTerm Project |
| 4 |
doda |
6806 |
* All rights reserved. |
| 5 |
|
|
* |
| 6 |
doda |
6841 |
* Redistribution and use in source and binary forms, with or without |
| 7 |
|
|
* modification, are permitted provided that the following conditions |
| 8 |
|
|
* are met: |
| 9 |
doda |
6806 |
* |
| 10 |
doda |
6841 |
* 1. Redistributions of source code must retain the above copyright |
| 11 |
|
|
* notice, this list of conditions and the following disclaimer. |
| 12 |
|
|
* 2. Redistributions in binary form must reproduce the above copyright |
| 13 |
|
|
* notice, this list of conditions and the following disclaimer in the |
| 14 |
|
|
* documentation and/or other materials provided with the distribution. |
| 15 |
|
|
* 3. The name of the author may not be used to endorse or promote products |
| 16 |
|
|
* derived from this software without specific prior written permission. |
| 17 |
doda |
6806 |
* |
| 18 |
doda |
6841 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR |
| 19 |
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 20 |
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 21 |
|
|
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 22 |
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 23 |
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 |
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 |
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 |
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 |
doda |
6806 |
*/ |
| 29 |
maya |
3227 |
|
| 30 |
|
|
/* TERATERM.EXE, TELNET routines */ |
| 31 |
|
|
|
| 32 |
|
|
#define TEL_EOF 236 |
| 33 |
|
|
#define SUSP 237 |
| 34 |
|
|
#define ABORT 238 |
| 35 |
|
|
|
| 36 |
|
|
#define SE 240 |
| 37 |
|
|
#define NOP 241 |
| 38 |
|
|
#define DM 242 |
| 39 |
|
|
#define BREAK 243 |
| 40 |
|
|
#define IP 244 |
| 41 |
|
|
#define AO 245 |
| 42 |
|
|
#define AYT 246 |
| 43 |
|
|
#define EC 247 |
| 44 |
|
|
#define EL 248 |
| 45 |
|
|
#define GOAHEAD 249 |
| 46 |
|
|
#define SB 250 |
| 47 |
|
|
#define WILLTEL 251 |
| 48 |
|
|
#define WONTTEL 252 |
| 49 |
|
|
#define DOTEL 253 |
| 50 |
|
|
#define DONTTEL 254 |
| 51 |
|
|
#define IAC 255 |
| 52 |
|
|
|
| 53 |
|
|
#define BINARY 0 |
| 54 |
|
|
#define ECHO 1 |
| 55 |
|
|
#define RECONNECT 2 |
| 56 |
doda |
6435 |
#define SGA 3 |
| 57 |
maya |
3227 |
#define AMSN 4 |
| 58 |
|
|
#define STATUS 5 |
| 59 |
|
|
#define TIMING 6 |
| 60 |
|
|
#define RCTAN 7 |
| 61 |
|
|
#define OLW 8 |
| 62 |
|
|
#define OPS 9 |
| 63 |
|
|
#define OCRD 10 |
| 64 |
|
|
#define OHTS 11 |
| 65 |
|
|
#define OHTD 12 |
| 66 |
|
|
#define OFFD 13 |
| 67 |
|
|
#define OVTS 14 |
| 68 |
|
|
#define OVTD 15 |
| 69 |
|
|
#define OLFD 16 |
| 70 |
|
|
#define XASCII 17 |
| 71 |
|
|
#define LOGOUT 18 |
| 72 |
|
|
#define BYTEM 19 |
| 73 |
|
|
#define DET 20 |
| 74 |
|
|
#define SUPDUP 21 |
| 75 |
|
|
#define SUPDUPOUT 22 |
| 76 |
|
|
#define SENDLOC 23 |
| 77 |
|
|
#define TERMTYPE 24 |
| 78 |
|
|
#define EOR 25 |
| 79 |
|
|
#define TACACSUID 26 |
| 80 |
|
|
#define OUTPUTMARK 27 |
| 81 |
|
|
#define TERMLOCNUM 28 |
| 82 |
|
|
#define REGIME3270 29 |
| 83 |
|
|
#define X3PAD 30 |
| 84 |
|
|
#define NAWS 31 |
| 85 |
|
|
#define TERMSPEED 32 |
| 86 |
|
|
#define TFLOWCNTRL 33 |
| 87 |
|
|
#define LINEMODE 34 |
| 88 |
|
|
#define MaxTelOpt 34 |
| 89 |
|
|
|
| 90 |
|
|
/* Telnet status */ |
| 91 |
|
|
#define TelIdle 0 |
| 92 |
|
|
#define TelIAC 1 |
| 93 |
|
|
#define TelSB 2 |
| 94 |
|
|
#define TelWill 3 |
| 95 |
|
|
#define TelWont 4 |
| 96 |
|
|
#define TelDo 5 |
| 97 |
|
|
#define TelDont 6 |
| 98 |
|
|
#define TelNop 7 |
| 99 |
|
|
|
| 100 |
|
|
#ifdef __cplusplus |
| 101 |
|
|
extern "C" { |
| 102 |
|
|
#endif |
| 103 |
|
|
|
| 104 |
|
|
void InitTelnet(); |
| 105 |
|
|
void EndTelnet(); |
| 106 |
|
|
void ParseTel(BOOL *Size, int *Nx, int *Ny); |
| 107 |
|
|
void TelEnableHisOpt(BYTE b); |
| 108 |
|
|
void TelEnableMyOpt(BYTE b); |
| 109 |
|
|
void TelInformWinSize(int nx, int ny); |
| 110 |
|
|
void TelSendAYT(); |
| 111 |
|
|
void TelSendBreak(); |
| 112 |
|
|
void TelChangeEcho(); |
| 113 |
|
|
void TelSendNOP(); |
| 114 |
|
|
void TelStartKeepAliveThread(); |
| 115 |
|
|
void TelStopKeepAliveThread(); |
| 116 |
|
|
void TelUpdateKeepAliveInterval(); |
| 117 |
|
|
|
| 118 |
|
|
extern int TelStatus; |
| 119 |
|
|
|
| 120 |
|
|
#ifdef __cplusplus |
| 121 |
|
|
} |
| 122 |
|
|
#endif |