summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ttymon/tmextern.h
blob: c285b434eb84949068d3de973a741c02f5d048f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
/*	  All Rights Reserved  	*/

#ifndef	_TMEXTERN_H
#define	_TMEXTERN_H

#include "tmstruct.h"

#ifdef	__cplusplus
extern "C" {
#endif

	extern	void	setup_PCpipe();

/* tmautobaud.c	*/
	extern	int	auto_termio();
	extern	char	*autobaud();

/* tmchild.c 	*/
	extern	void	write_prompt();
	extern 	void 	timedout();

/* tmexpress.c 	*/
	extern	void	ttymon_express();

/* tmhandler.c 	*/
	extern	void	do_poll();
	extern 	void 	sigterm();
	extern 	void 	sigchild();
	extern 	void	state_change();
	extern 	void	re_read();
	extern 	void	got_carrier();

/* tmlock.c 	*/
	extern	int	tm_checklock();
	extern	int	tm_lock();

/* tmlog.c 	*/
	extern 	void 	log(const char *, ...);
	extern 	void 	fatal(const char *, ...);
	extern	void	openttymonlog(void);

/* tmparse.c 	*/
	extern	char	*getword();
	extern	char	quoted();

/* tmpeek.c 	*/
	extern	int	poll_data();

/* tmpmtab.c 	*/
	extern	void	read_pmtab();
	extern	void	purge();

/* tmsac.c 	*/
	extern 	void	openpid();
	extern 	void	openpipes();
	extern 	void	get_environ();
	extern	void	sacpoll();

/* tmsig.c 	*/
	extern 	void catch_signals();
	extern 	void child_sigcatch();

/* tmterm.c 	*/
	extern  int	push_linedisc();
	extern	int	set_termio();
	extern	int	initial_termio();
	extern	int	hang_up_line();
	extern	void 	flush_input();

/* tmttydefs.c 	*/
	extern	void	read_ttydefs();
	extern 	struct 	Gdef *find_def();
	extern  char 	*getword();
	extern	void	mkargv();

/* tmutmp.c 	*/
	extern 	int 	account();
	extern 	void 	cleanut();

/* tmutil.c 	*/
	extern	int	check_device();
	extern	int	check_cmd();
	extern	void	cons_printf(const char *, ...);

/* misc sys call or lib function call */
	extern	int	check_version();
	extern	int	fchown();
	extern	int	fchmod();

#ifdef	SYS_NAME
	extern 	void sys_name();
#endif


/* tmglobal.c 	*/
	extern	struct	pmtab	*PMtab;
	extern	int	Nentries;

	extern	int	Npollfd;

	extern	struct 	Gdef Gdef[];
	extern	int	Ndefs;
	extern	long	Mtime;

	extern	FILE	*Logfp;
	extern	int	Sfd, Pfd;
	extern	int	PCpipe[];
	extern	int	Lckfd;

	extern	char	State;
	extern	char	*Istate;
	extern	char	*Tag;
	extern	int	Reread_flag;

	extern	int 	Maxfiles;
	extern	int 	Maxfds;

	extern	char	**environ;
	extern	char	*optarg;
	extern	int	optind, opterr;

	extern	int	Nlocked;

	extern	sigset_t	Origmask;
	extern	struct	sigaction	Sigalrm;	/* SIGALRM */
	extern	struct	sigaction	Sigcld;		/* SIGCLD */
	extern	struct	sigaction	Sigint;		/* SIGINT */
	extern	struct	sigaction	Sigpoll;	/* SIGPOLL */
	extern	struct	sigaction	Sigquit;	/* SIGQUIT */
	extern	struct	sigaction	Sigterm;	/* SIGTERM */
#ifdef	DEBUG
	extern	struct	sigaction	Sigusr1;	/* SIGUSR1 */
	extern	struct	sigaction	Sigusr2;	/* SIGUSR2 */
#endif

#ifdef	DEBUG
	extern	FILE	*Debugfp;
	extern	void	debug(const char *, ...);
#endif

	extern	uid_t	Uucp_uid;
	extern	gid_t	Tty_gid;
	extern	struct	strbuf *peek_ptr;

	extern	int	Logmaxsz;
	extern	int	Splflag;

#ifdef	__cplusplus
}
#endif

#endif	/* _TMEXTERN_H */