BSD 4_3 release
[unix-history] / usr / include / arpa / telnet.h
index cb431b6..1c5b435 100644 (file)
@@ -1,4 +1,11 @@
-/*     telnet.h        4.4     82/03/16        */
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)telnet.h    5.1 (Berkeley) 5/30/85
+ */
+
 /*
  * Definitions for the TELNET protocol.
  */
 /*
  * Definitions for the TELNET protocol.
  */
 #define        DM      242             /* data mark--for connect. cleaning */
 #define        NOP     241             /* nop */
 #define        SE      240             /* end sub negotiation */
 #define        DM      242             /* data mark--for connect. cleaning */
 #define        NOP     241             /* nop */
 #define        SE      240             /* end sub negotiation */
+#define EOR     239             /* end of record (transparent mode) */
 
 #define SYNCH  242             /* for telfunc calls */
 
 
 #define SYNCH  242             /* for telfunc calls */
 
-/* telnet options */
+#ifdef TELCMDS
+char *telcmds[] = {
+       "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
+       "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
+};
+#endif
 
 
+/* telnet options */
 #define TELOPT_BINARY  0       /* 8-bit data path */
 #define TELOPT_ECHO    1       /* echo */
 #define        TELOPT_RCP      2       /* prepare to reconnect */
 #define TELOPT_BINARY  0       /* 8-bit data path */
 #define TELOPT_ECHO    1       /* echo */
 #define        TELOPT_RCP      2       /* prepare to reconnect */
 #define        TELOPT_BM       19      /* byte macro */
 #define        TELOPT_DET      20      /* data entry terminal */
 #define        TELOPT_SUPDUP   21      /* supdup protocol */
 #define        TELOPT_BM       19      /* byte macro */
 #define        TELOPT_DET      20      /* data entry terminal */
 #define        TELOPT_SUPDUP   21      /* supdup protocol */
+#define        TELOPT_SUPDUPOUTPUT 22  /* supdup output */
+#define        TELOPT_SNDLOC   23      /* send location */
+#define        TELOPT_TTYPE    24      /* terminal type */
+#define        TELOPT_EOR      25      /* end or record */
 #define TELOPT_EXOPL   255     /* extended-options-list */
 
 #define TELOPT_EXOPL   255     /* extended-options-list */
 
-#ifdef TELCMDS
-char *telcmds[] = {
-       "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
-       "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
-};
-#endif
-
 #ifdef TELOPTS
 #ifdef TELOPTS
-char *telopts[] = {
+#define        NTELOPTS        (1+TELOPT_EOR)
+char *telopts[NTELOPTS] = {
        "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
        "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
        "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
        "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
        "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
        "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
        "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
        "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
-       "DATA ENTRY TERMINAL", "SUPDUP"
+       "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
+       "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
 };
 #endif
 };
 #endif
+
+/* sub-option qualifiers */
+#define        TELQUAL_IS      0       /* option is... */
+#define        TELQUAL_SEND    1       /* send option */