xref: /csrg-svn/libexec/telnetd/ext.h (revision 38905)
1*38905Sborman /*
2*38905Sborman  * Copyright (c) 1989 The Regents of the University of California.
3*38905Sborman  * All rights reserved.
4*38905Sborman  *
5*38905Sborman  * Redistribution and use in source and binary forms are permitted
6*38905Sborman  * provided that the above copyright notice and this paragraph are
7*38905Sborman  * duplicated in all such forms and that any documentation,
8*38905Sborman  * advertising materials, and other materials related to such
9*38905Sborman  * distribution and use acknowledge that the software was developed
10*38905Sborman  * by the University of California, Berkeley.  The name of the
11*38905Sborman  * University may not be used to endorse or promote products derived
12*38905Sborman  * from this software without specific prior written permission.
13*38905Sborman  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*38905Sborman  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*38905Sborman  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16*38905Sborman  *
17*38905Sborman  *	@(#)ext.h	5.1 (Berkeley) 09/01/89
18*38905Sborman  */
19*38905Sborman 
20*38905Sborman /*
21*38905Sborman  * Telnet server variable declarations
22*38905Sborman  */
23*38905Sborman extern char	hisopts[256];
24*38905Sborman extern char	myopts[256];
25*38905Sborman extern char	hiswants[256];
26*38905Sborman extern char	mywants[256];
27*38905Sborman extern char	resp[256];
28*38905Sborman extern int	linemode;	/* linemode on/off */
29*38905Sborman #ifdef	LINEMODE
30*38905Sborman extern int	uselinemode;	/* what linemode to use (on/off) */
31*38905Sborman extern int	editmode;	/* edit modes in use */
32*38905Sborman extern int	useeditmode;	/* edit modes to use */
33*38905Sborman extern int	alwayslinemode;	/* command line option */
34*38905Sborman # ifdef	KLUDGELINEMODE
35*38905Sborman extern int	lmodetype;	/* Client support for linemode */
36*38905Sborman # endif	/* KLUDGELINEMODE */
37*38905Sborman #endif	/* LINEMODE */
38*38905Sborman extern int	flowmode;	/* current flow control state */
39*38905Sborman 
40*38905Sborman extern slcfun	slctab[NSLC + 1];	/* slc mapping table */
41*38905Sborman 
42*38905Sborman char	*terminaltype;
43*38905Sborman 
44*38905Sborman /*
45*38905Sborman  * I/O data buffers, pointers, and counters.
46*38905Sborman  */
47*38905Sborman extern char	ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
48*38905Sborman 
49*38905Sborman extern char	netibuf[BUFSIZ], *netip;
50*38905Sborman 
51*38905Sborman extern char	netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp;
52*38905Sborman extern char	*neturg;		/* one past last bye of urgent data */
53*38905Sborman 
54*38905Sborman extern int	pcc, ncc;
55*38905Sborman 
56*38905Sborman extern int	pty, net;
57*38905Sborman extern char	*line;
58*38905Sborman extern int	SYNCHing;		/* we are in TELNET SYNCH mode */
59*38905Sborman 
60*38905Sborman /*
61*38905Sborman  * The following are some clocks used to decide how to interpret
62*38905Sborman  * the relationship between various variables.
63*38905Sborman  */
64*38905Sborman 
65*38905Sborman extern struct {
66*38905Sborman     int
67*38905Sborman 	system,			/* what the current time is */
68*38905Sborman 	echotoggle,		/* last time user entered echo character */
69*38905Sborman 	modenegotiated,		/* last time operating mode negotiated */
70*38905Sborman 	didnetreceive,		/* last time we read data from network */
71*38905Sborman 	ttypesubopt,		/* ttype subopt is received */
72*38905Sborman 	tspeedsubopt,		/* tspeed subopt is received */
73*38905Sborman 	baseline,		/* time started to do timed action */
74*38905Sborman 	gotDM;			/* when did we last see a data mark */
75*38905Sborman } clocks;
76*38905Sborman 
77*38905Sborman 
78*38905Sborman #ifdef CRAY2
79*38905Sborman extern int	needtermstat;
80*38905Sborman #endif
81*38905Sborman 
82*38905Sborman #ifndef	CRAY
83*38905Sborman #define DEFAULT_IM	"\r\n\r\n4.3 BSD UNIX (%h) (%t)\r\n\r\r\n\r"
84*38905Sborman #else
85*38905Sborman #define DEFAULT_IM	"\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
86*38905Sborman #endif
87