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