home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / arpa / h / telnet < prev    next >
Encoding:
Text File  |  1995-01-11  |  4.1 KB  |  99 lines

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