138905Sborman /* 261451Sbostic * Copyright (c) 1989, 1993 361451Sbostic * The Regents of the University of California. All rights reserved. 438905Sborman * 542673Sbostic * %sccs.include.redist.c% 638905Sborman * 7*65158Sdab * @(#)ext.h 8.2 (Berkeley) 12/15/93 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 */ 2757212Sdab 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 3757212Sdab #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)), 9658971Sdab flowstat P((void)), 9746809Sdab netclear P((void)), 9846809Sdab netflush P((void)), 9944364Sborman #ifdef DIAGNOSTICS 10046809Sdab printoption P((char *, int)), 10146809Sdab printdata P((char *, char *, int)), 10246809Sdab printsub P((int, unsigned char *, int)), 10344364Sborman #endif 10446809Sdab ptyflush P((void)), 10546809Sdab putchr P((int)), 10646809Sdab putf P((char *, char *)), 10746809Sdab recv_ayt P((void)), 10846809Sdab send_do P((int, int)), 10946809Sdab send_dont P((int, int)), 11046809Sdab send_slc P((void)), 11146809Sdab send_status P((void)), 11246809Sdab send_will P((int, int)), 11346809Sdab send_wont P((int, int)), 11446809Sdab sendbrk P((void)), 11546809Sdab sendsusp P((void)), 11646809Sdab set_termbuf P((void)), 11746809Sdab start_login P((char *, int, char *)), 11846809Sdab start_slc P((int)), 11957212Sdab #if defined(AUTHENTICATION) 12046809Sdab start_slave P((char *)), 12146809Sdab #else 12246809Sdab start_slave P((char *, int, char *)), 12346809Sdab #endif 12446809Sdab suboption P((void)), 12546809Sdab telrcv P((void)), 12646809Sdab ttloop P((void)), 12746809Sdab tty_binaryin P((int)), 12846809Sdab tty_binaryout P((int)); 12944364Sborman 13046809Sdab extern int 13146809Sdab end_slc P((unsigned char **)), 13246809Sdab getnpty P((void)), 13360151Sdab #ifndef convex 13460151Sdab getpty P((int *)), 135*65158Sdab #endif 13646809Sdab login_tty P((int)), 13746809Sdab spcset P((int, cc_t *, cc_t **)), 13846809Sdab stilloob P((int)), 13946809Sdab terminit P((void)), 14046809Sdab termstat P((void)), 14146809Sdab tty_flowmode P((void)), 14257212Sdab tty_restartany P((void)), 14346809Sdab tty_isbinaryin P((void)), 14446809Sdab tty_isbinaryout P((void)), 14546809Sdab tty_iscrnl P((void)), 14646809Sdab tty_isecho P((void)), 14746809Sdab tty_isediting P((void)), 14846809Sdab tty_islitecho P((void)), 14946809Sdab tty_isnewmap P((void)), 15046809Sdab tty_israw P((void)), 15146809Sdab tty_issofttab P((void)), 15246809Sdab tty_istrapsig P((void)), 15346809Sdab tty_linemode P((void)); 15446809Sdab 15546809Sdab extern void 15646809Sdab tty_rspeed P((int)), 15746809Sdab tty_setecho P((int)), 15846809Sdab tty_setedit P((int)), 15946809Sdab tty_setlinemode P((int)), 16046809Sdab tty_setlitecho P((int)), 16146809Sdab tty_setsig P((int)), 16246809Sdab tty_setsofttab P((int)), 16346809Sdab tty_tspeed P((int)), 16446809Sdab willoption P((int)), 16546809Sdab wontoption P((int)), 16646809Sdab writenet P((unsigned char *, int)); 16746809Sdab 16860151Sdab #ifdef ENCRYPTION 16946809Sdab extern void (*encrypt_output) P((unsigned char *, int)); 17046809Sdab extern int (*decrypt_input) P((int)); 17146809Sdab extern char *nclearto; 17260151Sdab #endif /* ENCRYPTION */ 17346809Sdab 17446809Sdab 17538905Sborman /* 17638905Sborman * The following are some clocks used to decide how to interpret 17738905Sborman * the relationship between various variables. 17838905Sborman */ 17938905Sborman 18038905Sborman extern struct { 18138905Sborman int 18238905Sborman system, /* what the current time is */ 18338905Sborman echotoggle, /* last time user entered echo character */ 18438905Sborman modenegotiated, /* last time operating mode negotiated */ 18538905Sborman didnetreceive, /* last time we read data from network */ 18638905Sborman ttypesubopt, /* ttype subopt is received */ 18738905Sborman tspeedsubopt, /* tspeed subopt is received */ 18844364Sborman environsubopt, /* environ subopt is received */ 189*65158Sdab oenvironsubopt, /* old environ subopt is received */ 19044364Sborman xdisplocsubopt, /* xdisploc subopt is received */ 19138905Sborman baseline, /* time started to do timed action */ 19238905Sborman gotDM; /* when did we last see a data mark */ 19338905Sborman } clocks; 19438905Sborman 19538905Sborman 19640242Sborman #if defined(CRAY2) && defined(UNICOS5) 19738905Sborman extern int needtermstat; 19838905Sborman #endif 19938905Sborman 20057212Sdab #ifndef DEFAULT_IM 20157212Sdab # ifdef CRAY 20257212Sdab # define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r" 20357212Sdab # else 20457212Sdab # ifdef sun 20557212Sdab # define DEFAULT_IM "\r\n\r\nSunOS UNIX (%h) (%t)\r\n\r\r\n\r" 20657212Sdab # else 20757212Sdab # ifdef ultrix 20857212Sdab # define DEFAULT_IM "\r\n\r\nULTRIX (%h) (%t)\r\n\r\r\n\r" 20957212Sdab # else 21057212Sdab # define DEFAULT_IM "\r\n\r\n4.4 BSD UNIX (%h) (%t)\r\n\r\r\n\r" 21157212Sdab # endif 21257212Sdab # endif 21357212Sdab # endif 21438905Sborman #endif 215