Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

telnet.h

Go to the documentation of this file.
00001 /*  @(#)telnet.h 1.7 88/08/19 SMI; from UCB 5.1 5/30/85 */
00002 /*
00003  * Copyright (c) 1983 Regents of the University of California.
00004  * All rights reserved.  The Berkeley software License Agreement
00005  * specifies the terms and conditions for redistribution.
00006  */
00007 
00008 /*
00009  * Definitions for the TELNET protocol.
00010  */
00011 
00012 #ifndef _arpa_telnet_h
00013 #define _arpa_telnet_h
00014 
00015 #define IAC 255     /* interpret as command: */
00016 #define DONT    254     /* you are not to use option */
00017 #define DO  253     /* please, you use option */
00018 #define WONT    252     /* I won't use option */
00019 #define WILL    251     /* I will use option */
00020 #define SB  250     /* interpret as subnegotiation */
00021 #define GA  249     /* you may reverse the line */
00022 #define EL  248     /* erase the current line */
00023 #define EC  247     /* erase the current character */
00024 #define AYT 246     /* are you there */
00025 #define AO  245     /* abort output--but let prog finish */
00026 #define IP  244     /* interrupt process--permanently */
00027 #define BREAK   243     /* break */
00028 #define DM  242     /* data mark--for connect. cleaning */
00029 #define NOP 241     /* nop */
00030 #define SE  240     /* end sub negotiation */
00031 #define EOR     239             /* end of record (transparent mode) */
00032 
00033 #define SYNCH   242     /* for telfunc calls */
00034 
00035 #ifdef TELCMDS
00036 char *telcmds[] = {
00037     "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
00038     "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
00039 };
00040 #endif
00041 
00042 /* telnet options */
00043 #define TELOPT_BINARY   0   /* 8-bit data path */
00044 #define TELOPT_ECHO 1   /* echo */
00045 #define TELOPT_RCP  2   /* prepare to reconnect */
00046 #define TELOPT_SGA  3   /* suppress go ahead */
00047 #define TELOPT_NAMS 4   /* approximate message size */
00048 #define TELOPT_STATUS   5   /* give status */
00049 #define TELOPT_TM   6   /* timing mark */
00050 #define TELOPT_RCTE 7   /* remote controlled transmission and echo */
00051 #define TELOPT_NAOL     8   /* negotiate about output line width */
00052 #define TELOPT_NAOP     9   /* negotiate about output page size */
00053 #define TELOPT_NAOCRD   10  /* negotiate about CR disposition */
00054 #define TELOPT_NAOHTS   11  /* negotiate about horizontal tabstops */
00055 #define TELOPT_NAOHTD   12  /* negotiate about horizontal tab disposition */
00056 #define TELOPT_NAOFFD   13  /* negotiate about formfeed disposition */
00057 #define TELOPT_NAOVTS   14  /* negotiate about vertical tab stops */
00058 #define TELOPT_NAOVTD   15  /* negotiate about vertical tab disposition */
00059 #define TELOPT_NAOLFD   16  /* negotiate about output LF disposition */
00060 #define TELOPT_XASCII   17  /* extended ascic character set */
00061 #define TELOPT_LOGOUT   18  /* force logout */
00062 #define TELOPT_BM   19  /* byte macro */
00063 #define TELOPT_DET  20  /* data entry terminal */
00064 #define TELOPT_SUPDUP   21  /* supdup protocol */
00065 #define TELOPT_SUPDUPOUTPUT 22  /* supdup output */
00066 #define TELOPT_SNDLOC   23  /* send location */
00067 #define TELOPT_TTYPE    24  /* terminal type */
00068 #define TELOPT_EOR  25  /* end or record */
00069 #define TELOPT_EXOPL    255 /* extended-options-list */
00070 
00071 #ifdef TELOPTS
00072 #define NTELOPTS    (1+TELOPT_EOR)
00073 char *telopts[NTELOPTS] = {
00074     "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
00075     "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
00076     "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
00077     "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
00078     "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
00079     "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
00080 };
00081 #endif
00082 
00083 /* sub-option qualifiers */
00084 #define TELQUAL_IS  0   /* option is... */
00085 #define TELQUAL_SEND    1   /* send option */
00086 
00087 #endif 

Generated on Thu Jan 13 21:48:14 2005 for Beyond the Shadows by  doxygen 1.4.0