xref: /onnv-gate/usr/src/cmd/ttymon/tmextern.h (revision 9694:78fafb281255)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
59300SNobutomo.Nakano@Sun.COM  * Common Development and Distribution License (the "License").
69300SNobutomo.Nakano@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
229300SNobutomo.Nakano@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
270Sstevel@tonic-gate /*	  All Rights Reserved  	*/
280Sstevel@tonic-gate 
29*9694SScott.Rotondo@Sun.COM #ifndef	_TMEXTERN_H
30*9694SScott.Rotondo@Sun.COM #define	_TMEXTERN_H
310Sstevel@tonic-gate 
32*9694SScott.Rotondo@Sun.COM #include "tmstruct.h"
330Sstevel@tonic-gate 
340Sstevel@tonic-gate #ifdef	__cplusplus
350Sstevel@tonic-gate extern "C" {
360Sstevel@tonic-gate #endif
370Sstevel@tonic-gate 
380Sstevel@tonic-gate 	extern	void	setup_PCpipe();
390Sstevel@tonic-gate 
400Sstevel@tonic-gate /* tmautobaud.c	*/
410Sstevel@tonic-gate 	extern	int	auto_termio();
420Sstevel@tonic-gate 	extern	char	*autobaud();
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /* tmchild.c 	*/
450Sstevel@tonic-gate 	extern	void	write_prompt();
460Sstevel@tonic-gate 	extern 	void 	timedout();
470Sstevel@tonic-gate 
480Sstevel@tonic-gate /* tmexpress.c 	*/
490Sstevel@tonic-gate 	extern	void	ttymon_express();
500Sstevel@tonic-gate 
510Sstevel@tonic-gate /* tmhandler.c 	*/
520Sstevel@tonic-gate 	extern	void	do_poll();
530Sstevel@tonic-gate 	extern 	void 	sigterm();
540Sstevel@tonic-gate 	extern 	void 	sigchild();
550Sstevel@tonic-gate 	extern 	void	state_change();
560Sstevel@tonic-gate 	extern 	void	re_read();
570Sstevel@tonic-gate 	extern 	void	got_carrier();
580Sstevel@tonic-gate 
590Sstevel@tonic-gate /* tmlock.c 	*/
600Sstevel@tonic-gate 	extern	int	tm_checklock();
610Sstevel@tonic-gate 	extern	int	tm_lock();
620Sstevel@tonic-gate 
630Sstevel@tonic-gate /* tmlog.c 	*/
640Sstevel@tonic-gate 	extern 	void 	log(const char *, ...);
650Sstevel@tonic-gate 	extern 	void 	fatal(const char *, ...);
660Sstevel@tonic-gate 	extern	void	openttymonlog(void);
670Sstevel@tonic-gate 
680Sstevel@tonic-gate /* tmparse.c 	*/
690Sstevel@tonic-gate 	extern	char	*getword();
700Sstevel@tonic-gate 	extern	char	quoted();
710Sstevel@tonic-gate 
720Sstevel@tonic-gate /* tmpeek.c 	*/
730Sstevel@tonic-gate 	extern	int	poll_data();
740Sstevel@tonic-gate 
750Sstevel@tonic-gate /* tmpmtab.c 	*/
760Sstevel@tonic-gate 	extern	void	read_pmtab();
770Sstevel@tonic-gate 	extern	void	purge();
780Sstevel@tonic-gate 
790Sstevel@tonic-gate /* tmsac.c 	*/
800Sstevel@tonic-gate 	extern 	void	openpid();
810Sstevel@tonic-gate 	extern 	void	openpipes();
820Sstevel@tonic-gate 	extern 	void	get_environ();
830Sstevel@tonic-gate 	extern	void	sacpoll();
840Sstevel@tonic-gate 
850Sstevel@tonic-gate /* tmsig.c 	*/
860Sstevel@tonic-gate 	extern 	void catch_signals();
870Sstevel@tonic-gate 	extern 	void child_sigcatch();
880Sstevel@tonic-gate 
890Sstevel@tonic-gate /* tmterm.c 	*/
900Sstevel@tonic-gate 	extern  int	push_linedisc();
910Sstevel@tonic-gate 	extern	int	set_termio();
920Sstevel@tonic-gate 	extern	int	initial_termio();
930Sstevel@tonic-gate 	extern	int	hang_up_line();
940Sstevel@tonic-gate 	extern	void 	flush_input();
950Sstevel@tonic-gate 
960Sstevel@tonic-gate /* tmttydefs.c 	*/
970Sstevel@tonic-gate 	extern	void	read_ttydefs();
980Sstevel@tonic-gate 	extern 	struct 	Gdef *find_def();
990Sstevel@tonic-gate 	extern  char 	*getword();
1000Sstevel@tonic-gate 	extern	void	mkargv();
1010Sstevel@tonic-gate 
1020Sstevel@tonic-gate /* tmutmp.c 	*/
1030Sstevel@tonic-gate 	extern 	int 	account();
1040Sstevel@tonic-gate 	extern 	void 	cleanut();
1050Sstevel@tonic-gate 
1060Sstevel@tonic-gate /* tmutil.c 	*/
1070Sstevel@tonic-gate 	extern	int	check_device();
1080Sstevel@tonic-gate 	extern	int	check_cmd();
1090Sstevel@tonic-gate 	extern	void	cons_printf(const char *, ...);
1100Sstevel@tonic-gate 
1110Sstevel@tonic-gate /* misc sys call or lib function call */
1120Sstevel@tonic-gate 	extern	int	check_version();
1130Sstevel@tonic-gate 	extern	int	fchown();
1140Sstevel@tonic-gate 	extern	int	fchmod();
1150Sstevel@tonic-gate 
1160Sstevel@tonic-gate #ifdef	SYS_NAME
1170Sstevel@tonic-gate 	extern 	void sys_name();
1180Sstevel@tonic-gate #endif
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate 
1210Sstevel@tonic-gate /* tmglobal.c 	*/
1220Sstevel@tonic-gate 	extern	struct	pmtab	*PMtab;
1230Sstevel@tonic-gate 	extern	int	Nentries;
1240Sstevel@tonic-gate 
1250Sstevel@tonic-gate 	extern	int	Npollfd;
1260Sstevel@tonic-gate 
1270Sstevel@tonic-gate 	extern	struct 	Gdef Gdef[];
1280Sstevel@tonic-gate 	extern	int	Ndefs;
1290Sstevel@tonic-gate 	extern	long	Mtime;
1300Sstevel@tonic-gate 
1310Sstevel@tonic-gate 	extern	FILE	*Logfp;
1320Sstevel@tonic-gate 	extern	int	Sfd, Pfd;
1330Sstevel@tonic-gate 	extern	int	PCpipe[];
1340Sstevel@tonic-gate 	extern	int	Lckfd;
1350Sstevel@tonic-gate 
1360Sstevel@tonic-gate 	extern	char	State;
1370Sstevel@tonic-gate 	extern	char	*Istate;
1380Sstevel@tonic-gate 	extern	char	*Tag;
1390Sstevel@tonic-gate 	extern	int	Reread_flag;
1400Sstevel@tonic-gate 
1410Sstevel@tonic-gate 	extern	int 	Maxfiles;
1420Sstevel@tonic-gate 	extern	int 	Maxfds;
1430Sstevel@tonic-gate 
1440Sstevel@tonic-gate 	extern	char	**environ;
1450Sstevel@tonic-gate 	extern	char	*optarg;
1460Sstevel@tonic-gate 	extern	int	optind, opterr;
1470Sstevel@tonic-gate 
1480Sstevel@tonic-gate 	extern	int	Nlocked;
1490Sstevel@tonic-gate 
1500Sstevel@tonic-gate 	extern	sigset_t	Origmask;
1510Sstevel@tonic-gate 	extern	struct	sigaction	Sigalrm;	/* SIGALRM */
1520Sstevel@tonic-gate 	extern	struct	sigaction	Sigcld;		/* SIGCLD */
1530Sstevel@tonic-gate 	extern	struct	sigaction	Sigint;		/* SIGINT */
1540Sstevel@tonic-gate 	extern	struct	sigaction	Sigpoll;	/* SIGPOLL */
1559300SNobutomo.Nakano@Sun.COM 	extern	struct	sigaction	Sigquit;	/* SIGQUIT */
1560Sstevel@tonic-gate 	extern	struct	sigaction	Sigterm;	/* SIGTERM */
1570Sstevel@tonic-gate #ifdef	DEBUG
1580Sstevel@tonic-gate 	extern	struct	sigaction	Sigusr1;	/* SIGUSR1 */
1590Sstevel@tonic-gate 	extern	struct	sigaction	Sigusr2;	/* SIGUSR2 */
1600Sstevel@tonic-gate #endif
1610Sstevel@tonic-gate 
1620Sstevel@tonic-gate #ifdef	DEBUG
1630Sstevel@tonic-gate 	extern	FILE	*Debugfp;
1640Sstevel@tonic-gate 	extern	void	debug(const char *, ...);
1650Sstevel@tonic-gate #endif
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate 	extern	uid_t	Uucp_uid;
1680Sstevel@tonic-gate 	extern	gid_t	Tty_gid;
1690Sstevel@tonic-gate 	extern	struct	strbuf *peek_ptr;
1700Sstevel@tonic-gate 
1710Sstevel@tonic-gate 	extern	int	Logmaxsz;
1720Sstevel@tonic-gate 	extern	int	Splflag;
1730Sstevel@tonic-gate 
1740Sstevel@tonic-gate #ifdef	__cplusplus
1750Sstevel@tonic-gate }
1760Sstevel@tonic-gate #endif
1770Sstevel@tonic-gate 
178*9694SScott.Rotondo@Sun.COM #endif	/* _TMEXTERN_H */
179