Commit | Line | Data |
---|---|---|
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 | * |
1af3d848 | 7 | * @(#)ext.h 5.7 (Berkeley) %G% |
ea139302 PB |
8 | */ |
9 | ||
10 | /* | |
11 | * Telnet server variable declarations | |
12 | */ | |
4a8a7128 | 13 | extern char options[256]; |
053fd49d PB |
14 | extern char do_dont_resp[256]; |
15 | extern char will_wont_resp[256]; | |
ea139302 PB |
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 */ | |
4a8a7128 PB |
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 */ | |
1af3d848 DB |
33 | #if defined(SecurID) |
34 | extern int require_SecurID; | |
35 | #endif | |
36 | #if defined(AUTHENTICATE) | |
37 | extern int auth_level; | |
38 | #endif | |
ea139302 PB |
39 | |
40 | extern slcfun slctab[NSLC + 1]; /* slc mapping table */ | |
41 | ||
42 | char *terminaltype; | |
43 | ||
44 | /* | |
45 | * I/O data buffers, pointers, and counters. | |
46 | */ | |
47 | extern char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; | |
48 | ||
49 | extern char netibuf[BUFSIZ], *netip; | |
50 | ||
51 | extern char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp; | |
52 | extern char *neturg; /* one past last bye of urgent data */ | |
53 | ||
54 | extern int pcc, ncc; | |
55 | ||
ed8f31c1 | 56 | #if defined(CRAY2) && defined(UNICOS5) |
cb781470 PB |
57 | extern int unpcc; /* characters left unprocessed by CRAY-2 terminal routine */ |
58 | extern char *unptyip; /* pointer to remaining characters in buffer */ | |
59 | #endif | |
60 | ||
ea139302 PB |
61 | extern int pty, net; |
62 | extern char *line; | |
63 | extern int SYNCHing; /* we are in TELNET SYNCH mode */ | |
64 | ||
1af3d848 DB |
65 | #ifndef P |
66 | # ifdef __STDC__ | |
67 | # define P(x) x | |
68 | # else | |
69 | # define P(x) () | |
70 | # endif | |
71 | #endif | |
72 | ||
73 | extern void | |
74 | _termstat P((void)), | |
75 | add_slc P((int, int, int)), | |
76 | check_slc P((void)), | |
77 | change_slc P((int, int, int)), | |
78 | cleanup P((int)), | |
79 | clientstat P((int, int, int)), | |
80 | copy_termbuf P((char *, int)), | |
81 | deferslc P((void)), | |
82 | defer_terminit P((void)), | |
83 | do_opt_slc P((unsigned char *, int)), | |
84 | doeof P((void)), | |
85 | dooption P((int)), | |
86 | dontoption P((int)), | |
87 | edithost P((char *, char *)), | |
88 | fatal P((int, char *)), | |
89 | fatalperror P((int, char *)), | |
90 | get_slc_defaults P((void)), | |
91 | init_env P((void)), | |
92 | init_termbuf P((void)), | |
93 | interrupt P((void)), | |
94 | localstat P((void)), | |
95 | netclear P((void)), | |
96 | netflush P((void)), | |
4a8a7128 | 97 | #ifdef DIAGNOSTICS |
1af3d848 DB |
98 | printoption P((char *, int)), |
99 | printdata P((char *, char *, int)), | |
100 | printsub P((int, unsigned char *, int)), | |
101 | #endif | |
102 | ptyflush P((void)), | |
103 | putchr P((int)), | |
104 | putf P((char *, char *)), | |
105 | recv_ayt P((void)), | |
106 | send_do P((int, int)), | |
107 | send_dont P((int, int)), | |
108 | send_slc P((void)), | |
109 | send_status P((void)), | |
110 | send_will P((int, int)), | |
111 | send_wont P((int, int)), | |
112 | sendbrk P((void)), | |
113 | sendsusp P((void)), | |
114 | set_termbuf P((void)), | |
115 | start_login P((char *, int, char *)), | |
116 | start_slc P((int)), | |
117 | #if defined(AUTHENTICATE) | |
118 | start_slave P((char *)), | |
119 | #else | |
120 | start_slave P((char *, int, char *)), | |
4a8a7128 | 121 | #endif |
1af3d848 DB |
122 | suboption P((void)), |
123 | telrcv P((void)), | |
124 | ttloop P((void)), | |
125 | tty_binaryin P((int)), | |
126 | tty_binaryout P((int)); | |
127 | ||
128 | extern int | |
129 | end_slc P((unsigned char **)), | |
130 | getnpty P((void)), | |
131 | getpty P((void)), | |
132 | login_tty P((int)), | |
133 | spcset P((int, cc_t *, cc_t **)), | |
134 | stilloob P((int)), | |
135 | terminit P((void)), | |
136 | termstat P((void)), | |
137 | tty_flowmode P((void)), | |
138 | tty_isbinaryin P((void)), | |
139 | tty_isbinaryout P((void)), | |
140 | tty_iscrnl P((void)), | |
141 | tty_isecho P((void)), | |
142 | tty_isediting P((void)), | |
143 | tty_islitecho P((void)), | |
144 | tty_isnewmap P((void)), | |
145 | tty_israw P((void)), | |
146 | tty_issofttab P((void)), | |
147 | tty_istrapsig P((void)), | |
148 | tty_linemode P((void)); | |
149 | ||
150 | extern void | |
151 | tty_rspeed P((int)), | |
152 | tty_setecho P((int)), | |
153 | tty_setedit P((int)), | |
154 | tty_setlinemode P((int)), | |
155 | tty_setlitecho P((int)), | |
156 | tty_setsig P((int)), | |
157 | tty_setsofttab P((int)), | |
158 | tty_tspeed P((int)), | |
159 | willoption P((int)), | |
160 | wontoption P((int)), | |
161 | writenet P((unsigned char *, int)); | |
162 | ||
163 | #if defined(ENCRYPT) | |
164 | extern void (*encrypt_output) P((unsigned char *, int)); | |
165 | extern int (*decrypt_input) P((int)); | |
166 | extern char *nclearto; | |
167 | #endif | |
168 | ||
4a8a7128 | 169 | |
ea139302 PB |
170 | /* |
171 | * The following are some clocks used to decide how to interpret | |
172 | * the relationship between various variables. | |
173 | */ | |
174 | ||
175 | extern struct { | |
176 | int | |
177 | system, /* what the current time is */ | |
178 | echotoggle, /* last time user entered echo character */ | |
179 | modenegotiated, /* last time operating mode negotiated */ | |
180 | didnetreceive, /* last time we read data from network */ | |
181 | ttypesubopt, /* ttype subopt is received */ | |
182 | tspeedsubopt, /* tspeed subopt is received */ | |
4a8a7128 PB |
183 | environsubopt, /* environ subopt is received */ |
184 | xdisplocsubopt, /* xdisploc subopt is received */ | |
ea139302 PB |
185 | baseline, /* time started to do timed action */ |
186 | gotDM; /* when did we last see a data mark */ | |
187 | } clocks; | |
188 | ||
189 | ||
ed8f31c1 | 190 | #if defined(CRAY2) && defined(UNICOS5) |
ea139302 PB |
191 | extern int needtermstat; |
192 | #endif | |
193 | ||
194 | #ifndef CRAY | |
195 | #define DEFAULT_IM "\r\n\r\n4.3 BSD UNIX (%h) (%t)\r\n\r\r\n\r" | |
196 | #else | |
197 | #define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r" | |
198 | #endif |