xref: /csrg-svn/libexec/telnetd/ext.h (revision 44364)
138905Sborman /*
238905Sborman  * Copyright (c) 1989 The Regents of the University of California.
338905Sborman  * All rights reserved.
438905Sborman  *
542673Sbostic  * %sccs.include.redist.c%
638905Sborman  *
7*44364Sborman  *	@(#)ext.h	5.6 (Berkeley) 06/28/90
838905Sborman  */
938905Sborman 
1038905Sborman /*
1138905Sborman  * Telnet server variable declarations
1238905Sborman  */
13*44364Sborman 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*44364Sborman #ifdef DIAGNOSTICS
28*44364Sborman extern int	diagnostic;	/* telnet diagnostic capabilities */
29*44364Sborman #endif /* DIAGNOSTICS */
30*44364Sborman #ifdef BFTPDAEMON
31*44364Sborman extern int	bftpd;		/* behave as bftp daemon */
32*44364Sborman #endif /* BFTPDAEMON */
3338905Sborman 
3438905Sborman extern slcfun	slctab[NSLC + 1];	/* slc mapping table */
3538905Sborman 
3638905Sborman char	*terminaltype;
3738905Sborman 
3838905Sborman /*
3938905Sborman  * I/O data buffers, pointers, and counters.
4038905Sborman  */
4138905Sborman extern char	ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
4238905Sborman 
4338905Sborman extern char	netibuf[BUFSIZ], *netip;
4438905Sborman 
4538905Sborman extern char	netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp;
4638905Sborman extern char	*neturg;		/* one past last bye of urgent data */
4738905Sborman 
4838905Sborman extern int	pcc, ncc;
4938905Sborman 
5040242Sborman #if defined(CRAY2) && defined(UNICOS5)
5139531Sborman extern int unpcc;  /* characters left unprocessed by CRAY-2 terminal routine */
5239531Sborman extern char *unptyip;  /* pointer to remaining characters in buffer */
5339531Sborman #endif
5439531Sborman 
5538905Sborman extern int	pty, net;
5638905Sborman extern char	*line;
5738905Sborman extern int	SYNCHing;		/* we are in TELNET SYNCH mode */
5838905Sborman 
59*44364Sborman #ifdef DIAGNOSTICS
60*44364Sborman extern void printoption();
61*44364Sborman extern void printdata();
62*44364Sborman #endif
63*44364Sborman 
6438905Sborman /*
6538905Sborman  * The following are some clocks used to decide how to interpret
6638905Sborman  * the relationship between various variables.
6738905Sborman  */
6838905Sborman 
6938905Sborman extern struct {
7038905Sborman     int
7138905Sborman 	system,			/* what the current time is */
7238905Sborman 	echotoggle,		/* last time user entered echo character */
7338905Sborman 	modenegotiated,		/* last time operating mode negotiated */
7438905Sborman 	didnetreceive,		/* last time we read data from network */
7538905Sborman 	ttypesubopt,		/* ttype subopt is received */
7638905Sborman 	tspeedsubopt,		/* tspeed subopt is received */
77*44364Sborman 	environsubopt,		/* environ subopt is received */
78*44364Sborman 	xdisplocsubopt,		/* xdisploc subopt is received */
7938905Sborman 	baseline,		/* time started to do timed action */
8038905Sborman 	gotDM;			/* when did we last see a data mark */
8138905Sborman } clocks;
8238905Sborman 
8338905Sborman 
8440242Sborman #if	defined(CRAY2) && defined(UNICOS5)
8538905Sborman extern int	needtermstat;
8638905Sborman #endif
8738905Sborman 
8838905Sborman #ifndef	CRAY
8938905Sborman #define DEFAULT_IM	"\r\n\r\n4.3 BSD UNIX (%h) (%t)\r\n\r\r\n\r"
9038905Sborman #else
9138905Sborman #define DEFAULT_IM	"\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
9238905Sborman #endif
93