xref: /csrg-svn/libexec/telnetd/ext.h (revision 42673)
1 /*
2  * Copyright (c) 1989 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ext.h	5.5 (Berkeley) 06/01/90
8  */
9 
10 /*
11  * Telnet server variable declarations
12  */
13 extern char	hisopts[256];
14 extern char	myopts[256];
15 extern char	hiswants[256];
16 extern char	mywants[256];
17 extern char	do_dont_resp[256];
18 extern char	will_wont_resp[256];
19 extern int	linemode;	/* linemode on/off */
20 #ifdef	LINEMODE
21 extern int	uselinemode;	/* what linemode to use (on/off) */
22 extern int	editmode;	/* edit modes in use */
23 extern int	useeditmode;	/* edit modes to use */
24 extern int	alwayslinemode;	/* command line option */
25 # ifdef	KLUDGELINEMODE
26 extern int	lmodetype;	/* Client support for linemode */
27 # endif	/* KLUDGELINEMODE */
28 #endif	/* LINEMODE */
29 extern int	flowmode;	/* current flow control state */
30 
31 extern slcfun	slctab[NSLC + 1];	/* slc mapping table */
32 
33 char	*terminaltype;
34 
35 /*
36  * I/O data buffers, pointers, and counters.
37  */
38 extern char	ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
39 
40 extern char	netibuf[BUFSIZ], *netip;
41 
42 extern char	netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp;
43 extern char	*neturg;		/* one past last bye of urgent data */
44 
45 extern int	pcc, ncc;
46 
47 #if defined(CRAY2) && defined(UNICOS5)
48 extern int unpcc;  /* characters left unprocessed by CRAY-2 terminal routine */
49 extern char *unptyip;  /* pointer to remaining characters in buffer */
50 #endif
51 
52 extern int	pty, net;
53 extern char	*line;
54 extern int	SYNCHing;		/* we are in TELNET SYNCH mode */
55 
56 /*
57  * The following are some clocks used to decide how to interpret
58  * the relationship between various variables.
59  */
60 
61 extern struct {
62     int
63 	system,			/* what the current time is */
64 	echotoggle,		/* last time user entered echo character */
65 	modenegotiated,		/* last time operating mode negotiated */
66 	didnetreceive,		/* last time we read data from network */
67 	ttypesubopt,		/* ttype subopt is received */
68 	tspeedsubopt,		/* tspeed subopt is received */
69 	baseline,		/* time started to do timed action */
70 	gotDM;			/* when did we last see a data mark */
71 } clocks;
72 
73 
74 #if	defined(CRAY2) && defined(UNICOS5)
75 extern int	needtermstat;
76 #endif
77 
78 #ifndef	CRAY
79 #define DEFAULT_IM	"\r\n\r\n4.3 BSD UNIX (%h) (%t)\r\n\r\r\n\r"
80 #else
81 #define DEFAULT_IM	"\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
82 #endif
83