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