Annotation of sbbs/src/sbbs3/telnet.h, revision 1.1.1.1

1.1       root        1: /* telnet.h */
                      2: 
                      3: /* Synchronet telnet-related constants and function prototypes */
                      4: 
                      5: /* $Id: telnet.h,v 1.11 2005/06/06 22:06:22 rswindell Exp $ */
                      6: 
                      7: /****************************************************************************
                      8:  * @format.tab-size 4          (Plain Text/Source Code File Header)                    *
                      9:  * @format.use-tabs true       (see http://www.synchro.net/ptsc_hdr.html)              *
                     10:  *                                                                                                                                                     *
                     11:  * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html         *
                     12:  *                                                                                                                                                     *
                     13:  * This program is free software; you can redistribute it and/or                       *
                     14:  * modify it under the terms of the GNU General Public License                         *
                     15:  * as published by the Free Software Foundation; either version 2                      *
                     16:  * of the License, or (at your option) any later version.                                      *
                     17:  * See the GNU General Public License for more details: gpl.txt or                     *
                     18:  * http://www.fsf.org/copyleft/gpl.html                                                                                *
                     19:  *                                                                                                                                                     *
                     20:  * Anonymous FTP access to the most recent released source is available at     *
                     21:  * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net     *
                     22:  *                                                                                                                                                     *
                     23:  * Anonymous CVS access to the development source and modification history     *
                     24:  * is available at cvs.synchro.net:/cvsroot/sbbs, example:                                     *
                     25:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs login                       *
                     26:  *     (just hit return, no password is necessary)                                                     *
                     27:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src                *
                     28:  *                                                                                                                                                     *
                     29:  * For Synchronet coding style and modification guidelines, see                                *
                     30:  * http://www.synchro.net/source.html                                                                          *
                     31:  *                                                                                                                                                     *
                     32:  * You are encouraged to submit any modifications (preferably in Unix diff     *
                     33:  * format) via e-mail to [email protected]                                                                      *
                     34:  *                                                                                                                                                     *
                     35:  * Note: If this box doesn't appear square, then you need to fix your tabs.    *
                     36:  ****************************************************************************/
                     37: 
                     38: #ifndef _TELNET_H
                     39: #define _TELNET_H
                     40: 
                     41: #include "gen_defs.h"  /* uchar */
                     42: 
                     43: /* commands */
                     44: 
                     45: #define TELNET_IAC             255     /* 0xff - Interpret as command */
                     46: #define TELNET_DONT            254 /* 0xfe - Don't do option */
                     47: #define TELNET_DO      253 /* 0xfd - Do option */
                     48: #define TELNET_WONT    252 /* 0xfc - Won't do option */
                     49: #define TELNET_WILL    251 /* 0xfb - Will do option */
                     50: 
                     51: #define TELNET_SB       250    /* sub-negotiation */
                     52: #define TELNET_GA              249     /* Go ahead */
                     53: #define TELNET_EL              248 /* Erase line */
                     54: #define TELNET_EC              247 /* Erase char */
                     55: #define TELNET_AYT             246 /* Are you there? */
                     56: #define TELNET_AO              245 /* Abort output */
                     57: #define TELNET_IP              244 /* Interrupt process */
                     58: #define TELNET_BRK             243 /* Break */
                     59: #define TELNET_SYNC            242 /* Data mark */
                     60: #define TELNET_NOP             241 /* No operation */
                     61: 
                     62: #define TELNET_SE       240 /*  End of subnegotiation parameters. */
                     63: 
                     64: /* options */
                     65: 
                     66: enum {
                     67:         TELNET_BINARY_TX
                     68:        ,TELNET_ECHO
                     69:        ,TELNET_RECONN
                     70:        ,TELNET_SUP_GA          /* suppress go ahead */
                     71:        ,TELNET_APPROX_MSG_SIZE
                     72:        ,TELNET_STATUS
                     73:        ,TELNET_TIMING_MARK
                     74:        ,TELNET_REMOTE_CTRL
                     75:        ,TELNET_OUTPUT_LINE_WIDTH
                     76:        ,TELNET_OUTPUT_PAGE_SIZE
                     77:        ,TELNET_OUTPUT_CR_DISP          /* 10 */
                     78:        ,TELNET_OUTPUT_HTAB_STOPS
                     79:        ,TELNET_OUTPUT_HTAB_DISP
                     80:        ,TELNET_OUTPUT_FF_DISP
                     81:        ,TELNET_OUTPUT_VTAB_STOPS
                     82:        ,TELNET_OUTPUT_VTAB_DISP
                     83:        ,TELNET_OUTPUT_LF_DISP
                     84:        ,TELNET_EXASCII
                     85:        ,TELNET_LOGOUT
                     86:        ,TELNET_BYTE_MACRO
                     87:        ,TELNET_DATA_ENTRY_TERM         /* 20 */
                     88:        ,TELNET_SUPDUP
                     89:        ,TELNET_SUPDUP_OUTPUT
                     90:        ,TELNET_SEND_LOCATION
                     91:        ,TELNET_TERM_TYPE
                     92:        ,TELNET_END_OF_RECORD
                     93:        ,TELNET_TACACS_USERID
                     94:        ,TELNET_OUTPUT_MARKING
                     95:        ,TELNET_TERM_LOCATION_NUMBER
                     96:        ,TELNET_3270
                     97:        ,TELNET_X3_PAD                          /* 30 */
                     98:        ,TELNET_NEGOTIATE_WINDOW_SIZE
                     99:        ,TELNET_TERM_SPEED
                    100:        ,TELNET_REMOTE_FLOW
                    101:        ,TELNET_LINE_MODE
                    102:        ,TELNET_X_DISPLAY_LOCATION
                    103:        ,TELNET_ENV_OPTION
                    104:        ,TELNET_AUTH_OPTION
                    105:        ,TELNET_ENCRYPTION_OPTION
                    106:        ,TELNET_NEW_ENV_OPTION          
                    107:        ,TELNET_3270E                           /* 40 */
                    108: 
                    109:        ,TELNET_EXOPL=255       /* Extended options list */
                    110: };
                    111: 
                    112: /* Terminal-type sub option codes, see RFC 1091 */
                    113: #define TELNET_TERM_IS         0
                    114: #define TELNET_TERM_SEND       1
                    115: #define TELNET_TERM_MAXLEN     40
                    116: 
                    117: /* bits for telnet_mode */   
                    118:    
                    119: #define TELNET_MODE_GATE       (1<<2)  /* Pass-through telnet commands/responses */
                    120: #define TELNET_MODE_OFF                (1<<3)  /* This is not a Telnet connection */
                    121: 
                    122: #ifdef DLLEXPORT
                    123: #undef DLLEXPORT
                    124: #endif
                    125: #ifdef DLLCALL
                    126: #undef DLLCALL
                    127: #endif
                    128: 
                    129: #ifdef _WIN32
                    130:        #ifdef SBBS_EXPORTS
                    131:                #define DLLEXPORT __declspec(dllexport)
                    132:        #else
                    133:                #define DLLEXPORT __declspec(dllimport)
                    134:        #endif
                    135:        #ifdef __BORLANDC__
                    136:                #define DLLCALL __stdcall
                    137:        #else
                    138:                #define DLLCALL
                    139:        #endif
                    140: #else
                    141:        #define DLLEXPORT
                    142:        #define DLLCALL
                    143: #endif
                    144: 
                    145: #ifdef __cplusplus  
                    146: extern "C" {   
                    147: #endif   
                    148: 
                    149: DLLEXPORT const char* DLLCALL telnet_cmd_desc(uchar cmd);   
                    150: DLLEXPORT const char* DLLCALL telnet_opt_desc(uchar opt);
                    151: DLLEXPORT              uchar DLLCALL telnet_opt_ack(uchar cmd);
                    152: DLLEXPORT              uchar DLLCALL telnet_opt_nak(uchar cmd);
                    153: 
                    154: #ifdef __cplusplus
                    155: }
                    156: #endif
                    157: 
                    158: #endif /* don't add anything after this line */

unix.superglobalmegacorp.com

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