Several fixes. The big one is that all of the
[unix-history] / usr / src / libexec / telnetd / ext.h
CommitLineData
ea139302
PB
1/*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
836fe169 5 * %sccs.include.redist.c%
ea139302 6 *
258d091a 7 * @(#)ext.h 5.10 (Berkeley) %G%
ea139302
PB
8 */
9
10/*
11 * Telnet server variable declarations
12 */
4a8a7128 13extern char options[256];
053fd49d
PB
14extern char do_dont_resp[256];
15extern char will_wont_resp[256];
ea139302
PB
16extern int linemode; /* linemode on/off */
17#ifdef LINEMODE
18extern int uselinemode; /* what linemode to use (on/off) */
19extern int editmode; /* edit modes in use */
20extern int useeditmode; /* edit modes to use */
21extern int alwayslinemode; /* command line option */
22# ifdef KLUDGELINEMODE
23extern int lmodetype; /* Client support for linemode */
24# endif /* KLUDGELINEMODE */
25#endif /* LINEMODE */
26extern int flowmode; /* current flow control state */
8832c633 27extern int restartany; /* restart output on any character state */
4a8a7128
PB
28#ifdef DIAGNOSTICS
29extern int diagnostic; /* telnet diagnostic capabilities */
30#endif /* DIAGNOSTICS */
31#ifdef BFTPDAEMON
32extern int bftpd; /* behave as bftp daemon */
33#endif /* BFTPDAEMON */
1af3d848
DB
34#if defined(SecurID)
35extern int require_SecurID;
36#endif
8832c633 37#if defined(AUTHENTICATION)
1af3d848
DB
38extern int auth_level;
39#endif
ea139302
PB
40
41extern slcfun slctab[NSLC + 1]; /* slc mapping table */
42
43char *terminaltype;
44
45/*
46 * I/O data buffers, pointers, and counters.
47 */
48extern char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp;
49
50extern char netibuf[BUFSIZ], *netip;
51
52extern char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp;
53extern char *neturg; /* one past last bye of urgent data */
54
55extern int pcc, ncc;
56
ed8f31c1 57#if defined(CRAY2) && defined(UNICOS5)
cb781470
PB
58extern int unpcc; /* characters left unprocessed by CRAY-2 terminal routine */
59extern char *unptyip; /* pointer to remaining characters in buffer */
60#endif
61
ea139302
PB
62extern int pty, net;
63extern char *line;
64extern int SYNCHing; /* we are in TELNET SYNCH mode */
65
1af3d848
DB
66#ifndef P
67# ifdef __STDC__
68# define P(x) x
69# else
70# define P(x) ()
71# endif
72#endif
73
74extern void
75 _termstat P((void)),
76 add_slc P((int, int, int)),
77 check_slc P((void)),
78 change_slc P((int, int, int)),
79 cleanup P((int)),
80 clientstat P((int, int, int)),
81 copy_termbuf P((char *, int)),
82 deferslc P((void)),
83 defer_terminit P((void)),
84 do_opt_slc P((unsigned char *, int)),
85 doeof P((void)),
86 dooption P((int)),
87 dontoption P((int)),
88 edithost P((char *, char *)),
89 fatal P((int, char *)),
90 fatalperror P((int, char *)),
91 get_slc_defaults P((void)),
92 init_env P((void)),
93 init_termbuf P((void)),
94 interrupt P((void)),
95 localstat P((void)),
1d23bbc4 96 flowstat P((void)),
1af3d848
DB
97 netclear P((void)),
98 netflush P((void)),
4a8a7128 99#ifdef DIAGNOSTICS
1af3d848
DB
100 printoption P((char *, int)),
101 printdata P((char *, char *, int)),
102 printsub P((int, unsigned char *, int)),
103#endif
104 ptyflush P((void)),
105 putchr P((int)),
106 putf P((char *, char *)),
107 recv_ayt P((void)),
108 send_do P((int, int)),
109 send_dont P((int, int)),
110 send_slc P((void)),
111 send_status P((void)),
112 send_will P((int, int)),
113 send_wont P((int, int)),
114 sendbrk P((void)),
115 sendsusp P((void)),
116 set_termbuf P((void)),
117 start_login P((char *, int, char *)),
118 start_slc P((int)),
8832c633 119#if defined(AUTHENTICATION)
1af3d848
DB
120 start_slave P((char *)),
121#else
122 start_slave P((char *, int, char *)),
4a8a7128 123#endif
1af3d848
DB
124 suboption P((void)),
125 telrcv P((void)),
126 ttloop P((void)),
127 tty_binaryin P((int)),
128 tty_binaryout P((int));
129
130extern int
131 end_slc P((unsigned char **)),
132 getnpty P((void)),
258d091a
DB
133#ifndef convex
134 getpty P((int *)),
135#endif convex
1af3d848
DB
136 login_tty P((int)),
137 spcset P((int, cc_t *, cc_t **)),
138 stilloob P((int)),
139 terminit P((void)),
140 termstat P((void)),
141 tty_flowmode P((void)),
8832c633 142 tty_restartany P((void)),
1af3d848
DB
143 tty_isbinaryin P((void)),
144 tty_isbinaryout P((void)),
145 tty_iscrnl P((void)),
146 tty_isecho P((void)),
147 tty_isediting P((void)),
148 tty_islitecho P((void)),
149 tty_isnewmap P((void)),
150 tty_israw P((void)),
151 tty_issofttab P((void)),
152 tty_istrapsig P((void)),
153 tty_linemode P((void));
154
155extern void
156 tty_rspeed P((int)),
157 tty_setecho P((int)),
158 tty_setedit P((int)),
159 tty_setlinemode P((int)),
160 tty_setlitecho P((int)),
161 tty_setsig P((int)),
162 tty_setsofttab P((int)),
163 tty_tspeed P((int)),
164 willoption P((int)),
165 wontoption P((int)),
166 writenet P((unsigned char *, int));
167
258d091a 168#ifdef ENCRYPTION
1af3d848
DB
169extern void (*encrypt_output) P((unsigned char *, int));
170extern int (*decrypt_input) P((int));
171extern char *nclearto;
258d091a 172#endif /* ENCRYPTION */
1af3d848 173
4a8a7128 174
ea139302
PB
175/*
176 * The following are some clocks used to decide how to interpret
177 * the relationship between various variables.
178 */
179
180extern struct {
181 int
182 system, /* what the current time is */
183 echotoggle, /* last time user entered echo character */
184 modenegotiated, /* last time operating mode negotiated */
185 didnetreceive, /* last time we read data from network */
186 ttypesubopt, /* ttype subopt is received */
187 tspeedsubopt, /* tspeed subopt is received */
4a8a7128
PB
188 environsubopt, /* environ subopt is received */
189 xdisplocsubopt, /* xdisploc subopt is received */
ea139302
PB
190 baseline, /* time started to do timed action */
191 gotDM; /* when did we last see a data mark */
192} clocks;
193
194
ed8f31c1 195#if defined(CRAY2) && defined(UNICOS5)
ea139302
PB
196extern int needtermstat;
197#endif
198
8832c633
DB
199#ifndef DEFAULT_IM
200# ifdef CRAY
201# define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
202# else
203# ifdef sun
204# define DEFAULT_IM "\r\n\r\nSunOS UNIX (%h) (%t)\r\n\r\r\n\r"
205# else
206# ifdef ultrix
207# define DEFAULT_IM "\r\n\r\nULTRIX (%h) (%t)\r\n\r\r\n\r"
208# else
209# define DEFAULT_IM "\r\n\r\n4.4 BSD UNIX (%h) (%t)\r\n\r\r\n\r"
210# endif
211# endif
212# endif
ea139302 213#endif