xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.bin/telnet/externs.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright 1994-2002 Sun Microsystems, Inc.  All rights reserved.
3*0Sstevel@tonic-gate  * Use is subject to license terms.
4*0Sstevel@tonic-gate  */
5*0Sstevel@tonic-gate 
6*0Sstevel@tonic-gate /*
7*0Sstevel@tonic-gate  * Copyright (c) 1988, 1990, 1993
8*0Sstevel@tonic-gate  *	The Regents of the University of California.  All rights reserved.
9*0Sstevel@tonic-gate  *
10*0Sstevel@tonic-gate  * Redistribution and use in source and binary forms, with or without
11*0Sstevel@tonic-gate  * modification, are permitted provided that the following conditions
12*0Sstevel@tonic-gate  * are met:
13*0Sstevel@tonic-gate  * 1. Redistributions of source code must retain the above copyright
14*0Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer.
15*0Sstevel@tonic-gate  * 2. Redistributions in binary form must reproduce the above copyright
16*0Sstevel@tonic-gate  *    notice, this list of conditions and the following disclaimer in the
17*0Sstevel@tonic-gate  *    documentation and/or other materials provided with the distribution.
18*0Sstevel@tonic-gate  * 3. All advertising materials mentioning features or use of this software
19*0Sstevel@tonic-gate  *    must display the following acknowledgement:
20*0Sstevel@tonic-gate  *	This product includes software developed by the University of
21*0Sstevel@tonic-gate  *	California, Berkeley and its contributors.
22*0Sstevel@tonic-gate  * 4. Neither the name of the University nor the names of its contributors
23*0Sstevel@tonic-gate  *    may be used to endorse or promote products derived from this software
24*0Sstevel@tonic-gate  *    without specific prior written permission.
25*0Sstevel@tonic-gate  *
26*0Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27*0Sstevel@tonic-gate  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28*0Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29*0Sstevel@tonic-gate  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30*0Sstevel@tonic-gate  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31*0Sstevel@tonic-gate  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32*0Sstevel@tonic-gate  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33*0Sstevel@tonic-gate  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34*0Sstevel@tonic-gate  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35*0Sstevel@tonic-gate  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36*0Sstevel@tonic-gate  * SUCH DAMAGE.
37*0Sstevel@tonic-gate  *
38*0Sstevel@tonic-gate  *	@(#)externs.h	8.1 (Berkeley) 6/6/93
39*0Sstevel@tonic-gate  */
40*0Sstevel@tonic-gate 
41*0Sstevel@tonic-gate #ifndef _EXTERNS_H
42*0Sstevel@tonic-gate #define	_EXTERNS_H
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
45*0Sstevel@tonic-gate 
46*0Sstevel@tonic-gate #ifdef	__cplusplus
47*0Sstevel@tonic-gate extern "C" {
48*0Sstevel@tonic-gate #endif
49*0Sstevel@tonic-gate 
50*0Sstevel@tonic-gate #include <libintl.h>
51*0Sstevel@tonic-gate #include <stdio.h>
52*0Sstevel@tonic-gate #include <setjmp.h>
53*0Sstevel@tonic-gate #include <sys/filio.h>
54*0Sstevel@tonic-gate #ifdef	USE_TERMIO
55*0Sstevel@tonic-gate #include <sys/termios.h>
56*0Sstevel@tonic-gate #define	termio termios
57*0Sstevel@tonic-gate #endif
58*0Sstevel@tonic-gate #if defined(NO_CC_T) || !defined(USE_TERMIO)
59*0Sstevel@tonic-gate #if !defined(USE_TERMIO)
60*0Sstevel@tonic-gate typedef char cc_t;
61*0Sstevel@tonic-gate #else
62*0Sstevel@tonic-gate typedef unsigned char cc_t;
63*0Sstevel@tonic-gate #endif
64*0Sstevel@tonic-gate #endif
65*0Sstevel@tonic-gate 
66*0Sstevel@tonic-gate #include "auth.h"
67*0Sstevel@tonic-gate #include "encrypt.h"
68*0Sstevel@tonic-gate #include <profile/prof_int.h>
69*0Sstevel@tonic-gate 
70*0Sstevel@tonic-gate extern profile_options_boolean	config_file_options[];
71*0Sstevel@tonic-gate #define	forwardable_flag_set	config_file_options[0].found
72*0Sstevel@tonic-gate #define	forward_flag_set	config_file_options[1].found
73*0Sstevel@tonic-gate #define	encrypt_flag_set	config_file_options[2].found
74*0Sstevel@tonic-gate #define	autologin_set		config_file_options[3].found
75*0Sstevel@tonic-gate 
76*0Sstevel@tonic-gate #include <string.h>
77*0Sstevel@tonic-gate 
78*0Sstevel@tonic-gate #ifndef	_POSIX_VDISABLE
79*0Sstevel@tonic-gate #include <sys/param.h>	/* pick up VDISABLE definition, mayby */
80*0Sstevel@tonic-gate #ifdef VDISABLE
81*0Sstevel@tonic-gate #define	_POSIX_VDISABLE VDISABLE
82*0Sstevel@tonic-gate #else
83*0Sstevel@tonic-gate #define	_POSIX_VDISABLE ((cc_t)'\377')
84*0Sstevel@tonic-gate #endif
85*0Sstevel@tonic-gate #endif
86*0Sstevel@tonic-gate 
87*0Sstevel@tonic-gate #include <wait.h>
88*0Sstevel@tonic-gate #include <stdlib.h>
89*0Sstevel@tonic-gate #include <unistd.h>
90*0Sstevel@tonic-gate 
91*0Sstevel@tonic-gate 
92*0Sstevel@tonic-gate #define	SUBBUFSIZE	256
93*0Sstevel@tonic-gate 
94*0Sstevel@tonic-gate extern int autologin;	/* Autologin enabled */
95*0Sstevel@tonic-gate extern int skiprc;	/* Don't process the ~/.telnetrc file */
96*0Sstevel@tonic-gate extern int eight;	/* use eight bit mode (binary in and/or out */
97*0Sstevel@tonic-gate extern int flushout;	/* flush output */
98*0Sstevel@tonic-gate extern int connected;	/* Are we connected to the other side? */
99*0Sstevel@tonic-gate extern int globalmode;	/* Mode tty should be in */
100*0Sstevel@tonic-gate extern int telnetport;	/* Are we connected to the telnet port? */
101*0Sstevel@tonic-gate extern int localflow;	/* Flow control handled locally */
102*0Sstevel@tonic-gate extern int restartany;	/* If flow control, restart output on any character */
103*0Sstevel@tonic-gate extern int localchars;	/* we recognize interrupt/quit */
104*0Sstevel@tonic-gate extern int donelclchars; /* the user has set "localchars" */
105*0Sstevel@tonic-gate extern int showoptions;
106*0Sstevel@tonic-gate extern int net;		/* Network file descriptor */
107*0Sstevel@tonic-gate extern int tout;	/* Terminal output file descriptor */
108*0Sstevel@tonic-gate extern int crlf;	/* Should '\r' be mapped to <CR><LF> (or <CR><NUL>)? */
109*0Sstevel@tonic-gate extern int autoflush;	/* flush output when interrupting? */
110*0Sstevel@tonic-gate extern int autosynch;	/* send interrupt characters with SYNCH? */
111*0Sstevel@tonic-gate extern int SYNCHing;	/* Is the stream in telnet SYNCH mode? */
112*0Sstevel@tonic-gate extern int donebinarytoggle;	/* the user has put us in binary */
113*0Sstevel@tonic-gate extern int dontlecho;	/* do we suppress local echoing right now? */
114*0Sstevel@tonic-gate extern int crmod;
115*0Sstevel@tonic-gate extern int netdata;	/* Print out network data flow */
116*0Sstevel@tonic-gate extern int prettydump;	/* Print "netdata" output in user readable format */
117*0Sstevel@tonic-gate extern int termdata;	/* Print out terminal data flow */
118*0Sstevel@tonic-gate extern int eof_pending;	/* Received EOF in line mode, need to send IAC-xEOF */
119*0Sstevel@tonic-gate extern int debug;	/* Debug level */
120*0Sstevel@tonic-gate 
121*0Sstevel@tonic-gate 
122*0Sstevel@tonic-gate extern int krb5auth_flag;
123*0Sstevel@tonic-gate extern char *RemoteHostName;
124*0Sstevel@tonic-gate extern char *UserNameRequested;
125*0Sstevel@tonic-gate extern int forwardable_flag;
126*0Sstevel@tonic-gate extern int forward_flag;
127*0Sstevel@tonic-gate extern boolean_t wantencryption;	/* User has requested encryption */
128*0Sstevel@tonic-gate extern int encrypt_flag;		/* for reading config file for Krb5 */
129*0Sstevel@tonic-gate 
130*0Sstevel@tonic-gate extern boolean_t Ambiguous(void *);
131*0Sstevel@tonic-gate extern boolean_t intr_happened;	/* for interrupt handling */
132*0Sstevel@tonic-gate extern boolean_t intr_waiting;
133*0Sstevel@tonic-gate 
134*0Sstevel@tonic-gate extern cc_t escape;	/* Escape to command mode */
135*0Sstevel@tonic-gate extern cc_t rlogin;	/* Rlogin mode escape character */
136*0Sstevel@tonic-gate extern boolean_t escape_valid;
137*0Sstevel@tonic-gate #ifdef	KLUDGELINEMODE
138*0Sstevel@tonic-gate extern cc_t echoc;	/* Toggle local echoing */
139*0Sstevel@tonic-gate #endif
140*0Sstevel@tonic-gate 
141*0Sstevel@tonic-gate extern char *prompt;	/* Prompt for command. */
142*0Sstevel@tonic-gate 
143*0Sstevel@tonic-gate extern char doopt[];
144*0Sstevel@tonic-gate extern char dont[];
145*0Sstevel@tonic-gate extern char will[];
146*0Sstevel@tonic-gate extern char wont[];
147*0Sstevel@tonic-gate extern char options[];	/* All the little options */
148*0Sstevel@tonic-gate extern char *hostname;	/* Who are we connected to? */
149*0Sstevel@tonic-gate extern void (*encrypt_output) (unsigned char *, int);
150*0Sstevel@tonic-gate extern int (*decrypt_input) (int);
151*0Sstevel@tonic-gate 
152*0Sstevel@tonic-gate /*
153*0Sstevel@tonic-gate  * We keep track of each side of the option negotiation.
154*0Sstevel@tonic-gate  */
155*0Sstevel@tonic-gate 
156*0Sstevel@tonic-gate #define	MY_STATE_WILL		0x01
157*0Sstevel@tonic-gate #define	MY_WANT_STATE_WILL	0x02
158*0Sstevel@tonic-gate #define	MY_STATE_DO		0x04
159*0Sstevel@tonic-gate #define	MY_WANT_STATE_DO	0x08
160*0Sstevel@tonic-gate 
161*0Sstevel@tonic-gate /*
162*0Sstevel@tonic-gate  * Macros to check the current state of things
163*0Sstevel@tonic-gate  */
164*0Sstevel@tonic-gate 
165*0Sstevel@tonic-gate #define	my_state_is_do(opt)		(options[opt]&MY_STATE_DO)
166*0Sstevel@tonic-gate #define	my_state_is_will(opt)		(options[opt]&MY_STATE_WILL)
167*0Sstevel@tonic-gate #define	my_want_state_is_do(opt)	(options[opt]&MY_WANT_STATE_DO)
168*0Sstevel@tonic-gate #define	my_want_state_is_will(opt)	(options[opt]&MY_WANT_STATE_WILL)
169*0Sstevel@tonic-gate 
170*0Sstevel@tonic-gate #define	my_state_is_dont(opt)		(!my_state_is_do(opt))
171*0Sstevel@tonic-gate #define	my_state_is_wont(opt)		(!my_state_is_will(opt))
172*0Sstevel@tonic-gate #define	my_want_state_is_dont(opt)	(!my_want_state_is_do(opt))
173*0Sstevel@tonic-gate #define	my_want_state_is_wont(opt)	(!my_want_state_is_will(opt))
174*0Sstevel@tonic-gate 
175*0Sstevel@tonic-gate #define	set_my_state_do(opt)		{options[opt] |= MY_STATE_DO; }
176*0Sstevel@tonic-gate #define	set_my_state_will(opt)		{options[opt] |= MY_STATE_WILL; }
177*0Sstevel@tonic-gate #define	set_my_want_state_do(opt)	{options[opt] |= MY_WANT_STATE_DO; }
178*0Sstevel@tonic-gate #define	set_my_want_state_will(opt)	{options[opt] |= MY_WANT_STATE_WILL; }
179*0Sstevel@tonic-gate 
180*0Sstevel@tonic-gate #define	set_my_state_dont(opt)		{options[opt] &= ~MY_STATE_DO; }
181*0Sstevel@tonic-gate #define	set_my_state_wont(opt)		{options[opt] &= ~MY_STATE_WILL; }
182*0Sstevel@tonic-gate #define	set_my_want_state_dont(opt)	{options[opt] &= ~MY_WANT_STATE_DO; }
183*0Sstevel@tonic-gate #define	set_my_want_state_wont(opt)	{options[opt] &= ~MY_WANT_STATE_WILL; }
184*0Sstevel@tonic-gate 
185*0Sstevel@tonic-gate /*
186*0Sstevel@tonic-gate  * Make everything symetrical
187*0Sstevel@tonic-gate  */
188*0Sstevel@tonic-gate 
189*0Sstevel@tonic-gate #define	HIS_STATE_WILL			MY_STATE_DO
190*0Sstevel@tonic-gate #define	HIS_WANT_STATE_WILL		MY_WANT_STATE_DO
191*0Sstevel@tonic-gate #define	HIS_STATE_DO			MY_STATE_WILL
192*0Sstevel@tonic-gate #define	HIS_WANT_STATE_DO		MY_WANT_STATE_WILL
193*0Sstevel@tonic-gate 
194*0Sstevel@tonic-gate #define	his_state_is_do			my_state_is_will
195*0Sstevel@tonic-gate #define	his_state_is_will		my_state_is_do
196*0Sstevel@tonic-gate #define	his_want_state_is_do		my_want_state_is_will
197*0Sstevel@tonic-gate #define	his_want_state_is_will		my_want_state_is_do
198*0Sstevel@tonic-gate 
199*0Sstevel@tonic-gate #define	his_state_is_dont		my_state_is_wont
200*0Sstevel@tonic-gate #define	his_state_is_wont		my_state_is_dont
201*0Sstevel@tonic-gate #define	his_want_state_is_dont		my_want_state_is_wont
202*0Sstevel@tonic-gate #define	his_want_state_is_wont		my_want_state_is_dont
203*0Sstevel@tonic-gate 
204*0Sstevel@tonic-gate #define	set_his_state_do		set_my_state_will
205*0Sstevel@tonic-gate #define	set_his_state_will		set_my_state_do
206*0Sstevel@tonic-gate #define	set_his_want_state_do		set_my_want_state_will
207*0Sstevel@tonic-gate #define	set_his_want_state_will		set_my_want_state_do
208*0Sstevel@tonic-gate 
209*0Sstevel@tonic-gate #define	set_his_state_dont		set_my_state_wont
210*0Sstevel@tonic-gate #define	set_his_state_wont		set_my_state_dont
211*0Sstevel@tonic-gate #define	set_his_want_state_dont		set_my_want_state_wont
212*0Sstevel@tonic-gate #define	set_his_want_state_wont		set_my_want_state_dont
213*0Sstevel@tonic-gate 
214*0Sstevel@tonic-gate 
215*0Sstevel@tonic-gate extern FILE *NetTrace;		/* Where debugging output goes */
216*0Sstevel@tonic-gate 				/* Name of file where debugging output goes */
217*0Sstevel@tonic-gate extern unsigned char NetTraceFile[];
218*0Sstevel@tonic-gate extern void SetNetTrace(char *); /* Function to change where debugging goes */
219*0Sstevel@tonic-gate 
220*0Sstevel@tonic-gate extern jmp_buf peerdied;
221*0Sstevel@tonic-gate extern jmp_buf toplevel;	/* For error conditions. */
222*0Sstevel@tonic-gate 
223*0Sstevel@tonic-gate extern char *AllocStringBuffer(char **, unsigned int *, unsigned int);
224*0Sstevel@tonic-gate extern void ExitString(char *, int);
225*0Sstevel@tonic-gate extern void Exit(int);
226*0Sstevel@tonic-gate extern void command(int, char *, int);
227*0Sstevel@tonic-gate extern void Dump(int, unsigned char *, int);
228*0Sstevel@tonic-gate extern char *GetAndAppendString(char **, unsigned int *, char *, FILE *);
229*0Sstevel@tonic-gate extern char *GetString(char **, unsigned int *, FILE *);
230*0Sstevel@tonic-gate extern void init_network(void);
231*0Sstevel@tonic-gate extern void init_terminal(void);
232*0Sstevel@tonic-gate extern void init_sys(void);
233*0Sstevel@tonic-gate extern void optionstatus(void);
234*0Sstevel@tonic-gate extern void printoption(char *, int, int);
235*0Sstevel@tonic-gate extern void printsub(int, unsigned char *, int);
236*0Sstevel@tonic-gate extern void sendnaws(void);
237*0Sstevel@tonic-gate extern void setconnmode(int);
238*0Sstevel@tonic-gate extern void setcommandmode(void);
239*0Sstevel@tonic-gate extern void setneturg(void);
240*0Sstevel@tonic-gate extern void sys_telnet_init(void);
241*0Sstevel@tonic-gate extern void telnet(char *);
242*0Sstevel@tonic-gate extern void tel_enter_binary(int);
243*0Sstevel@tonic-gate extern void tel_leave_binary(int);
244*0Sstevel@tonic-gate extern void TerminalDefaultChars(void);
245*0Sstevel@tonic-gate extern void TerminalFlushOutput(void);
246*0Sstevel@tonic-gate extern void TerminalNewMode(int);
247*0Sstevel@tonic-gate extern void TerminalSaveState(void);
248*0Sstevel@tonic-gate extern void TerminalSpeeds(int *, int *);
249*0Sstevel@tonic-gate extern void upcase(char *);
250*0Sstevel@tonic-gate 
251*0Sstevel@tonic-gate extern void xmitEL(void);
252*0Sstevel@tonic-gate extern void xmitEC(void);
253*0Sstevel@tonic-gate extern void intp(void);
254*0Sstevel@tonic-gate extern void sendabort(void);
255*0Sstevel@tonic-gate extern void sendsusp(void);
256*0Sstevel@tonic-gate extern void set_escape_char(char *);
257*0Sstevel@tonic-gate extern void fatal_tty_error(char *);
258*0Sstevel@tonic-gate 
259*0Sstevel@tonic-gate extern void send_do(int, int);
260*0Sstevel@tonic-gate extern void send_dont(int, int);
261*0Sstevel@tonic-gate extern void send_will(int, int);
262*0Sstevel@tonic-gate extern void send_wont(int, int);
263*0Sstevel@tonic-gate 
264*0Sstevel@tonic-gate extern void lm_mode(unsigned char *, int, int);
265*0Sstevel@tonic-gate 
266*0Sstevel@tonic-gate extern void slcstate(void);
267*0Sstevel@tonic-gate extern void slc_mode_export(void);
268*0Sstevel@tonic-gate extern void slc_mode_import(int);
269*0Sstevel@tonic-gate extern void slc_check(void);
270*0Sstevel@tonic-gate 
271*0Sstevel@tonic-gate extern void env_opt_start_info(void);
272*0Sstevel@tonic-gate extern void env_opt_add(unsigned char *);
273*0Sstevel@tonic-gate extern void env_opt_end(int);
274*0Sstevel@tonic-gate 
275*0Sstevel@tonic-gate extern char **genget(char *, char **, int);
276*0Sstevel@tonic-gate extern unsigned char *env_default(int, int);
277*0Sstevel@tonic-gate extern unsigned char *env_getvalue(unsigned char *);
278*0Sstevel@tonic-gate 
279*0Sstevel@tonic-gate extern int env_init(void);
280*0Sstevel@tonic-gate extern int get_status(void);
281*0Sstevel@tonic-gate extern int init_telnet(void);
282*0Sstevel@tonic-gate extern int isprefix(register char *, register char *);
283*0Sstevel@tonic-gate extern int netflush(void);
284*0Sstevel@tonic-gate extern int opt_welldefined(char *);
285*0Sstevel@tonic-gate extern int process_rings(int, int, int, int, int, int);
286*0Sstevel@tonic-gate extern int quit(void);
287*0Sstevel@tonic-gate extern int rlogin_susp(void);
288*0Sstevel@tonic-gate extern int Scheduler(int);
289*0Sstevel@tonic-gate extern int SetSockOpt(int, int, int, int);
290*0Sstevel@tonic-gate extern int stilloob(void);
291*0Sstevel@tonic-gate extern int telrcv(void);
292*0Sstevel@tonic-gate extern int TerminalWindowSize(unsigned short *, unsigned short *);
293*0Sstevel@tonic-gate extern int TerminalWrite(char *, int);
294*0Sstevel@tonic-gate extern int TerminalSpecialChars(int);
295*0Sstevel@tonic-gate extern int tn(int, char **);
296*0Sstevel@tonic-gate extern int tninit(void);
297*0Sstevel@tonic-gate extern int ttyflush(int);
298*0Sstevel@tonic-gate extern int getconnmode(void);
299*0Sstevel@tonic-gate extern int xmitAO(void);
300*0Sstevel@tonic-gate extern int sendbrk(void);
301*0Sstevel@tonic-gate extern int dosynch(void);
302*0Sstevel@tonic-gate 
303*0Sstevel@tonic-gate extern cc_t *tcval(int);
304*0Sstevel@tonic-gate 
305*0Sstevel@tonic-gate extern void	auth_encrypt_init(char *, char *, char *);
306*0Sstevel@tonic-gate extern void	auth_encrypt_user(char *);
307*0Sstevel@tonic-gate extern int	net_write(unsigned char *, int len);
308*0Sstevel@tonic-gate extern void	net_encrypt(void);
309*0Sstevel@tonic-gate extern void	telnet_spin(void);
310*0Sstevel@tonic-gate extern void	printd(unsigned char *, int);
311*0Sstevel@tonic-gate 
312*0Sstevel@tonic-gate #ifndef	USE_TERMIO
313*0Sstevel@tonic-gate 
314*0Sstevel@tonic-gate extern struct	tchars ntc;
315*0Sstevel@tonic-gate extern struct	ltchars nltc;
316*0Sstevel@tonic-gate extern struct	sgttyb nttyb;
317*0Sstevel@tonic-gate 
318*0Sstevel@tonic-gate #define	termEofChar		ntc.t_eofc
319*0Sstevel@tonic-gate #define	termEraseChar		nttyb.sg_erase
320*0Sstevel@tonic-gate #define	termFlushChar		nltc.t_flushc
321*0Sstevel@tonic-gate #define	termIntChar		ntc.t_intrc
322*0Sstevel@tonic-gate #define	termKillChar		nttyb.sg_kill
323*0Sstevel@tonic-gate #define	termLiteralNextChar	nltc.t_lnextc
324*0Sstevel@tonic-gate #define	termQuitChar		ntc.t_quitc
325*0Sstevel@tonic-gate #define	termSuspChar		nltc.t_suspc
326*0Sstevel@tonic-gate #define	termRprntChar		nltc.t_rprntc
327*0Sstevel@tonic-gate #define	termWerasChar		nltc.t_werasc
328*0Sstevel@tonic-gate #define	termStartChar		ntc.t_startc
329*0Sstevel@tonic-gate #define	termStopChar		ntc.t_stopc
330*0Sstevel@tonic-gate #define	termForw1Char		ntc.t_brkc
331*0Sstevel@tonic-gate extern cc_t termForw2Char;
332*0Sstevel@tonic-gate extern cc_t termAytChar;
333*0Sstevel@tonic-gate 
334*0Sstevel@tonic-gate #define	termEofCharp		(cc_t *)&ntc.t_eofc
335*0Sstevel@tonic-gate #define	termEraseCharp		(cc_t *)&nttyb.sg_erase
336*0Sstevel@tonic-gate #define	termFlushCharp		(cc_t *)&nltc.t_flushc
337*0Sstevel@tonic-gate #define	termIntCharp		(cc_t *)&ntc.t_intrc
338*0Sstevel@tonic-gate #define	termKillCharp		(cc_t *)&nttyb.sg_kill
339*0Sstevel@tonic-gate #define	termLiteralNextCharp	(cc_t *)&nltc.t_lnextc
340*0Sstevel@tonic-gate #define	termQuitCharp		(cc_t *)&ntc.t_quitc
341*0Sstevel@tonic-gate #define	termSuspCharp		(cc_t *)&nltc.t_suspc
342*0Sstevel@tonic-gate #define	termRprntCharp		(cc_t *)&nltc.t_rprntc
343*0Sstevel@tonic-gate #define	termWerasCharp		(cc_t *)&nltc.t_werasc
344*0Sstevel@tonic-gate #define	termStartCharp		(cc_t *)&ntc.t_startc
345*0Sstevel@tonic-gate #define	termStopCharp		(cc_t *)&ntc.t_stopc
346*0Sstevel@tonic-gate #define	termForw1Charp		(cc_t *)&ntc.t_brkc
347*0Sstevel@tonic-gate #define	termForw2Charp		(cc_t *)&termForw2Char
348*0Sstevel@tonic-gate #define	termAytCharp		(cc_t *)&termAytChar
349*0Sstevel@tonic-gate 
350*0Sstevel@tonic-gate #else
351*0Sstevel@tonic-gate 
352*0Sstevel@tonic-gate extern struct	termio new_tc;
353*0Sstevel@tonic-gate 
354*0Sstevel@tonic-gate #define	termEofChar		new_tc.c_cc[VEOF]
355*0Sstevel@tonic-gate #define	termEraseChar		new_tc.c_cc[VERASE]
356*0Sstevel@tonic-gate #define	termIntChar		new_tc.c_cc[VINTR]
357*0Sstevel@tonic-gate #define	termKillChar		new_tc.c_cc[VKILL]
358*0Sstevel@tonic-gate #define	termQuitChar		new_tc.c_cc[VQUIT]
359*0Sstevel@tonic-gate 
360*0Sstevel@tonic-gate #define	termSuspChar		new_tc.c_cc[VSUSP]
361*0Sstevel@tonic-gate #define	termFlushChar		new_tc.c_cc[VDISCARD]
362*0Sstevel@tonic-gate #define	termWerasChar		new_tc.c_cc[VWERASE]
363*0Sstevel@tonic-gate #define	termRprntChar		new_tc.c_cc[VREPRINT]
364*0Sstevel@tonic-gate #define	termLiteralNextChar	new_tc.c_cc[VLNEXT]
365*0Sstevel@tonic-gate #define	termStartChar		new_tc.c_cc[VSTART]
366*0Sstevel@tonic-gate #define	termStopChar		new_tc.c_cc[VSTOP]
367*0Sstevel@tonic-gate #define	termForw1Char		new_tc.c_cc[VEOL]
368*0Sstevel@tonic-gate #define	termForw2Char		new_tc.c_cc[VEOL]
369*0Sstevel@tonic-gate extern cc_t termAytChar;
370*0Sstevel@tonic-gate 
371*0Sstevel@tonic-gate #define	termEofCharp		&termEofChar
372*0Sstevel@tonic-gate #define	termEraseCharp		&termEraseChar
373*0Sstevel@tonic-gate #define	termIntCharp		&termIntChar
374*0Sstevel@tonic-gate #define	termKillCharp		&termKillChar
375*0Sstevel@tonic-gate #define	termQuitCharp		&termQuitChar
376*0Sstevel@tonic-gate #define	termSuspCharp		&termSuspChar
377*0Sstevel@tonic-gate #define	termFlushCharp		&termFlushChar
378*0Sstevel@tonic-gate #define	termWerasCharp		&termWerasChar
379*0Sstevel@tonic-gate #define	termRprntCharp		&termRprntChar
380*0Sstevel@tonic-gate #define	termLiteralNextCharp	&termLiteralNextChar
381*0Sstevel@tonic-gate #define	termStartCharp		&termStartChar
382*0Sstevel@tonic-gate #define	termStopCharp		&termStopChar
383*0Sstevel@tonic-gate #define	termForw1Charp		&termForw1Char
384*0Sstevel@tonic-gate #define	termForw2Charp		&termForw2Char
385*0Sstevel@tonic-gate #define	termAytCharp		&termAytChar
386*0Sstevel@tonic-gate #endif
387*0Sstevel@tonic-gate 
388*0Sstevel@tonic-gate 
389*0Sstevel@tonic-gate /* Ring buffer structures which are shared */
390*0Sstevel@tonic-gate 
391*0Sstevel@tonic-gate #include "ring.h"
392*0Sstevel@tonic-gate 
393*0Sstevel@tonic-gate extern Ring netoring;
394*0Sstevel@tonic-gate extern Ring netiring;
395*0Sstevel@tonic-gate extern Ring ttyoring;
396*0Sstevel@tonic-gate extern Ring ttyiring;
397*0Sstevel@tonic-gate 
398*0Sstevel@tonic-gate #ifdef	__cplusplus
399*0Sstevel@tonic-gate }
400*0Sstevel@tonic-gate #endif
401*0Sstevel@tonic-gate 
402*0Sstevel@tonic-gate #endif	/* _EXTERNS_H */
403