xref: /csrg-svn/libexec/telnetd/ext.h (revision 39503)
138905Sborman /*
238905Sborman  * Copyright (c) 1989 The Regents of the University of California.
338905Sborman  * All rights reserved.
438905Sborman  *
538905Sborman  * Redistribution and use in source and binary forms are permitted
638905Sborman  * provided that the above copyright notice and this paragraph are
738905Sborman  * duplicated in all such forms and that any documentation,
838905Sborman  * advertising materials, and other materials related to such
938905Sborman  * distribution and use acknowledge that the software was developed
1038905Sborman  * by the University of California, Berkeley.  The name of the
1138905Sborman  * University may not be used to endorse or promote products derived
1238905Sborman  * from this software without specific prior written permission.
1338905Sborman  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1438905Sborman  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1538905Sborman  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1638905Sborman  *
17*39503Sborman  *	@(#)ext.h	5.2 (Berkeley) 11/10/89
1838905Sborman  */
1938905Sborman 
2038905Sborman /*
2138905Sborman  * Telnet server variable declarations
2238905Sborman  */
2338905Sborman extern char	hisopts[256];
2438905Sborman extern char	myopts[256];
2538905Sborman extern char	hiswants[256];
2638905Sborman extern char	mywants[256];
27*39503Sborman extern char	do_dont_resp[256];
28*39503Sborman extern char	will_wont_resp[256];
2938905Sborman extern int	linemode;	/* linemode on/off */
3038905Sborman #ifdef	LINEMODE
3138905Sborman extern int	uselinemode;	/* what linemode to use (on/off) */
3238905Sborman extern int	editmode;	/* edit modes in use */
3338905Sborman extern int	useeditmode;	/* edit modes to use */
3438905Sborman extern int	alwayslinemode;	/* command line option */
3538905Sborman # ifdef	KLUDGELINEMODE
3638905Sborman extern int	lmodetype;	/* Client support for linemode */
3738905Sborman # endif	/* KLUDGELINEMODE */
3838905Sborman #endif	/* LINEMODE */
3938905Sborman extern int	flowmode;	/* current flow control state */
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 
5738905Sborman extern int	pty, net;
5838905Sborman extern char	*line;
5938905Sborman extern int	SYNCHing;		/* we are in TELNET SYNCH mode */
6038905Sborman 
6138905Sborman /*
6238905Sborman  * The following are some clocks used to decide how to interpret
6338905Sborman  * the relationship between various variables.
6438905Sborman  */
6538905Sborman 
6638905Sborman extern struct {
6738905Sborman     int
6838905Sborman 	system,			/* what the current time is */
6938905Sborman 	echotoggle,		/* last time user entered echo character */
7038905Sborman 	modenegotiated,		/* last time operating mode negotiated */
7138905Sborman 	didnetreceive,		/* last time we read data from network */
7238905Sborman 	ttypesubopt,		/* ttype subopt is received */
7338905Sborman 	tspeedsubopt,		/* tspeed subopt is received */
7438905Sborman 	baseline,		/* time started to do timed action */
7538905Sborman 	gotDM;			/* when did we last see a data mark */
7638905Sborman } clocks;
7738905Sborman 
7838905Sborman 
7938905Sborman #ifdef CRAY2
8038905Sborman extern int	needtermstat;
8138905Sborman #endif
8238905Sborman 
8338905Sborman #ifndef	CRAY
8438905Sborman #define DEFAULT_IM	"\r\n\r\n4.3 BSD UNIX (%h) (%t)\r\n\r\r\n\r"
8538905Sborman #else
8638905Sborman #define DEFAULT_IM	"\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
8738905Sborman #endif
88