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