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