1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)telnet.h	5.1 (Berkeley) 5/30/85
   7:  */
   8: 
   9: /*
  10:  * Definitions for the TELNET protocol.
  11:  */
  12: #define IAC 255     /* interpret as command: */
  13: #define DONT    254     /* you are not to use option */
  14: #define DO  253     /* please, you use option */
  15: #define WONT    252     /* I won't use option */
  16: #define WILL    251     /* I will use option */
  17: #define SB  250     /* interpret as subnegotiation */
  18: #define GA  249     /* you may reverse the line */
  19: #define EL  248     /* erase the current line */
  20: #define EC  247     /* erase the current character */
  21: #define AYT 246     /* are you there */
  22: #define AO  245     /* abort output--but let prog finish */
  23: #define IP  244     /* interrupt process--permanently */
  24: #define BREAK   243     /* break */
  25: #define DM  242     /* data mark--for connect. cleaning */
  26: #define NOP 241     /* nop */
  27: #define SE  240     /* end sub negotiation */
  28: #define EOR     239             /* end of record (transparent mode) */
  29: 
  30: #define SYNCH   242     /* for telfunc calls */
  31: 
  32: #ifdef TELCMDS
  33: char *telcmds[] = {
  34:     "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
  35:     "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
  36: };
  37: #endif
  38: 
  39: /* telnet options */
  40: #define TELOPT_BINARY   0   /* 8-bit data path */
  41: #define TELOPT_ECHO 1   /* echo */
  42: #define TELOPT_RCP  2   /* prepare to reconnect */
  43: #define TELOPT_SGA  3   /* suppress go ahead */
  44: #define TELOPT_NAMS 4   /* approximate message size */
  45: #define TELOPT_STATUS   5   /* give status */
  46: #define TELOPT_TM   6   /* timing mark */
  47: #define TELOPT_RCTE 7   /* remote controlled transmission and echo */
  48: #define TELOPT_NAOL     8   /* negotiate about output line width */
  49: #define TELOPT_NAOP     9   /* negotiate about output page size */
  50: #define TELOPT_NAOCRD   10  /* negotiate about CR disposition */
  51: #define TELOPT_NAOHTS   11  /* negotiate about horizontal tabstops */
  52: #define TELOPT_NAOHTD   12  /* negotiate about horizontal tab disposition */
  53: #define TELOPT_NAOFFD   13  /* negotiate about formfeed disposition */
  54: #define TELOPT_NAOVTS   14  /* negotiate about vertical tab stops */
  55: #define TELOPT_NAOVTD   15  /* negotiate about vertical tab disposition */
  56: #define TELOPT_NAOLFD   16  /* negotiate about output LF disposition */
  57: #define TELOPT_XASCII   17  /* extended ascic character set */
  58: #define TELOPT_LOGOUT   18  /* force logout */
  59: #define TELOPT_BM   19  /* byte macro */
  60: #define TELOPT_DET  20  /* data entry terminal */
  61: #define TELOPT_SUPDUP   21  /* supdup protocol */
  62: #define TELOPT_SUPDUPOUTPUT 22  /* supdup output */
  63: #define TELOPT_SNDLOC   23  /* send location */
  64: #define TELOPT_TTYPE    24  /* terminal type */
  65: #define TELOPT_EOR  25  /* end or record */
  66: #define TELOPT_EXOPL    255 /* extended-options-list */
  67: 
  68: #ifdef TELOPTS
  69: #define NTELOPTS    (1+TELOPT_EOR)
  70: char *telopts[NTELOPTS] = {
  71:     "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
  72:     "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
  73:     "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
  74:     "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
  75:     "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
  76:     "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
  77: };
  78: #endif
  79: 
  80: /* sub-option qualifiers */
  81: #define TELQUAL_IS  0   /* option is... */
  82: #define TELQUAL_SEND    1   /* send option */

Defined variables

telcmds defined in line 33; never used
telopts defined in line 70; used 4 times

Defined macros

AO defined in line 22; used 2 times
AYT defined in line 21; used 1 times
BREAK defined in line 24; used 3 times
DM defined in line 25; used 7 times
DO defined in line 14; used 5 times
EC defined in line 20; used 5 times
EL defined in line 19; used 4 times
EOR defined in line 28; used 1 times
GA defined in line 18; used 1 times
IAC defined in line 12; used 73 times
IP defined in line 23; used 10 times
NOP defined in line 26; used 1 times
NTELOPTS defined in line 69; used 1 times
  • in line 70
SB defined in line 17; used 3 times
SE defined in line 27; used 8 times
SYNCH defined in line 30; used 1 times
TELOPT_BINARY defined in line 40; used 4 times
TELOPT_BM defined in line 59; never used
TELOPT_DET defined in line 60; never used
TELOPT_ECHO defined in line 41; used 13 times
TELOPT_EOR defined in line 65; used 1 times
  • in line 69
TELOPT_EXOPL defined in line 66; never used
TELOPT_LOGOUT defined in line 58; never used
TELOPT_NAMS defined in line 44; never used
TELOPT_NAOCRD defined in line 50; never used
TELOPT_NAOFFD defined in line 53; never used
TELOPT_NAOHTD defined in line 52; never used
TELOPT_NAOHTS defined in line 51; never used
TELOPT_NAOL defined in line 48; never used
TELOPT_NAOLFD defined in line 56; never used
TELOPT_NAOP defined in line 49; never used
TELOPT_NAOVTD defined in line 55; never used
TELOPT_NAOVTS defined in line 54; never used
TELOPT_RCP defined in line 42; never used
TELOPT_RCTE defined in line 47; never used
TELOPT_SGA defined in line 43; used 9 times
TELOPT_SNDLOC defined in line 63; never used
TELOPT_STATUS defined in line 45; never used
TELOPT_SUPDUP defined in line 61; used 1 times
TELOPT_SUPDUPOUTPUT defined in line 62; never used
TELOPT_TM defined in line 46; used 4 times
TELOPT_TTYPE defined in line 64; used 12 times
TELOPT_XASCII defined in line 57; never used
TELQUAL_IS defined in line 81; used 3 times
WILL defined in line 16; used 3 times

Usage of this include

Last modified: 1985-06-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1952
Valid CSS Valid XHTML 1.0 Strict