Annotation of 43BSDTahoe/ucb/tn3270/arpa/telnet.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.