xref: /titanic_41/usr/src/cmd/ttymon/tmextern.h (revision c3c82186300a3bf11cfdda43b1cca3cd6b333629)
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 
30 #ifndef	__TMEXTERN_H
31 #define	__TMEXTERN_H
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 	extern	void	setup_PCpipe();
38 
39 /* tmautobaud.c	*/
40 	extern	int	auto_termio();
41 	extern	char	*autobaud();
42 
43 /* tmchild.c 	*/
44 	extern	void	write_prompt();
45 	extern 	void 	timedout();
46 
47 /* tmexpress.c 	*/
48 	extern	void	ttymon_express();
49 
50 /* tmhandler.c 	*/
51 	extern	void	do_poll();
52 	extern 	void 	sigterm();
53 	extern 	void 	sigchild();
54 	extern 	void	state_change();
55 	extern 	void	re_read();
56 	extern 	void	got_carrier();
57 
58 /* tmlock.c 	*/
59 	extern	int	tm_checklock();
60 	extern	int	tm_lock();
61 
62 /* tmlog.c 	*/
63 	extern 	void 	log(const char *, ...);
64 	extern 	void 	fatal(const char *, ...);
65 	extern	void	openttymonlog(void);
66 
67 /* tmparse.c 	*/
68 	extern	char	*getword();
69 	extern	char	quoted();
70 
71 /* tmpeek.c 	*/
72 	extern	int	poll_data();
73 
74 /* tmpmtab.c 	*/
75 	extern	void	read_pmtab();
76 	extern	void	purge();
77 
78 /* tmsac.c 	*/
79 	extern 	void	openpid();
80 	extern 	void	openpipes();
81 	extern 	void	get_environ();
82 	extern	void	sacpoll();
83 
84 /* tmsig.c 	*/
85 	extern 	void catch_signals();
86 	extern 	void child_sigcatch();
87 
88 /* tmterm.c 	*/
89 	extern  int	push_linedisc();
90 	extern	int	set_termio();
91 	extern	int	initial_termio();
92 	extern	int	hang_up_line();
93 	extern	void 	flush_input();
94 
95 /* tmttydefs.c 	*/
96 	extern	void	read_ttydefs();
97 	extern 	struct 	Gdef *find_def();
98 	extern  char 	*getword();
99 	extern	void	mkargv();
100 
101 /* tmutmp.c 	*/
102 	extern 	int 	account();
103 	extern 	void 	cleanut();
104 
105 /* tmutil.c 	*/
106 	extern	int	check_device();
107 	extern	int	check_cmd();
108 	extern	void	cons_printf(const char *, ...);
109 
110 /* misc sys call or lib function call */
111 	extern	int	check_version();
112 	extern	int	fchown();
113 	extern	int	fchmod();
114 
115 #ifdef	SYS_NAME
116 	extern 	void sys_name();
117 #endif
118 
119 
120 /* tmglobal.c 	*/
121 	extern	struct	pmtab	*PMtab;
122 	extern	int	Nentries;
123 
124 	extern	int	Npollfd;
125 
126 	extern	struct 	Gdef Gdef[];
127 	extern	int	Ndefs;
128 	extern	long	Mtime;
129 
130 	extern	FILE	*Logfp;
131 	extern	int	Sfd, Pfd;
132 	extern	int	PCpipe[];
133 	extern	int	Lckfd;
134 
135 	extern	char	State;
136 	extern	char	*Istate;
137 	extern	char	*Tag;
138 	extern	int	Reread_flag;
139 
140 	extern	int 	Maxfiles;
141 	extern	int 	Maxfds;
142 
143 	extern	char	**environ;
144 	extern	char	*optarg;
145 	extern	int	optind, opterr;
146 
147 	extern	int	Nlocked;
148 
149 	extern	sigset_t	Origmask;
150 	extern	struct	sigaction	Sigalrm;	/* SIGALRM */
151 	extern	struct	sigaction	Sigcld;		/* SIGCLD */
152 	extern	struct	sigaction	Sigint;		/* SIGINT */
153 	extern	struct	sigaction	Sigpoll;	/* SIGPOLL */
154 	extern	struct	sigaction	Sigquit;	/* SIGQUIT */
155 	extern	struct	sigaction	Sigterm;	/* SIGTERM */
156 #ifdef	DEBUG
157 	extern	struct	sigaction	Sigusr1;	/* SIGUSR1 */
158 	extern	struct	sigaction	Sigusr2;	/* SIGUSR2 */
159 #endif
160 
161 #ifdef	DEBUG
162 	extern	FILE	*Debugfp;
163 	extern	void	debug(const char *, ...);
164 #endif
165 
166 	extern	uid_t	Uucp_uid;
167 	extern	gid_t	Tty_gid;
168 	extern	struct	strbuf *peek_ptr;
169 
170 	extern	int	Logmaxsz;
171 	extern	int	Splflag;
172 
173 #ifdef	__cplusplus
174 }
175 #endif
176 
177 #endif	/* __TMEXTERN_H */
178