1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.
   4:  *
   5:  * Redistribution and use in source and binary forms are permitted
   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.
  16:  *
  17:  *	@(#)telnet.h	5.4 (Berkeley) 2/15/89
  18:  */
  19: 
  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 */
  39: #define EOR     239             /* end of record (transparent mode) */
  40: 
  41: #define SYNCH   242     /* for telfunc calls */
  42: 
  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
  49: 
  50: /* telnet options */
  51: #define TELOPT_BINARY   0   /* 8-bit data path */
  52: #define TELOPT_ECHO 1   /* echo */
  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 */
  73: #define TELOPT_SUPDUPOUTPUT 22  /* supdup output */
  74: #define TELOPT_SNDLOC   23  /* send location */
  75: #define TELOPT_TTYPE    24  /* terminal type */
  76: #define TELOPT_EOR  25  /* end or record */
  77: #define TELOPT_TUID 26  /* TACACS user identification */
  78: #define TELOPT_OUTMRK   27  /* output marking */
  79: #define TELOPT_TTYLOC   28  /* terminal location number */
  80: #define TELOPT_3270REGIME 29    /* 3270 regime */
  81: #define TELOPT_X3PAD    30  /* X.3 PAD */
  82: #define TELOPT_NAWS 31  /* window size */
  83: #define TELOPT_TSPEED   32  /* terminal speed */
  84: #define TELOPT_LFLOW    33  /* remote flow control */
  85: #define TELOPT_EXOPL    255 /* extended-options-list */
  86: 
  87: #ifdef TELOPTS
  88: #define NTELOPTS    (1+TELOPT_LFLOW)
  89: char *telopts[NTELOPTS] = {
  90:     "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
  91:     "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
  92:     "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
  93:     "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
  94:     "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
  95:     "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
  96:     "TACACS UID", "OUTPUT MARKING", "TTYLOC",
  97:     "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
  98: };
  99: #endif
 100: 
 101: /* sub-option qualifiers */
 102: #define TELQUAL_IS  0   /* option is... */
 103: #define TELQUAL_SEND    1   /* send option */

Defined variables

telcmds defined in line 44; used 5 times

Defined macros

AO defined in line 33; used 2 times
AYT defined in line 32; used 3 times
EC defined in line 31; used 5 times
EL defined in line 30; used 4 times
EOR defined in line 39; used 1 times
GA defined in line 29; used 1 times
IP defined in line 34; used 12 times
NOP defined in line 37; used 1 times
NTELOPTS defined in line 88; used 2 times
SYNCH defined in line 41; used 1 times
TELOPT_3270REGIME defined in line 80; used 1 times
TELOPT_BM defined in line 70; never used
TELOPT_DET defined in line 71; never used
TELOPT_EOR defined in line 76; never used
TELOPT_EXOPL defined in line 85; never used
TELOPT_LFLOW defined in line 84; used 2 times
TELOPT_LOGOUT defined in line 69; never used
TELOPT_NAMS defined in line 55; never used
TELOPT_NAOCRD defined in line 61; never used
TELOPT_NAOFFD defined in line 64; never used
TELOPT_NAOHTD defined in line 63; never used
TELOPT_NAOHTS defined in line 62; never used
TELOPT_NAOL defined in line 59; never used
TELOPT_NAOLFD defined in line 67; never used
TELOPT_NAOP defined in line 60; never used
TELOPT_NAOVTD defined in line 66; never used
TELOPT_NAOVTS defined in line 65; never used
TELOPT_NAWS defined in line 82; used 1 times
TELOPT_OUTMRK defined in line 78; used 1 times
TELOPT_RCP defined in line 53; never used
TELOPT_RCTE defined in line 58; never used
TELOPT_SNDLOC defined in line 74; never used
TELOPT_STATUS defined in line 56; used 1 times
TELOPT_SUPDUP defined in line 72; used 1 times
TELOPT_SUPDUPOUTPUT defined in line 73; never used
TELOPT_TM defined in line 57; used 4 times
TELOPT_TSPEED defined in line 83; used 1 times
TELOPT_TTYLOC defined in line 79; used 1 times
TELOPT_TUID defined in line 77; used 1 times
TELOPT_X3PAD defined in line 81; used 1 times
TELOPT_XASCII defined in line 68; never used

Usage of this include

Last modified: 1989-03-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 4617
Valid CSS Valid XHTML 1.0 Strict