17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
5aa4a4f3nf * Common Development and Distribution License (the "License").
6aa4a4f3nf * You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate *
87c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate * See the License for the specific language governing permissions
117c478bdstevel@tonic-gate * and limitations under the License.
127c478bdstevel@tonic-gate *
137c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate *
197c478bdstevel@tonic-gate * CDDL HEADER END
207c478bdstevel@tonic-gate */
215403172Roger A. Faulkner
227c478bdstevel@tonic-gate/*
23134a1f4Casper H.S. Dik * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bdstevel@tonic-gate */
257c478bdstevel@tonic-gate
267c478bdstevel@tonic-gate/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
277c478bdstevel@tonic-gate/*	  All Rights Reserved  	*/
287c478bdstevel@tonic-gate
297c478bdstevel@tonic-gate#ifndef	_PROTO_H
307c478bdstevel@tonic-gate#define	_PROTO_H
317c478bdstevel@tonic-gate
327c478bdstevel@tonic-gate#include <sys/procset.h>
337c478bdstevel@tonic-gate
347c478bdstevel@tonic-gate#ifdef	__cplusplus
357c478bdstevel@tonic-gateextern "C" {
367c478bdstevel@tonic-gate#endif
377c478bdstevel@tonic-gate
387c478bdstevel@tonic-gate/* avoid a bit of stdio locking */
397c478bdstevel@tonic-gate#define	fputc	putc_unlocked
407c478bdstevel@tonic-gate
417c478bdstevel@tonic-gate/* force (via setvbuf()) a reasonably large output file buffer size */
427c478bdstevel@tonic-gate#define	MYBUFSIZ	8192
437c478bdstevel@tonic-gate
447c478bdstevel@tonic-gate/*
457c478bdstevel@tonic-gate * Function prototypes for most external functions.
467c478bdstevel@tonic-gate */
477c478bdstevel@tonic-gate
487c478bdstevel@tonic-gateextern	private_t *get_private(void);
497c478bdstevel@tonic-gateextern	void	*my_malloc(size_t, const char *);
507c478bdstevel@tonic-gateextern	void	*my_realloc(void *, size_t, const char *);
517c478bdstevel@tonic-gateextern	void	*my_calloc(size_t, size_t, const char *);
527c478bdstevel@tonic-gateextern	void	make_pname(private_t *, id_t);
537c478bdstevel@tonic-gateextern	int	requested(private_t *, int, int);
547c478bdstevel@tonic-gateextern	int	jobcontrol(private_t *, int);
557c478bdstevel@tonic-gateextern	int	signalled(private_t *, int, int);
567c478bdstevel@tonic-gateextern	int	faulted(private_t *, int);
577c478bdstevel@tonic-gateextern	int	sysentry(private_t *, int);
587c478bdstevel@tonic-gateextern	int	sysexit(private_t *, int);
597c478bdstevel@tonic-gateextern	void	showbuffer(private_t *, long, long);
607c478bdstevel@tonic-gateextern	void	showbytes(const char *, int, char *);
617c478bdstevel@tonic-gateextern	void	accumulate(timestruc_t *,
627c478bdstevel@tonic-gate			const timestruc_t *, const timestruc_t *);
637c478bdstevel@tonic-gate
647c478bdstevel@tonic-gateextern	const char *ioctlname(private_t *, uint_t);
657c478bdstevel@tonic-gateextern	const char *ioctldatastruct(uint_t);
667c478bdstevel@tonic-gateextern	const char *fcntlname(int);
677c478bdstevel@tonic-gateextern	const char *sfsname(int);
687c478bdstevel@tonic-gateextern	const char *si86name(int);
697c478bdstevel@tonic-gateextern	const char *utscode(int);
707c478bdstevel@tonic-gateextern	const char *openarg(private_t *, int);
717c478bdstevel@tonic-gateextern	const char *whencearg(int);
727c478bdstevel@tonic-gateextern	const char *msgflags(private_t *, int);
737c478bdstevel@tonic-gateextern	const char *semflags(private_t *, int);
747c478bdstevel@tonic-gateextern	const char *shmflags(private_t *, int);
757c478bdstevel@tonic-gateextern	const char *msgcmd(int);
767c478bdstevel@tonic-gateextern	const char *semcmd(int);
777c478bdstevel@tonic-gateextern	const char *shmcmd(int);
787c478bdstevel@tonic-gateextern	const char *strrdopt(int);
797c478bdstevel@tonic-gateextern	const char *strevents(private_t *, int);
807c478bdstevel@tonic-gateextern	const char *tiocflush(private_t *, int);
817c478bdstevel@tonic-gateextern	const char *strflush(int);
827c478bdstevel@tonic-gateextern	const char *mountflags(private_t *, int);
837c478bdstevel@tonic-gateextern	const char *svfsflags(private_t *, ulong_t);
847c478bdstevel@tonic-gateextern	const char *sconfname(int);
857c478bdstevel@tonic-gateextern	const char *pathconfname(int);
867c478bdstevel@tonic-gateextern	const char *fuiname(int);
877c478bdstevel@tonic-gateextern	const char *fuflags(private_t *, int);
887c478bdstevel@tonic-gateextern	const char *ipprotos(int);
89aa4a4f3nfextern	const char *rctlsyscode(int);
90aa4a4f3nfextern	const char *rctl_local_flags(private_t *, uint_t val);
91aa4a4f3nfextern	const char *rctl_local_action(private_t *, uint_t val);
927c478bdstevel@tonic-gate
937c478bdstevel@tonic-gateextern	void	expound(private_t *, long, int);
947c478bdstevel@tonic-gateextern	void	prtimestruc(private_t *, const char *, timestruc_t *);
957c478bdstevel@tonic-gateextern	void	print_siginfo(private_t *, const siginfo_t *);
967c478bdstevel@tonic-gate
977c478bdstevel@tonic-gateextern	void	Flush(void);
987c478bdstevel@tonic-gateextern	void	Eserialize(void);
997c478bdstevel@tonic-gateextern	void	Xserialize(void);
1007c478bdstevel@tonic-gateextern	void	procadd(pid_t, const char *lwplist);
1017c478bdstevel@tonic-gateextern	int	lwptrace(pid_t, lwpid_t);
1027c478bdstevel@tonic-gateextern	void	procdel(void);
1037c478bdstevel@tonic-gateextern	int	checkproc(private_t *);
1047c478bdstevel@tonic-gate
1057c478bdstevel@tonic-gateextern	int	syslist(char *, sysset_t *, int *);
1067c478bdstevel@tonic-gateextern	int	siglist(private_t *, char *, sigset_t *, int *);
1077c478bdstevel@tonic-gateextern	int	fltlist(char *, fltset_t *, int *);
1087c478bdstevel@tonic-gateextern	int	fdlist(char *, fileset_t *);
1097c478bdstevel@tonic-gateextern	int	liblist(char *, int);
1107c478bdstevel@tonic-gate
1117c478bdstevel@tonic-gateextern	char 	*fetchstring(private_t *, long, int);
112134a1f4Casper H.S. Dikextern	void	show_cred(private_t *, int, int);
1137c478bdstevel@tonic-gateextern	void	errmsg(const char *, const char *);
1147c478bdstevel@tonic-gateextern	void	abend(const char *, const char *);
1157c478bdstevel@tonic-gate
1167c478bdstevel@tonic-gateextern	void	outstring(private_t *, const char *);
1177c478bdstevel@tonic-gateextern	void	grow(private_t *, int);
1187c478bdstevel@tonic-gate
1197c478bdstevel@tonic-gateextern	void	show_procset(private_t *, long);
1207c478bdstevel@tonic-gateextern	const char *idtype_enum(private_t *, long);
1217c478bdstevel@tonic-gateextern	const char *woptions(private_t *, int);
1227c478bdstevel@tonic-gate
1237c478bdstevel@tonic-gateextern	void	putpname(private_t *);
1247c478bdstevel@tonic-gateextern	void	timestamp(private_t *);
1257c478bdstevel@tonic-gate
1267c478bdstevel@tonic-gateextern	const char *errname(int);
1277c478bdstevel@tonic-gateextern	const char *sysname(private_t *, int, int);
1287c478bdstevel@tonic-gateextern	const char *rawsigname(private_t *, int);
1297c478bdstevel@tonic-gateextern	const char *signame(private_t *, int);
1307c478bdstevel@tonic-gate
1317c478bdstevel@tonic-gateextern	int	getsubcode(private_t *);
1327c478bdstevel@tonic-gateextern	int	maxsyscalls(void);
1337c478bdstevel@tonic-gateextern	int	nsubcodes(int);
1347c478bdstevel@tonic-gate
1357c478bdstevel@tonic-gateextern	void	show_stat(private_t *, long);
1367c478bdstevel@tonic-gateextern	void	show_stat64_32(private_t *, long);
1377c478bdstevel@tonic-gate
1387c478bdstevel@tonic-gateextern	void	establish_breakpoints(void);
1397c478bdstevel@tonic-gateextern	void	establish_stacks(void);
1407c478bdstevel@tonic-gateextern	void	reset_breakpoints(void);
1417c478bdstevel@tonic-gateextern	void	clear_breakpoints(void);
1427c478bdstevel@tonic-gateextern	int	function_trace(private_t *, int, int, int);
1437c478bdstevel@tonic-gateextern	void	reestablish_traps(void);
1447c478bdstevel@tonic-gateextern	void	report_htable_stats(void);
1457c478bdstevel@tonic-gate
1467c478bdstevel@tonic-gateextern	const char *door_flags(private_t *, long);
1477c478bdstevel@tonic-gateextern	void	prt_ffg(private_t *, int, long);
1487c478bdstevel@tonic-gateextern	void	escape_string(private_t *, const char *);
1497c478bdstevel@tonic-gate
1507c478bdstevel@tonic-gate#ifdef	__cplusplus
1517c478bdstevel@tonic-gate}
1527c478bdstevel@tonic-gate#endif
1537c478bdstevel@tonic-gate
1547c478bdstevel@tonic-gate#endif	/* _PROTO_H */
155