138905Sborman /* 238905Sborman * Copyright (c) 1989 The Regents of the University of California. 338905Sborman * All rights reserved. 438905Sborman * 542673Sbostic * %sccs.include.redist.c% 638905Sborman * 7*57212Sdab * @(#)ext.h 5.8 (Berkeley) 12/18/92 838905Sborman */ 938905Sborman 1038905Sborman /* 1138905Sborman * Telnet server variable declarations 1238905Sborman */ 1344364Sborman extern char options[256]; 1439503Sborman extern char do_dont_resp[256]; 1539503Sborman extern char will_wont_resp[256]; 1638905Sborman extern int linemode; /* linemode on/off */ 1738905Sborman #ifdef LINEMODE 1838905Sborman extern int uselinemode; /* what linemode to use (on/off) */ 1938905Sborman extern int editmode; /* edit modes in use */ 2038905Sborman extern int useeditmode; /* edit modes to use */ 2138905Sborman extern int alwayslinemode; /* command line option */ 2238905Sborman # ifdef KLUDGELINEMODE 2338905Sborman extern int lmodetype; /* Client support for linemode */ 2438905Sborman # endif /* KLUDGELINEMODE */ 2538905Sborman #endif /* LINEMODE */ 2638905Sborman extern int flowmode; /* current flow control state */ 27*57212Sdab extern int restartany; /* restart output on any character state */ 2844364Sborman #ifdef DIAGNOSTICS 2944364Sborman extern int diagnostic; /* telnet diagnostic capabilities */ 3044364Sborman #endif /* DIAGNOSTICS */ 3144364Sborman #ifdef BFTPDAEMON 3244364Sborman extern int bftpd; /* behave as bftp daemon */ 3344364Sborman #endif /* BFTPDAEMON */ 3446809Sdab #if defined(SecurID) 3546809Sdab extern int require_SecurID; 3646809Sdab #endif 37*57212Sdab #if defined(AUTHENTICATION) 3846809Sdab extern int auth_level; 3946809Sdab #endif 4038905Sborman 4138905Sborman extern slcfun slctab[NSLC + 1]; /* slc mapping table */ 4238905Sborman 4338905Sborman char *terminaltype; 4438905Sborman 4538905Sborman /* 4638905Sborman * I/O data buffers, pointers, and counters. 4738905Sborman */ 4838905Sborman extern char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; 4938905Sborman 5038905Sborman extern char netibuf[BUFSIZ], *netip; 5138905Sborman 5238905Sborman extern char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp; 5338905Sborman extern char *neturg; /* one past last bye of urgent data */ 5438905Sborman 5538905Sborman extern int pcc, ncc; 5638905Sborman 5740242Sborman #if defined(CRAY2) && defined(UNICOS5) 5839531Sborman extern int unpcc; /* characters left unprocessed by CRAY-2 terminal routine */ 5939531Sborman extern char *unptyip; /* pointer to remaining characters in buffer */ 6039531Sborman #endif 6139531Sborman 6238905Sborman extern int pty, net; 6338905Sborman extern char *line; 6438905Sborman extern int SYNCHing; /* we are in TELNET SYNCH mode */ 6538905Sborman 6646809Sdab #ifndef P 6746809Sdab # ifdef __STDC__ 6846809Sdab # define P(x) x 6946809Sdab # else 7046809Sdab # define P(x) () 7146809Sdab # endif 7246809Sdab #endif 7346809Sdab 7446809Sdab extern void 7546809Sdab _termstat P((void)), 7646809Sdab add_slc P((int, int, int)), 7746809Sdab check_slc P((void)), 7846809Sdab change_slc P((int, int, int)), 7946809Sdab cleanup P((int)), 8046809Sdab clientstat P((int, int, int)), 8146809Sdab copy_termbuf P((char *, int)), 8246809Sdab deferslc P((void)), 8346809Sdab defer_terminit P((void)), 8446809Sdab do_opt_slc P((unsigned char *, int)), 8546809Sdab doeof P((void)), 8646809Sdab dooption P((int)), 8746809Sdab dontoption P((int)), 8846809Sdab edithost P((char *, char *)), 8946809Sdab fatal P((int, char *)), 9046809Sdab fatalperror P((int, char *)), 9146809Sdab get_slc_defaults P((void)), 9246809Sdab init_env P((void)), 9346809Sdab init_termbuf P((void)), 9446809Sdab interrupt P((void)), 9546809Sdab localstat P((void)), 9646809Sdab netclear P((void)), 9746809Sdab netflush P((void)), 9844364Sborman #ifdef DIAGNOSTICS 9946809Sdab printoption P((char *, int)), 10046809Sdab printdata P((char *, char *, int)), 10146809Sdab printsub P((int, unsigned char *, int)), 10244364Sborman #endif 10346809Sdab ptyflush P((void)), 10446809Sdab putchr P((int)), 10546809Sdab putf P((char *, char *)), 10646809Sdab recv_ayt P((void)), 10746809Sdab send_do P((int, int)), 10846809Sdab send_dont P((int, int)), 10946809Sdab send_slc P((void)), 11046809Sdab send_status P((void)), 11146809Sdab send_will P((int, int)), 11246809Sdab send_wont P((int, int)), 11346809Sdab sendbrk P((void)), 11446809Sdab sendsusp P((void)), 11546809Sdab set_termbuf P((void)), 11646809Sdab start_login P((char *, int, char *)), 11746809Sdab start_slc P((int)), 118*57212Sdab #if defined(AUTHENTICATION) 11946809Sdab start_slave P((char *)), 12046809Sdab #else 12146809Sdab start_slave P((char *, int, char *)), 12246809Sdab #endif 12346809Sdab suboption P((void)), 12446809Sdab telrcv P((void)), 12546809Sdab ttloop P((void)), 12646809Sdab tty_binaryin P((int)), 12746809Sdab tty_binaryout P((int)); 12844364Sborman 12946809Sdab extern int 13046809Sdab end_slc P((unsigned char **)), 13146809Sdab getnpty P((void)), 13246809Sdab getpty P((void)), 13346809Sdab login_tty P((int)), 13446809Sdab spcset P((int, cc_t *, cc_t **)), 13546809Sdab stilloob P((int)), 13646809Sdab terminit P((void)), 13746809Sdab termstat P((void)), 13846809Sdab tty_flowmode P((void)), 139*57212Sdab tty_restartany P((void)), 14046809Sdab tty_isbinaryin P((void)), 14146809Sdab tty_isbinaryout P((void)), 14246809Sdab tty_iscrnl P((void)), 14346809Sdab tty_isecho P((void)), 14446809Sdab tty_isediting P((void)), 14546809Sdab tty_islitecho P((void)), 14646809Sdab tty_isnewmap P((void)), 14746809Sdab tty_israw P((void)), 14846809Sdab tty_issofttab P((void)), 14946809Sdab tty_istrapsig P((void)), 15046809Sdab tty_linemode P((void)); 15146809Sdab 15246809Sdab extern void 15346809Sdab tty_rspeed P((int)), 15446809Sdab tty_setecho P((int)), 15546809Sdab tty_setedit P((int)), 15646809Sdab tty_setlinemode P((int)), 15746809Sdab tty_setlitecho P((int)), 15846809Sdab tty_setsig P((int)), 15946809Sdab tty_setsofttab P((int)), 16046809Sdab tty_tspeed P((int)), 16146809Sdab willoption P((int)), 16246809Sdab wontoption P((int)), 16346809Sdab writenet P((unsigned char *, int)); 16446809Sdab 165*57212Sdab #if defined(ENCRYPTION) 16646809Sdab extern void (*encrypt_output) P((unsigned char *, int)); 16746809Sdab extern int (*decrypt_input) P((int)); 16846809Sdab extern char *nclearto; 16946809Sdab #endif 17046809Sdab 17146809Sdab 17238905Sborman /* 17338905Sborman * The following are some clocks used to decide how to interpret 17438905Sborman * the relationship between various variables. 17538905Sborman */ 17638905Sborman 17738905Sborman extern struct { 17838905Sborman int 17938905Sborman system, /* what the current time is */ 18038905Sborman echotoggle, /* last time user entered echo character */ 18138905Sborman modenegotiated, /* last time operating mode negotiated */ 18238905Sborman didnetreceive, /* last time we read data from network */ 18338905Sborman ttypesubopt, /* ttype subopt is received */ 18438905Sborman tspeedsubopt, /* tspeed subopt is received */ 18544364Sborman environsubopt, /* environ subopt is received */ 18644364Sborman xdisplocsubopt, /* xdisploc subopt is received */ 18738905Sborman baseline, /* time started to do timed action */ 18838905Sborman gotDM; /* when did we last see a data mark */ 18938905Sborman } clocks; 19038905Sborman 19138905Sborman 19240242Sborman #if defined(CRAY2) && defined(UNICOS5) 19338905Sborman extern int needtermstat; 19438905Sborman #endif 19538905Sborman 196*57212Sdab #ifndef DEFAULT_IM 197*57212Sdab # ifdef CRAY 198*57212Sdab # define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r" 199*57212Sdab # else 200*57212Sdab # ifdef sun 201*57212Sdab # define DEFAULT_IM "\r\n\r\nSunOS UNIX (%h) (%t)\r\n\r\r\n\r" 202*57212Sdab # else 203*57212Sdab # ifdef ultrix 204*57212Sdab # define DEFAULT_IM "\r\n\r\nULTRIX (%h) (%t)\r\n\r\r\n\r" 205*57212Sdab # else 206*57212Sdab # define DEFAULT_IM "\r\n\r\n4.4 BSD UNIX (%h) (%t)\r\n\r\r\n\r" 207*57212Sdab # endif 208*57212Sdab # endif 209*57212Sdab # endif 21038905Sborman #endif 211