xref: /titanic_44/usr/src/cmd/ttymon/tmextern.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #ifndef	__TMEXTERN_H
32*7c478bd9Sstevel@tonic-gate #define	__TMEXTERN_H
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
37*7c478bd9Sstevel@tonic-gate extern "C" {
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate 	extern	void	setup_PCpipe();
41*7c478bd9Sstevel@tonic-gate 
42*7c478bd9Sstevel@tonic-gate /* tmautobaud.c	*/
43*7c478bd9Sstevel@tonic-gate 	extern	int	auto_termio();
44*7c478bd9Sstevel@tonic-gate 	extern	char	*autobaud();
45*7c478bd9Sstevel@tonic-gate 
46*7c478bd9Sstevel@tonic-gate /* tmchild.c 	*/
47*7c478bd9Sstevel@tonic-gate 	extern	void	write_prompt();
48*7c478bd9Sstevel@tonic-gate 	extern 	void 	timedout();
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate /* tmexpress.c 	*/
51*7c478bd9Sstevel@tonic-gate 	extern	void	ttymon_express();
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /* tmhandler.c 	*/
54*7c478bd9Sstevel@tonic-gate 	extern	void	do_poll();
55*7c478bd9Sstevel@tonic-gate 	extern 	void 	sigterm();
56*7c478bd9Sstevel@tonic-gate 	extern 	void 	sigchild();
57*7c478bd9Sstevel@tonic-gate 	extern 	void	state_change();
58*7c478bd9Sstevel@tonic-gate 	extern 	void	re_read();
59*7c478bd9Sstevel@tonic-gate 	extern 	void	got_carrier();
60*7c478bd9Sstevel@tonic-gate 
61*7c478bd9Sstevel@tonic-gate /* tmlock.c 	*/
62*7c478bd9Sstevel@tonic-gate 	extern	int	tm_checklock();
63*7c478bd9Sstevel@tonic-gate 	extern	int	tm_lock();
64*7c478bd9Sstevel@tonic-gate 
65*7c478bd9Sstevel@tonic-gate /* tmlog.c 	*/
66*7c478bd9Sstevel@tonic-gate 	extern 	void 	log(const char *, ...);
67*7c478bd9Sstevel@tonic-gate 	extern 	void 	fatal(const char *, ...);
68*7c478bd9Sstevel@tonic-gate 	extern	void	openttymonlog(void);
69*7c478bd9Sstevel@tonic-gate 
70*7c478bd9Sstevel@tonic-gate /* tmparse.c 	*/
71*7c478bd9Sstevel@tonic-gate 	extern	char	*getword();
72*7c478bd9Sstevel@tonic-gate 	extern	char	quoted();
73*7c478bd9Sstevel@tonic-gate 
74*7c478bd9Sstevel@tonic-gate /* tmpeek.c 	*/
75*7c478bd9Sstevel@tonic-gate 	extern	int	poll_data();
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate /* tmpmtab.c 	*/
78*7c478bd9Sstevel@tonic-gate 	extern	void	read_pmtab();
79*7c478bd9Sstevel@tonic-gate 	extern	void	purge();
80*7c478bd9Sstevel@tonic-gate 
81*7c478bd9Sstevel@tonic-gate /* tmsac.c 	*/
82*7c478bd9Sstevel@tonic-gate 	extern 	void	openpid();
83*7c478bd9Sstevel@tonic-gate 	extern 	void	openpipes();
84*7c478bd9Sstevel@tonic-gate 	extern 	void	get_environ();
85*7c478bd9Sstevel@tonic-gate 	extern	void	sacpoll();
86*7c478bd9Sstevel@tonic-gate 
87*7c478bd9Sstevel@tonic-gate /* tmsig.c 	*/
88*7c478bd9Sstevel@tonic-gate 	extern 	void catch_signals();
89*7c478bd9Sstevel@tonic-gate 	extern 	void child_sigcatch();
90*7c478bd9Sstevel@tonic-gate 
91*7c478bd9Sstevel@tonic-gate /* tmterm.c 	*/
92*7c478bd9Sstevel@tonic-gate 	extern  int	push_linedisc();
93*7c478bd9Sstevel@tonic-gate 	extern	int	set_termio();
94*7c478bd9Sstevel@tonic-gate 	extern	int	initial_termio();
95*7c478bd9Sstevel@tonic-gate 	extern	int	hang_up_line();
96*7c478bd9Sstevel@tonic-gate 	extern	void 	flush_input();
97*7c478bd9Sstevel@tonic-gate 
98*7c478bd9Sstevel@tonic-gate /* tmttydefs.c 	*/
99*7c478bd9Sstevel@tonic-gate 	extern	void	read_ttydefs();
100*7c478bd9Sstevel@tonic-gate 	extern 	struct 	Gdef *find_def();
101*7c478bd9Sstevel@tonic-gate 	extern  char 	*getword();
102*7c478bd9Sstevel@tonic-gate 	extern	void	mkargv();
103*7c478bd9Sstevel@tonic-gate 
104*7c478bd9Sstevel@tonic-gate /* tmutmp.c 	*/
105*7c478bd9Sstevel@tonic-gate 	extern 	int 	account();
106*7c478bd9Sstevel@tonic-gate 	extern 	void 	cleanut();
107*7c478bd9Sstevel@tonic-gate 
108*7c478bd9Sstevel@tonic-gate /* tmutil.c 	*/
109*7c478bd9Sstevel@tonic-gate 	extern	int	check_device();
110*7c478bd9Sstevel@tonic-gate 	extern	int	check_cmd();
111*7c478bd9Sstevel@tonic-gate 	extern	void	cons_printf(const char *, ...);
112*7c478bd9Sstevel@tonic-gate 
113*7c478bd9Sstevel@tonic-gate /* misc sys call or lib function call */
114*7c478bd9Sstevel@tonic-gate 	extern	int	check_version();
115*7c478bd9Sstevel@tonic-gate 	extern	int	fchown();
116*7c478bd9Sstevel@tonic-gate 	extern	int	fchmod();
117*7c478bd9Sstevel@tonic-gate 
118*7c478bd9Sstevel@tonic-gate #ifdef	SYS_NAME
119*7c478bd9Sstevel@tonic-gate 	extern 	void sys_name();
120*7c478bd9Sstevel@tonic-gate #endif
121*7c478bd9Sstevel@tonic-gate 
122*7c478bd9Sstevel@tonic-gate 
123*7c478bd9Sstevel@tonic-gate /* tmglobal.c 	*/
124*7c478bd9Sstevel@tonic-gate 	extern	struct	pmtab	*PMtab;
125*7c478bd9Sstevel@tonic-gate 	extern	int	Nentries;
126*7c478bd9Sstevel@tonic-gate 
127*7c478bd9Sstevel@tonic-gate 	extern	int	Npollfd;
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate 	extern	struct 	Gdef Gdef[];
130*7c478bd9Sstevel@tonic-gate 	extern	int	Ndefs;
131*7c478bd9Sstevel@tonic-gate 	extern	long	Mtime;
132*7c478bd9Sstevel@tonic-gate 
133*7c478bd9Sstevel@tonic-gate 	extern	FILE	*Logfp;
134*7c478bd9Sstevel@tonic-gate 	extern	int	Sfd, Pfd;
135*7c478bd9Sstevel@tonic-gate 	extern	int	PCpipe[];
136*7c478bd9Sstevel@tonic-gate 	extern	int	Lckfd;
137*7c478bd9Sstevel@tonic-gate 
138*7c478bd9Sstevel@tonic-gate 	extern	char	State;
139*7c478bd9Sstevel@tonic-gate 	extern	char	*Istate;
140*7c478bd9Sstevel@tonic-gate 	extern	char	*Tag;
141*7c478bd9Sstevel@tonic-gate 	extern	int	Reread_flag;
142*7c478bd9Sstevel@tonic-gate 
143*7c478bd9Sstevel@tonic-gate 	extern	int 	Maxfiles;
144*7c478bd9Sstevel@tonic-gate 	extern	int 	Maxfds;
145*7c478bd9Sstevel@tonic-gate 
146*7c478bd9Sstevel@tonic-gate 	extern	char	**environ;
147*7c478bd9Sstevel@tonic-gate 	extern	char	*optarg;
148*7c478bd9Sstevel@tonic-gate 	extern	int	optind, opterr;
149*7c478bd9Sstevel@tonic-gate 
150*7c478bd9Sstevel@tonic-gate 	extern	int	Nlocked;
151*7c478bd9Sstevel@tonic-gate 
152*7c478bd9Sstevel@tonic-gate 	extern	sigset_t	Origmask;
153*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigalrm;	/* SIGALRM */
154*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigcld;		/* SIGCLD */
155*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigint;		/* SIGINT */
156*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigpoll;	/* SIGPOLL */
157*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigterm;	/* SIGTERM */
158*7c478bd9Sstevel@tonic-gate #ifdef	DEBUG
159*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigusr1;	/* SIGUSR1 */
160*7c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigusr2;	/* SIGUSR2 */
161*7c478bd9Sstevel@tonic-gate #endif
162*7c478bd9Sstevel@tonic-gate 
163*7c478bd9Sstevel@tonic-gate #ifdef	DEBUG
164*7c478bd9Sstevel@tonic-gate 	extern	FILE	*Debugfp;
165*7c478bd9Sstevel@tonic-gate 	extern	void	debug(const char *, ...);
166*7c478bd9Sstevel@tonic-gate #endif
167*7c478bd9Sstevel@tonic-gate 
168*7c478bd9Sstevel@tonic-gate 	extern	uid_t	Uucp_uid;
169*7c478bd9Sstevel@tonic-gate 	extern	gid_t	Tty_gid;
170*7c478bd9Sstevel@tonic-gate 	extern	struct	strbuf *peek_ptr;
171*7c478bd9Sstevel@tonic-gate 
172*7c478bd9Sstevel@tonic-gate 	extern	int	Logmaxsz;
173*7c478bd9Sstevel@tonic-gate 	extern	int	Splflag;
174*7c478bd9Sstevel@tonic-gate 
175*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
176*7c478bd9Sstevel@tonic-gate }
177*7c478bd9Sstevel@tonic-gate #endif
178*7c478bd9Sstevel@tonic-gate 
179*7c478bd9Sstevel@tonic-gate #endif	/* __TMEXTERN_H */
180