Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/arpa
File: telnet.h
/*
[0] Fix | Delete
* Copyright (c) 1983, 1993
[1] Fix | Delete
* The Regents of the University of California. All rights reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions
[5] Fix | Delete
* are met:
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[8] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[9] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[10] Fix | Delete
* documentation and/or other materials provided with the distribution.
[11] Fix | Delete
* 4. Neither the name of the University nor the names of its contributors
[12] Fix | Delete
* may be used to endorse or promote products derived from this software
[13] Fix | Delete
* without specific prior written permission.
[14] Fix | Delete
*
[15] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
[16] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[17] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[18] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
[19] Fix | Delete
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[20] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[21] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[22] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[23] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[24] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[25] Fix | Delete
* SUCH DAMAGE.
[26] Fix | Delete
*
[27] Fix | Delete
* @(#)telnet.h 8.2 (Berkeley) 12/15/93
[28] Fix | Delete
*/
[29] Fix | Delete
[30] Fix | Delete
#ifndef _ARPA_TELNET_H
[31] Fix | Delete
#define _ARPA_TELNET_H 1
[32] Fix | Delete
[33] Fix | Delete
/*
[34] Fix | Delete
* Definitions for the TELNET protocol.
[35] Fix | Delete
*/
[36] Fix | Delete
#define IAC 255 /* interpret as command: */
[37] Fix | Delete
#define DONT 254 /* you are not to use option */
[38] Fix | Delete
#define DO 253 /* please, you use option */
[39] Fix | Delete
#define WONT 252 /* I won't use option */
[40] Fix | Delete
#define WILL 251 /* I will use option */
[41] Fix | Delete
#define SB 250 /* interpret as subnegotiation */
[42] Fix | Delete
#define GA 249 /* you may reverse the line */
[43] Fix | Delete
#define EL 248 /* erase the current line */
[44] Fix | Delete
#define EC 247 /* erase the current character */
[45] Fix | Delete
#define AYT 246 /* are you there */
[46] Fix | Delete
#define AO 245 /* abort output--but let prog finish */
[47] Fix | Delete
#define IP 244 /* interrupt process--permanently */
[48] Fix | Delete
#define BREAK 243 /* break */
[49] Fix | Delete
#define DM 242 /* data mark--for connect. cleaning */
[50] Fix | Delete
#define NOP 241 /* nop */
[51] Fix | Delete
#define SE 240 /* end sub negotiation */
[52] Fix | Delete
#define EOR 239 /* end of record (transparent mode) */
[53] Fix | Delete
#define ABORT 238 /* Abort process */
[54] Fix | Delete
#define SUSP 237 /* Suspend process */
[55] Fix | Delete
#define xEOF 236 /* End of file: EOF is already used... */
[56] Fix | Delete
[57] Fix | Delete
#define SYNCH 242 /* for telfunc calls */
[58] Fix | Delete
[59] Fix | Delete
#ifdef TELCMDS
[60] Fix | Delete
char *telcmds[] = {
[61] Fix | Delete
"EOF", "SUSP", "ABORT", "EOR",
[62] Fix | Delete
"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
[63] Fix | Delete
"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
[64] Fix | Delete
};
[65] Fix | Delete
#else
[66] Fix | Delete
extern char *telcmds[];
[67] Fix | Delete
#endif
[68] Fix | Delete
[69] Fix | Delete
#define TELCMD_FIRST xEOF
[70] Fix | Delete
#define TELCMD_LAST IAC
[71] Fix | Delete
#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
[72] Fix | Delete
(unsigned int)(x) >= TELCMD_FIRST)
[73] Fix | Delete
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
[74] Fix | Delete
[75] Fix | Delete
/* telnet options */
[76] Fix | Delete
#define TELOPT_BINARY 0 /* 8-bit data path */
[77] Fix | Delete
#define TELOPT_ECHO 1 /* echo */
[78] Fix | Delete
#define TELOPT_RCP 2 /* prepare to reconnect */
[79] Fix | Delete
#define TELOPT_SGA 3 /* suppress go ahead */
[80] Fix | Delete
#define TELOPT_NAMS 4 /* approximate message size */
[81] Fix | Delete
#define TELOPT_STATUS 5 /* give status */
[82] Fix | Delete
#define TELOPT_TM 6 /* timing mark */
[83] Fix | Delete
#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
[84] Fix | Delete
#define TELOPT_NAOL 8 /* negotiate about output line width */
[85] Fix | Delete
#define TELOPT_NAOP 9 /* negotiate about output page size */
[86] Fix | Delete
#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
[87] Fix | Delete
#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
[88] Fix | Delete
#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
[89] Fix | Delete
#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
[90] Fix | Delete
#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
[91] Fix | Delete
#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
[92] Fix | Delete
#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
[93] Fix | Delete
#define TELOPT_XASCII 17 /* extended ascii character set */
[94] Fix | Delete
#define TELOPT_LOGOUT 18 /* force logout */
[95] Fix | Delete
#define TELOPT_BM 19 /* byte macro */
[96] Fix | Delete
#define TELOPT_DET 20 /* data entry terminal */
[97] Fix | Delete
#define TELOPT_SUPDUP 21 /* supdup protocol */
[98] Fix | Delete
#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
[99] Fix | Delete
#define TELOPT_SNDLOC 23 /* send location */
[100] Fix | Delete
#define TELOPT_TTYPE 24 /* terminal type */
[101] Fix | Delete
#define TELOPT_EOR 25 /* end or record */
[102] Fix | Delete
#define TELOPT_TUID 26 /* TACACS user identification */
[103] Fix | Delete
#define TELOPT_OUTMRK 27 /* output marking */
[104] Fix | Delete
#define TELOPT_TTYLOC 28 /* terminal location number */
[105] Fix | Delete
#define TELOPT_3270REGIME 29 /* 3270 regime */
[106] Fix | Delete
#define TELOPT_X3PAD 30 /* X.3 PAD */
[107] Fix | Delete
#define TELOPT_NAWS 31 /* window size */
[108] Fix | Delete
#define TELOPT_TSPEED 32 /* terminal speed */
[109] Fix | Delete
#define TELOPT_LFLOW 33 /* remote flow control */
[110] Fix | Delete
#define TELOPT_LINEMODE 34 /* Linemode option */
[111] Fix | Delete
#define TELOPT_XDISPLOC 35 /* X Display Location */
[112] Fix | Delete
#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
[113] Fix | Delete
#define TELOPT_AUTHENTICATION 37/* Authenticate */
[114] Fix | Delete
#define TELOPT_ENCRYPT 38 /* Encryption option */
[115] Fix | Delete
#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
[116] Fix | Delete
#define TELOPT_EXOPL 255 /* extended-options-list */
[117] Fix | Delete
[118] Fix | Delete
[119] Fix | Delete
#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
[120] Fix | Delete
#ifdef TELOPTS
[121] Fix | Delete
char *telopts[NTELOPTS+1] = {
[122] Fix | Delete
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
[123] Fix | Delete
"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
[124] Fix | Delete
"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
[125] Fix | Delete
"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
[126] Fix | Delete
"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
[127] Fix | Delete
"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
[128] Fix | Delete
"TACACS UID", "OUTPUT MARKING", "TTYLOC",
[129] Fix | Delete
"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
[130] Fix | Delete
"LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
[131] Fix | Delete
"ENCRYPT", "NEW-ENVIRON",
[132] Fix | Delete
0,
[133] Fix | Delete
};
[134] Fix | Delete
#define TELOPT_FIRST TELOPT_BINARY
[135] Fix | Delete
#define TELOPT_LAST TELOPT_NEW_ENVIRON
[136] Fix | Delete
#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
[137] Fix | Delete
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
[138] Fix | Delete
#endif
[139] Fix | Delete
[140] Fix | Delete
/* sub-option qualifiers */
[141] Fix | Delete
#define TELQUAL_IS 0 /* option is... */
[142] Fix | Delete
#define TELQUAL_SEND 1 /* send option */
[143] Fix | Delete
#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
[144] Fix | Delete
#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
[145] Fix | Delete
#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
[146] Fix | Delete
[147] Fix | Delete
#define LFLOW_OFF 0 /* Disable remote flow control */
[148] Fix | Delete
#define LFLOW_ON 1 /* Enable remote flow control */
[149] Fix | Delete
#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
[150] Fix | Delete
#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
[151] Fix | Delete
[152] Fix | Delete
/*
[153] Fix | Delete
* LINEMODE suboptions
[154] Fix | Delete
*/
[155] Fix | Delete
[156] Fix | Delete
#define LM_MODE 1
[157] Fix | Delete
#define LM_FORWARDMASK 2
[158] Fix | Delete
#define LM_SLC 3
[159] Fix | Delete
[160] Fix | Delete
#define MODE_EDIT 0x01
[161] Fix | Delete
#define MODE_TRAPSIG 0x02
[162] Fix | Delete
#define MODE_ACK 0x04
[163] Fix | Delete
#define MODE_SOFT_TAB 0x08
[164] Fix | Delete
#define MODE_LIT_ECHO 0x10
[165] Fix | Delete
[166] Fix | Delete
#define MODE_MASK 0x1f
[167] Fix | Delete
[168] Fix | Delete
/* Not part of protocol, but needed to simplify things... */
[169] Fix | Delete
#define MODE_FLOW 0x0100
[170] Fix | Delete
#define MODE_ECHO 0x0200
[171] Fix | Delete
#define MODE_INBIN 0x0400
[172] Fix | Delete
#define MODE_OUTBIN 0x0800
[173] Fix | Delete
#define MODE_FORCE 0x1000
[174] Fix | Delete
[175] Fix | Delete
#define SLC_SYNCH 1
[176] Fix | Delete
#define SLC_BRK 2
[177] Fix | Delete
#define SLC_IP 3
[178] Fix | Delete
#define SLC_AO 4
[179] Fix | Delete
#define SLC_AYT 5
[180] Fix | Delete
#define SLC_EOR 6
[181] Fix | Delete
#define SLC_ABORT 7
[182] Fix | Delete
#define SLC_EOF 8
[183] Fix | Delete
#define SLC_SUSP 9
[184] Fix | Delete
#define SLC_EC 10
[185] Fix | Delete
#define SLC_EL 11
[186] Fix | Delete
#define SLC_EW 12
[187] Fix | Delete
#define SLC_RP 13
[188] Fix | Delete
#define SLC_LNEXT 14
[189] Fix | Delete
#define SLC_XON 15
[190] Fix | Delete
#define SLC_XOFF 16
[191] Fix | Delete
#define SLC_FORW1 17
[192] Fix | Delete
#define SLC_FORW2 18
[193] Fix | Delete
[194] Fix | Delete
#define NSLC 18
[195] Fix | Delete
[196] Fix | Delete
/*
[197] Fix | Delete
* For backwards compatibility, we define SLC_NAMES to be the
[198] Fix | Delete
* list of names if SLC_NAMES is not defined.
[199] Fix | Delete
*/
[200] Fix | Delete
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
[201] Fix | Delete
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
[202] Fix | Delete
"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
[203] Fix | Delete
#ifdef SLC_NAMES
[204] Fix | Delete
char *slc_names[] = {
[205] Fix | Delete
SLC_NAMELIST
[206] Fix | Delete
};
[207] Fix | Delete
#else
[208] Fix | Delete
extern char *slc_names[];
[209] Fix | Delete
#define SLC_NAMES SLC_NAMELIST
[210] Fix | Delete
#endif
[211] Fix | Delete
[212] Fix | Delete
#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
[213] Fix | Delete
#define SLC_NAME(x) slc_names[x]
[214] Fix | Delete
[215] Fix | Delete
#define SLC_NOSUPPORT 0
[216] Fix | Delete
#define SLC_CANTCHANGE 1
[217] Fix | Delete
#define SLC_VARIABLE 2
[218] Fix | Delete
#define SLC_DEFAULT 3
[219] Fix | Delete
#define SLC_LEVELBITS 0x03
[220] Fix | Delete
[221] Fix | Delete
#define SLC_FUNC 0
[222] Fix | Delete
#define SLC_FLAGS 1
[223] Fix | Delete
#define SLC_VALUE 2
[224] Fix | Delete
[225] Fix | Delete
#define SLC_ACK 0x80
[226] Fix | Delete
#define SLC_FLUSHIN 0x40
[227] Fix | Delete
#define SLC_FLUSHOUT 0x20
[228] Fix | Delete
[229] Fix | Delete
#define OLD_ENV_VAR 1
[230] Fix | Delete
#define OLD_ENV_VALUE 0
[231] Fix | Delete
#define NEW_ENV_VAR 0
[232] Fix | Delete
#define NEW_ENV_VALUE 1
[233] Fix | Delete
#define ENV_ESC 2
[234] Fix | Delete
#define ENV_USERVAR 3
[235] Fix | Delete
[236] Fix | Delete
/*
[237] Fix | Delete
* AUTHENTICATION suboptions
[238] Fix | Delete
*/
[239] Fix | Delete
[240] Fix | Delete
/*
[241] Fix | Delete
* Who is authenticating who ...
[242] Fix | Delete
*/
[243] Fix | Delete
#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
[244] Fix | Delete
#define AUTH_WHO_SERVER 1 /* Server authenticating client */
[245] Fix | Delete
#define AUTH_WHO_MASK 1
[246] Fix | Delete
[247] Fix | Delete
/*
[248] Fix | Delete
* amount of authentication done
[249] Fix | Delete
*/
[250] Fix | Delete
#define AUTH_HOW_ONE_WAY 0
[251] Fix | Delete
#define AUTH_HOW_MUTUAL 2
[252] Fix | Delete
#define AUTH_HOW_MASK 2
[253] Fix | Delete
[254] Fix | Delete
#define AUTHTYPE_NULL 0
[255] Fix | Delete
#define AUTHTYPE_KERBEROS_V4 1
[256] Fix | Delete
#define AUTHTYPE_KERBEROS_V5 2
[257] Fix | Delete
#define AUTHTYPE_SPX 3
[258] Fix | Delete
#define AUTHTYPE_MINK 4
[259] Fix | Delete
#define AUTHTYPE_CNT 5
[260] Fix | Delete
[261] Fix | Delete
#define AUTHTYPE_TEST 99
[262] Fix | Delete
[263] Fix | Delete
#ifdef AUTH_NAMES
[264] Fix | Delete
char *authtype_names[] = {
[265] Fix | Delete
"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
[266] Fix | Delete
};
[267] Fix | Delete
#else
[268] Fix | Delete
extern char *authtype_names[];
[269] Fix | Delete
#endif
[270] Fix | Delete
[271] Fix | Delete
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
[272] Fix | Delete
#define AUTHTYPE_NAME(x) authtype_names[x]
[273] Fix | Delete
[274] Fix | Delete
/*
[275] Fix | Delete
* ENCRYPTion suboptions
[276] Fix | Delete
*/
[277] Fix | Delete
#define ENCRYPT_IS 0 /* I pick encryption type ... */
[278] Fix | Delete
#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
[279] Fix | Delete
#define ENCRYPT_REPLY 2 /* Initial setup response */
[280] Fix | Delete
#define ENCRYPT_START 3 /* Am starting to send encrypted */
[281] Fix | Delete
#define ENCRYPT_END 4 /* Am ending encrypted */
[282] Fix | Delete
#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
[283] Fix | Delete
#define ENCRYPT_REQEND 6 /* Request you send encrypting */
[284] Fix | Delete
#define ENCRYPT_ENC_KEYID 7
[285] Fix | Delete
#define ENCRYPT_DEC_KEYID 8
[286] Fix | Delete
#define ENCRYPT_CNT 9
[287] Fix | Delete
[288] Fix | Delete
#define ENCTYPE_ANY 0
[289] Fix | Delete
#define ENCTYPE_DES_CFB64 1
[290] Fix | Delete
#define ENCTYPE_DES_OFB64 2
[291] Fix | Delete
#define ENCTYPE_CNT 3
[292] Fix | Delete
[293] Fix | Delete
#ifdef ENCRYPT_NAMES
[294] Fix | Delete
char *encrypt_names[] = {
[295] Fix | Delete
"IS", "SUPPORT", "REPLY", "START", "END",
[296] Fix | Delete
"REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
[297] Fix | Delete
0,
[298] Fix | Delete
};
[299] Fix | Delete
char *enctype_names[] = {
[300] Fix | Delete
"ANY", "DES_CFB64", "DES_OFB64", 0,
[301] Fix | Delete
};
[302] Fix | Delete
#else
[303] Fix | Delete
extern char *encrypt_names[];
[304] Fix | Delete
extern char *enctype_names[];
[305] Fix | Delete
#endif
[306] Fix | Delete
[307] Fix | Delete
[308] Fix | Delete
#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
[309] Fix | Delete
#define ENCRYPT_NAME(x) encrypt_names[x]
[310] Fix | Delete
[311] Fix | Delete
#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
[312] Fix | Delete
#define ENCTYPE_NAME(x) enctype_names[x]
[313] Fix | Delete
[314] Fix | Delete
#endif /* arpa/telnet.h */
[315] Fix | Delete
[316] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function