1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #ifndef _PROTO_H 32*7c478bd9Sstevel@tonic-gate #define _PROTO_H 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #include <sys/procset.h> 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 39*7c478bd9Sstevel@tonic-gate extern "C" { 40*7c478bd9Sstevel@tonic-gate #endif 41*7c478bd9Sstevel@tonic-gate 42*7c478bd9Sstevel@tonic-gate /* avoid a bit of stdio locking */ 43*7c478bd9Sstevel@tonic-gate #define fputc putc_unlocked 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate /* force (via setvbuf()) a reasonably large output file buffer size */ 46*7c478bd9Sstevel@tonic-gate #define MYBUFSIZ 8192 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gate /* 49*7c478bd9Sstevel@tonic-gate * Function prototypes for most external functions. 50*7c478bd9Sstevel@tonic-gate */ 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate extern private_t *get_private(void); 53*7c478bd9Sstevel@tonic-gate extern void *my_malloc(size_t, const char *); 54*7c478bd9Sstevel@tonic-gate extern void *my_realloc(void *, size_t, const char *); 55*7c478bd9Sstevel@tonic-gate extern void *my_calloc(size_t, size_t, const char *); 56*7c478bd9Sstevel@tonic-gate extern void make_pname(private_t *, id_t); 57*7c478bd9Sstevel@tonic-gate extern int requested(private_t *, int, int); 58*7c478bd9Sstevel@tonic-gate extern int jobcontrol(private_t *, int); 59*7c478bd9Sstevel@tonic-gate extern int signalled(private_t *, int, int); 60*7c478bd9Sstevel@tonic-gate extern int faulted(private_t *, int); 61*7c478bd9Sstevel@tonic-gate extern int sysentry(private_t *, int); 62*7c478bd9Sstevel@tonic-gate extern int sysexit(private_t *, int); 63*7c478bd9Sstevel@tonic-gate extern void showbuffer(private_t *, long, long); 64*7c478bd9Sstevel@tonic-gate extern void showbytes(const char *, int, char *); 65*7c478bd9Sstevel@tonic-gate extern void accumulate(timestruc_t *, 66*7c478bd9Sstevel@tonic-gate const timestruc_t *, const timestruc_t *); 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate extern const char *ioctlname(private_t *, uint_t); 69*7c478bd9Sstevel@tonic-gate extern const char *ioctldatastruct(uint_t); 70*7c478bd9Sstevel@tonic-gate extern const char *fcntlname(int); 71*7c478bd9Sstevel@tonic-gate extern const char *sfsname(int); 72*7c478bd9Sstevel@tonic-gate extern const char *plockname(int); 73*7c478bd9Sstevel@tonic-gate extern const char *si86name(int); 74*7c478bd9Sstevel@tonic-gate extern const char *utscode(int); 75*7c478bd9Sstevel@tonic-gate extern const char *sigarg(private_t *, int); 76*7c478bd9Sstevel@tonic-gate extern const char *openarg(private_t *, int); 77*7c478bd9Sstevel@tonic-gate extern const char *whencearg(int); 78*7c478bd9Sstevel@tonic-gate extern const char *msgflags(private_t *, int); 79*7c478bd9Sstevel@tonic-gate extern const char *semflags(private_t *, int); 80*7c478bd9Sstevel@tonic-gate extern const char *shmflags(private_t *, int); 81*7c478bd9Sstevel@tonic-gate extern const char *msgcmd(int); 82*7c478bd9Sstevel@tonic-gate extern const char *semcmd(int); 83*7c478bd9Sstevel@tonic-gate extern const char *shmcmd(int); 84*7c478bd9Sstevel@tonic-gate extern const char *strrdopt(int); 85*7c478bd9Sstevel@tonic-gate extern const char *strevents(private_t *, int); 86*7c478bd9Sstevel@tonic-gate extern const char *tiocflush(private_t *, int); 87*7c478bd9Sstevel@tonic-gate extern const char *strflush(int); 88*7c478bd9Sstevel@tonic-gate extern const char *mountflags(private_t *, int); 89*7c478bd9Sstevel@tonic-gate extern const char *svfsflags(private_t *, ulong_t); 90*7c478bd9Sstevel@tonic-gate extern const char *sconfname(int); 91*7c478bd9Sstevel@tonic-gate extern const char *pathconfname(int); 92*7c478bd9Sstevel@tonic-gate extern const char *fuiname(int); 93*7c478bd9Sstevel@tonic-gate extern const char *fuflags(private_t *, int); 94*7c478bd9Sstevel@tonic-gate extern const char *ipprotos(int); 95*7c478bd9Sstevel@tonic-gate 96*7c478bd9Sstevel@tonic-gate extern void expound(private_t *, long, int); 97*7c478bd9Sstevel@tonic-gate extern void prtimestruc(private_t *, const char *, timestruc_t *); 98*7c478bd9Sstevel@tonic-gate extern void print_siginfo(private_t *, const siginfo_t *); 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate extern void Flush(void); 101*7c478bd9Sstevel@tonic-gate extern void Eserialize(void); 102*7c478bd9Sstevel@tonic-gate extern void Xserialize(void); 103*7c478bd9Sstevel@tonic-gate extern void procadd(pid_t, const char *lwplist); 104*7c478bd9Sstevel@tonic-gate extern int lwptrace(pid_t, lwpid_t); 105*7c478bd9Sstevel@tonic-gate extern void procdel(void); 106*7c478bd9Sstevel@tonic-gate extern int checkproc(private_t *); 107*7c478bd9Sstevel@tonic-gate 108*7c478bd9Sstevel@tonic-gate extern int syslist(char *, sysset_t *, int *); 109*7c478bd9Sstevel@tonic-gate extern int siglist(private_t *, char *, sigset_t *, int *); 110*7c478bd9Sstevel@tonic-gate extern int fltlist(char *, fltset_t *, int *); 111*7c478bd9Sstevel@tonic-gate extern int fdlist(char *, fileset_t *); 112*7c478bd9Sstevel@tonic-gate extern int liblist(char *, int); 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gate extern char *fetchstring(private_t *, long, int); 115*7c478bd9Sstevel@tonic-gate extern void show_cred(private_t *, int); 116*7c478bd9Sstevel@tonic-gate extern void errmsg(const char *, const char *); 117*7c478bd9Sstevel@tonic-gate extern void abend(const char *, const char *); 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gate extern void outstring(private_t *, const char *); 120*7c478bd9Sstevel@tonic-gate extern void grow(private_t *, int); 121*7c478bd9Sstevel@tonic-gate 122*7c478bd9Sstevel@tonic-gate extern void show_procset(private_t *, long); 123*7c478bd9Sstevel@tonic-gate extern const char *idtype_enum(private_t *, long); 124*7c478bd9Sstevel@tonic-gate extern const char *woptions(private_t *, int); 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate extern void putpname(private_t *); 127*7c478bd9Sstevel@tonic-gate extern void timestamp(private_t *); 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate extern const char *errname(int); 130*7c478bd9Sstevel@tonic-gate extern const char *sysname(private_t *, int, int); 131*7c478bd9Sstevel@tonic-gate extern const char *rawsigname(private_t *, int); 132*7c478bd9Sstevel@tonic-gate extern const char *signame(private_t *, int); 133*7c478bd9Sstevel@tonic-gate 134*7c478bd9Sstevel@tonic-gate extern int getsubcode(private_t *); 135*7c478bd9Sstevel@tonic-gate extern int maxsyscalls(void); 136*7c478bd9Sstevel@tonic-gate extern int nsubcodes(int); 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate extern void show_stat(private_t *, long); 139*7c478bd9Sstevel@tonic-gate extern void show_statat(private_t *, long); 140*7c478bd9Sstevel@tonic-gate extern void show_xstat(private_t *, int, long); 141*7c478bd9Sstevel@tonic-gate extern void show_stat64_32(private_t *, long); 142*7c478bd9Sstevel@tonic-gate 143*7c478bd9Sstevel@tonic-gate extern void establish_breakpoints(void); 144*7c478bd9Sstevel@tonic-gate extern void establish_stacks(void); 145*7c478bd9Sstevel@tonic-gate extern void reset_breakpoints(void); 146*7c478bd9Sstevel@tonic-gate extern void clear_breakpoints(void); 147*7c478bd9Sstevel@tonic-gate extern int function_trace(private_t *, int, int, int); 148*7c478bd9Sstevel@tonic-gate extern void reestablish_traps(void); 149*7c478bd9Sstevel@tonic-gate extern void report_htable_stats(void); 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gate extern const char *door_flags(private_t *, long); 152*7c478bd9Sstevel@tonic-gate extern void prt_ffg(private_t *, int, long); 153*7c478bd9Sstevel@tonic-gate extern void escape_string(private_t *, const char *); 154*7c478bd9Sstevel@tonic-gate 155*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 156*7c478bd9Sstevel@tonic-gate } 157*7c478bd9Sstevel@tonic-gate #endif 158*7c478bd9Sstevel@tonic-gate 159*7c478bd9Sstevel@tonic-gate #endif /* _PROTO_H */ 160