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