xref: /titanic_50/usr/src/cmd/ttymon/tmextern.h (revision d67944fbe3fa0b31893a7116a09b0718eecf6078)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5b77c815bSNobutomo Nakano  * Common Development and Distribution License (the "License").
6b77c815bSNobutomo Nakano  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22b77c815bSNobutomo Nakano  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
277c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
287c478bd9Sstevel@tonic-gate 
29*d67944fbSScott Rotondo #ifndef	_TMEXTERN_H
30*d67944fbSScott Rotondo #define	_TMEXTERN_H
317c478bd9Sstevel@tonic-gate 
32*d67944fbSScott Rotondo #include "tmstruct.h"
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
357c478bd9Sstevel@tonic-gate extern "C" {
367c478bd9Sstevel@tonic-gate #endif
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate 	extern	void	setup_PCpipe();
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate /* tmautobaud.c	*/
417c478bd9Sstevel@tonic-gate 	extern	int	auto_termio();
427c478bd9Sstevel@tonic-gate 	extern	char	*autobaud();
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate /* tmchild.c 	*/
457c478bd9Sstevel@tonic-gate 	extern	void	write_prompt();
467c478bd9Sstevel@tonic-gate 	extern 	void 	timedout();
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate /* tmexpress.c 	*/
497c478bd9Sstevel@tonic-gate 	extern	void	ttymon_express();
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /* tmhandler.c 	*/
527c478bd9Sstevel@tonic-gate 	extern	void	do_poll();
537c478bd9Sstevel@tonic-gate 	extern 	void 	sigterm();
547c478bd9Sstevel@tonic-gate 	extern 	void 	sigchild();
557c478bd9Sstevel@tonic-gate 	extern 	void	state_change();
567c478bd9Sstevel@tonic-gate 	extern 	void	re_read();
577c478bd9Sstevel@tonic-gate 	extern 	void	got_carrier();
587c478bd9Sstevel@tonic-gate 
597c478bd9Sstevel@tonic-gate /* tmlock.c 	*/
607c478bd9Sstevel@tonic-gate 	extern	int	tm_checklock();
617c478bd9Sstevel@tonic-gate 	extern	int	tm_lock();
627c478bd9Sstevel@tonic-gate 
637c478bd9Sstevel@tonic-gate /* tmlog.c 	*/
647c478bd9Sstevel@tonic-gate 	extern 	void 	log(const char *, ...);
657c478bd9Sstevel@tonic-gate 	extern 	void 	fatal(const char *, ...);
667c478bd9Sstevel@tonic-gate 	extern	void	openttymonlog(void);
677c478bd9Sstevel@tonic-gate 
687c478bd9Sstevel@tonic-gate /* tmparse.c 	*/
697c478bd9Sstevel@tonic-gate 	extern	char	*getword();
707c478bd9Sstevel@tonic-gate 	extern	char	quoted();
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate /* tmpeek.c 	*/
737c478bd9Sstevel@tonic-gate 	extern	int	poll_data();
747c478bd9Sstevel@tonic-gate 
757c478bd9Sstevel@tonic-gate /* tmpmtab.c 	*/
767c478bd9Sstevel@tonic-gate 	extern	void	read_pmtab();
777c478bd9Sstevel@tonic-gate 	extern	void	purge();
787c478bd9Sstevel@tonic-gate 
797c478bd9Sstevel@tonic-gate /* tmsac.c 	*/
807c478bd9Sstevel@tonic-gate 	extern 	void	openpid();
817c478bd9Sstevel@tonic-gate 	extern 	void	openpipes();
827c478bd9Sstevel@tonic-gate 	extern 	void	get_environ();
837c478bd9Sstevel@tonic-gate 	extern	void	sacpoll();
847c478bd9Sstevel@tonic-gate 
857c478bd9Sstevel@tonic-gate /* tmsig.c 	*/
867c478bd9Sstevel@tonic-gate 	extern 	void catch_signals();
877c478bd9Sstevel@tonic-gate 	extern 	void child_sigcatch();
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate /* tmterm.c 	*/
907c478bd9Sstevel@tonic-gate 	extern  int	push_linedisc();
917c478bd9Sstevel@tonic-gate 	extern	int	set_termio();
927c478bd9Sstevel@tonic-gate 	extern	int	initial_termio();
937c478bd9Sstevel@tonic-gate 	extern	int	hang_up_line();
947c478bd9Sstevel@tonic-gate 	extern	void 	flush_input();
957c478bd9Sstevel@tonic-gate 
967c478bd9Sstevel@tonic-gate /* tmttydefs.c 	*/
977c478bd9Sstevel@tonic-gate 	extern	void	read_ttydefs();
987c478bd9Sstevel@tonic-gate 	extern 	struct 	Gdef *find_def();
997c478bd9Sstevel@tonic-gate 	extern  char 	*getword();
1007c478bd9Sstevel@tonic-gate 	extern	void	mkargv();
1017c478bd9Sstevel@tonic-gate 
1027c478bd9Sstevel@tonic-gate /* tmutmp.c 	*/
1037c478bd9Sstevel@tonic-gate 	extern 	int 	account();
1047c478bd9Sstevel@tonic-gate 	extern 	void 	cleanut();
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate /* tmutil.c 	*/
1077c478bd9Sstevel@tonic-gate 	extern	int	check_device();
1087c478bd9Sstevel@tonic-gate 	extern	int	check_cmd();
1097c478bd9Sstevel@tonic-gate 	extern	void	cons_printf(const char *, ...);
1107c478bd9Sstevel@tonic-gate 
1117c478bd9Sstevel@tonic-gate /* misc sys call or lib function call */
1127c478bd9Sstevel@tonic-gate 	extern	int	check_version();
1137c478bd9Sstevel@tonic-gate 	extern	int	fchown();
1147c478bd9Sstevel@tonic-gate 	extern	int	fchmod();
1157c478bd9Sstevel@tonic-gate 
1167c478bd9Sstevel@tonic-gate #ifdef	SYS_NAME
1177c478bd9Sstevel@tonic-gate 	extern 	void sys_name();
1187c478bd9Sstevel@tonic-gate #endif
1197c478bd9Sstevel@tonic-gate 
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate /* tmglobal.c 	*/
1227c478bd9Sstevel@tonic-gate 	extern	struct	pmtab	*PMtab;
1237c478bd9Sstevel@tonic-gate 	extern	int	Nentries;
1247c478bd9Sstevel@tonic-gate 
1257c478bd9Sstevel@tonic-gate 	extern	int	Npollfd;
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate 	extern	struct 	Gdef Gdef[];
1287c478bd9Sstevel@tonic-gate 	extern	int	Ndefs;
1297c478bd9Sstevel@tonic-gate 	extern	long	Mtime;
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate 	extern	FILE	*Logfp;
1327c478bd9Sstevel@tonic-gate 	extern	int	Sfd, Pfd;
1337c478bd9Sstevel@tonic-gate 	extern	int	PCpipe[];
1347c478bd9Sstevel@tonic-gate 	extern	int	Lckfd;
1357c478bd9Sstevel@tonic-gate 
1367c478bd9Sstevel@tonic-gate 	extern	char	State;
1377c478bd9Sstevel@tonic-gate 	extern	char	*Istate;
1387c478bd9Sstevel@tonic-gate 	extern	char	*Tag;
1397c478bd9Sstevel@tonic-gate 	extern	int	Reread_flag;
1407c478bd9Sstevel@tonic-gate 
1417c478bd9Sstevel@tonic-gate 	extern	int 	Maxfiles;
1427c478bd9Sstevel@tonic-gate 	extern	int 	Maxfds;
1437c478bd9Sstevel@tonic-gate 
1447c478bd9Sstevel@tonic-gate 	extern	char	**environ;
1457c478bd9Sstevel@tonic-gate 	extern	char	*optarg;
1467c478bd9Sstevel@tonic-gate 	extern	int	optind, opterr;
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate 	extern	int	Nlocked;
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate 	extern	sigset_t	Origmask;
1517c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigalrm;	/* SIGALRM */
1527c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigcld;		/* SIGCLD */
1537c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigint;		/* SIGINT */
1547c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigpoll;	/* SIGPOLL */
155b77c815bSNobutomo Nakano 	extern	struct	sigaction	Sigquit;	/* SIGQUIT */
1567c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigterm;	/* SIGTERM */
1577c478bd9Sstevel@tonic-gate #ifdef	DEBUG
1587c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigusr1;	/* SIGUSR1 */
1597c478bd9Sstevel@tonic-gate 	extern	struct	sigaction	Sigusr2;	/* SIGUSR2 */
1607c478bd9Sstevel@tonic-gate #endif
1617c478bd9Sstevel@tonic-gate 
1627c478bd9Sstevel@tonic-gate #ifdef	DEBUG
1637c478bd9Sstevel@tonic-gate 	extern	FILE	*Debugfp;
1647c478bd9Sstevel@tonic-gate 	extern	void	debug(const char *, ...);
1657c478bd9Sstevel@tonic-gate #endif
1667c478bd9Sstevel@tonic-gate 
1677c478bd9Sstevel@tonic-gate 	extern	uid_t	Uucp_uid;
1687c478bd9Sstevel@tonic-gate 	extern	gid_t	Tty_gid;
1697c478bd9Sstevel@tonic-gate 	extern	struct	strbuf *peek_ptr;
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate 	extern	int	Logmaxsz;
1727c478bd9Sstevel@tonic-gate 	extern	int	Splflag;
1737c478bd9Sstevel@tonic-gate 
1747c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1757c478bd9Sstevel@tonic-gate }
1767c478bd9Sstevel@tonic-gate #endif
1777c478bd9Sstevel@tonic-gate 
178*d67944fbSScott Rotondo #endif	/* _TMEXTERN_H */
179