xref: /onnv-gate/usr/src/cmd/truss/proto.h (revision 2447:8e8f3bf6a3f3)
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
5*2447Snf202958  * Common Development and Distribution License (the "License").
6*2447Snf202958  * 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 /*
22*2447Snf202958  * Copyright 2006 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 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #ifndef	_PROTO_H
310Sstevel@tonic-gate #define	_PROTO_H
320Sstevel@tonic-gate 
330Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
340Sstevel@tonic-gate 
350Sstevel@tonic-gate #include <sys/procset.h>
360Sstevel@tonic-gate 
370Sstevel@tonic-gate #ifdef	__cplusplus
380Sstevel@tonic-gate extern "C" {
390Sstevel@tonic-gate #endif
400Sstevel@tonic-gate 
410Sstevel@tonic-gate /* avoid a bit of stdio locking */
420Sstevel@tonic-gate #define	fputc	putc_unlocked
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /* force (via setvbuf()) a reasonably large output file buffer size */
450Sstevel@tonic-gate #define	MYBUFSIZ	8192
460Sstevel@tonic-gate 
470Sstevel@tonic-gate /*
480Sstevel@tonic-gate  * Function prototypes for most external functions.
490Sstevel@tonic-gate  */
500Sstevel@tonic-gate 
510Sstevel@tonic-gate extern	private_t *get_private(void);
520Sstevel@tonic-gate extern	void	*my_malloc(size_t, const char *);
530Sstevel@tonic-gate extern	void	*my_realloc(void *, size_t, const char *);
540Sstevel@tonic-gate extern	void	*my_calloc(size_t, size_t, const char *);
550Sstevel@tonic-gate extern	void	make_pname(private_t *, id_t);
560Sstevel@tonic-gate extern	int	requested(private_t *, int, int);
570Sstevel@tonic-gate extern	int	jobcontrol(private_t *, int);
580Sstevel@tonic-gate extern	int	signalled(private_t *, int, int);
590Sstevel@tonic-gate extern	int	faulted(private_t *, int);
600Sstevel@tonic-gate extern	int	sysentry(private_t *, int);
610Sstevel@tonic-gate extern	int	sysexit(private_t *, int);
620Sstevel@tonic-gate extern	void	showbuffer(private_t *, long, long);
630Sstevel@tonic-gate extern	void	showbytes(const char *, int, char *);
640Sstevel@tonic-gate extern	void	accumulate(timestruc_t *,
650Sstevel@tonic-gate 			const timestruc_t *, const timestruc_t *);
660Sstevel@tonic-gate 
670Sstevel@tonic-gate extern	const char *ioctlname(private_t *, uint_t);
680Sstevel@tonic-gate extern	const char *ioctldatastruct(uint_t);
690Sstevel@tonic-gate extern	const char *fcntlname(int);
700Sstevel@tonic-gate extern	const char *sfsname(int);
710Sstevel@tonic-gate extern	const char *plockname(int);
720Sstevel@tonic-gate extern	const char *si86name(int);
730Sstevel@tonic-gate extern	const char *utscode(int);
740Sstevel@tonic-gate extern	const char *sigarg(private_t *, int);
750Sstevel@tonic-gate extern	const char *openarg(private_t *, int);
760Sstevel@tonic-gate extern	const char *whencearg(int);
770Sstevel@tonic-gate extern	const char *msgflags(private_t *, int);
780Sstevel@tonic-gate extern	const char *semflags(private_t *, int);
790Sstevel@tonic-gate extern	const char *shmflags(private_t *, int);
800Sstevel@tonic-gate extern	const char *msgcmd(int);
810Sstevel@tonic-gate extern	const char *semcmd(int);
820Sstevel@tonic-gate extern	const char *shmcmd(int);
830Sstevel@tonic-gate extern	const char *strrdopt(int);
840Sstevel@tonic-gate extern	const char *strevents(private_t *, int);
850Sstevel@tonic-gate extern	const char *tiocflush(private_t *, int);
860Sstevel@tonic-gate extern	const char *strflush(int);
870Sstevel@tonic-gate extern	const char *mountflags(private_t *, int);
880Sstevel@tonic-gate extern	const char *svfsflags(private_t *, ulong_t);
890Sstevel@tonic-gate extern	const char *sconfname(int);
900Sstevel@tonic-gate extern	const char *pathconfname(int);
910Sstevel@tonic-gate extern	const char *fuiname(int);
920Sstevel@tonic-gate extern	const char *fuflags(private_t *, int);
930Sstevel@tonic-gate extern	const char *ipprotos(int);
94*2447Snf202958 extern	const char *rctlsyscode(int);
95*2447Snf202958 extern	const char *rctl_local_flags(private_t *, uint_t val);
96*2447Snf202958 extern	const char *rctl_local_action(private_t *, uint_t val);
970Sstevel@tonic-gate 
980Sstevel@tonic-gate extern	void	expound(private_t *, long, int);
990Sstevel@tonic-gate extern	void	prtimestruc(private_t *, const char *, timestruc_t *);
1000Sstevel@tonic-gate extern	void	print_siginfo(private_t *, const siginfo_t *);
1010Sstevel@tonic-gate 
1020Sstevel@tonic-gate extern	void	Flush(void);
1030Sstevel@tonic-gate extern	void	Eserialize(void);
1040Sstevel@tonic-gate extern	void	Xserialize(void);
1050Sstevel@tonic-gate extern	void	procadd(pid_t, const char *lwplist);
1060Sstevel@tonic-gate extern	int	lwptrace(pid_t, lwpid_t);
1070Sstevel@tonic-gate extern	void	procdel(void);
1080Sstevel@tonic-gate extern	int	checkproc(private_t *);
1090Sstevel@tonic-gate 
1100Sstevel@tonic-gate extern	int	syslist(char *, sysset_t *, int *);
1110Sstevel@tonic-gate extern	int	siglist(private_t *, char *, sigset_t *, int *);
1120Sstevel@tonic-gate extern	int	fltlist(char *, fltset_t *, int *);
1130Sstevel@tonic-gate extern	int	fdlist(char *, fileset_t *);
1140Sstevel@tonic-gate extern	int	liblist(char *, int);
1150Sstevel@tonic-gate 
1160Sstevel@tonic-gate extern	char 	*fetchstring(private_t *, long, int);
1170Sstevel@tonic-gate extern	void	show_cred(private_t *, int);
1180Sstevel@tonic-gate extern	void	errmsg(const char *, const char *);
1190Sstevel@tonic-gate extern	void	abend(const char *, const char *);
1200Sstevel@tonic-gate 
1210Sstevel@tonic-gate extern	void	outstring(private_t *, const char *);
1220Sstevel@tonic-gate extern	void	grow(private_t *, int);
1230Sstevel@tonic-gate 
1240Sstevel@tonic-gate extern	void	show_procset(private_t *, long);
1250Sstevel@tonic-gate extern	const char *idtype_enum(private_t *, long);
1260Sstevel@tonic-gate extern	const char *woptions(private_t *, int);
1270Sstevel@tonic-gate 
1280Sstevel@tonic-gate extern	void	putpname(private_t *);
1290Sstevel@tonic-gate extern	void	timestamp(private_t *);
1300Sstevel@tonic-gate 
1310Sstevel@tonic-gate extern	const char *errname(int);
1320Sstevel@tonic-gate extern	const char *sysname(private_t *, int, int);
1330Sstevel@tonic-gate extern	const char *rawsigname(private_t *, int);
1340Sstevel@tonic-gate extern	const char *signame(private_t *, int);
1350Sstevel@tonic-gate 
1360Sstevel@tonic-gate extern	int	getsubcode(private_t *);
1370Sstevel@tonic-gate extern	int	maxsyscalls(void);
1380Sstevel@tonic-gate extern	int	nsubcodes(int);
1390Sstevel@tonic-gate 
1400Sstevel@tonic-gate extern	void	show_stat(private_t *, long);
1410Sstevel@tonic-gate extern	void	show_statat(private_t *, long);
1420Sstevel@tonic-gate extern	void	show_xstat(private_t *, int, long);
1430Sstevel@tonic-gate extern	void	show_stat64_32(private_t *, long);
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate extern	void	establish_breakpoints(void);
1460Sstevel@tonic-gate extern	void	establish_stacks(void);
1470Sstevel@tonic-gate extern	void	reset_breakpoints(void);
1480Sstevel@tonic-gate extern	void	clear_breakpoints(void);
1490Sstevel@tonic-gate extern	int	function_trace(private_t *, int, int, int);
1500Sstevel@tonic-gate extern	void	reestablish_traps(void);
1510Sstevel@tonic-gate extern	void	report_htable_stats(void);
1520Sstevel@tonic-gate 
1530Sstevel@tonic-gate extern	const char *door_flags(private_t *, long);
1540Sstevel@tonic-gate extern	void	prt_ffg(private_t *, int, long);
1550Sstevel@tonic-gate extern	void	escape_string(private_t *, const char *);
1560Sstevel@tonic-gate 
1570Sstevel@tonic-gate #ifdef	__cplusplus
1580Sstevel@tonic-gate }
1590Sstevel@tonic-gate #endif
1600Sstevel@tonic-gate 
1610Sstevel@tonic-gate #endif	/* _PROTO_H */
162