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 52447Snf202958 * Common Development and Distribution License (the "License"). 62447Snf202958 * 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 */ 2110927SRoger.Faulkner@Sun.COM 220Sstevel@tonic-gate /* 23*12273SCasper.Dik@Sun.COM * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. 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 #ifndef _PROTO_H 300Sstevel@tonic-gate #define _PROTO_H 310Sstevel@tonic-gate 320Sstevel@tonic-gate #include <sys/procset.h> 330Sstevel@tonic-gate 340Sstevel@tonic-gate #ifdef __cplusplus 350Sstevel@tonic-gate extern "C" { 360Sstevel@tonic-gate #endif 370Sstevel@tonic-gate 380Sstevel@tonic-gate /* avoid a bit of stdio locking */ 390Sstevel@tonic-gate #define fputc putc_unlocked 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* force (via setvbuf()) a reasonably large output file buffer size */ 420Sstevel@tonic-gate #define MYBUFSIZ 8192 430Sstevel@tonic-gate 440Sstevel@tonic-gate /* 450Sstevel@tonic-gate * Function prototypes for most external functions. 460Sstevel@tonic-gate */ 470Sstevel@tonic-gate 480Sstevel@tonic-gate extern private_t *get_private(void); 490Sstevel@tonic-gate extern void *my_malloc(size_t, const char *); 500Sstevel@tonic-gate extern void *my_realloc(void *, size_t, const char *); 510Sstevel@tonic-gate extern void *my_calloc(size_t, size_t, const char *); 520Sstevel@tonic-gate extern void make_pname(private_t *, id_t); 530Sstevel@tonic-gate extern int requested(private_t *, int, int); 540Sstevel@tonic-gate extern int jobcontrol(private_t *, int); 550Sstevel@tonic-gate extern int signalled(private_t *, int, int); 560Sstevel@tonic-gate extern int faulted(private_t *, int); 570Sstevel@tonic-gate extern int sysentry(private_t *, int); 580Sstevel@tonic-gate extern int sysexit(private_t *, int); 590Sstevel@tonic-gate extern void showbuffer(private_t *, long, long); 600Sstevel@tonic-gate extern void showbytes(const char *, int, char *); 610Sstevel@tonic-gate extern void accumulate(timestruc_t *, 620Sstevel@tonic-gate const timestruc_t *, const timestruc_t *); 630Sstevel@tonic-gate 640Sstevel@tonic-gate extern const char *ioctlname(private_t *, uint_t); 650Sstevel@tonic-gate extern const char *ioctldatastruct(uint_t); 660Sstevel@tonic-gate extern const char *fcntlname(int); 670Sstevel@tonic-gate extern const char *sfsname(int); 680Sstevel@tonic-gate extern const char *si86name(int); 690Sstevel@tonic-gate extern const char *utscode(int); 700Sstevel@tonic-gate extern const char *openarg(private_t *, int); 710Sstevel@tonic-gate extern const char *whencearg(int); 720Sstevel@tonic-gate extern const char *msgflags(private_t *, int); 730Sstevel@tonic-gate extern const char *semflags(private_t *, int); 740Sstevel@tonic-gate extern const char *shmflags(private_t *, int); 750Sstevel@tonic-gate extern const char *msgcmd(int); 760Sstevel@tonic-gate extern const char *semcmd(int); 770Sstevel@tonic-gate extern const char *shmcmd(int); 780Sstevel@tonic-gate extern const char *strrdopt(int); 790Sstevel@tonic-gate extern const char *strevents(private_t *, int); 800Sstevel@tonic-gate extern const char *tiocflush(private_t *, int); 810Sstevel@tonic-gate extern const char *strflush(int); 820Sstevel@tonic-gate extern const char *mountflags(private_t *, int); 830Sstevel@tonic-gate extern const char *svfsflags(private_t *, ulong_t); 840Sstevel@tonic-gate extern const char *sconfname(int); 850Sstevel@tonic-gate extern const char *pathconfname(int); 860Sstevel@tonic-gate extern const char *fuiname(int); 870Sstevel@tonic-gate extern const char *fuflags(private_t *, int); 880Sstevel@tonic-gate extern const char *ipprotos(int); 892447Snf202958 extern const char *rctlsyscode(int); 902447Snf202958 extern const char *rctl_local_flags(private_t *, uint_t val); 912447Snf202958 extern const char *rctl_local_action(private_t *, uint_t val); 920Sstevel@tonic-gate 930Sstevel@tonic-gate extern void expound(private_t *, long, int); 940Sstevel@tonic-gate extern void prtimestruc(private_t *, const char *, timestruc_t *); 950Sstevel@tonic-gate extern void print_siginfo(private_t *, const siginfo_t *); 960Sstevel@tonic-gate 970Sstevel@tonic-gate extern void Flush(void); 980Sstevel@tonic-gate extern void Eserialize(void); 990Sstevel@tonic-gate extern void Xserialize(void); 1000Sstevel@tonic-gate extern void procadd(pid_t, const char *lwplist); 1010Sstevel@tonic-gate extern int lwptrace(pid_t, lwpid_t); 1020Sstevel@tonic-gate extern void procdel(void); 1030Sstevel@tonic-gate extern int checkproc(private_t *); 1040Sstevel@tonic-gate 1050Sstevel@tonic-gate extern int syslist(char *, sysset_t *, int *); 1060Sstevel@tonic-gate extern int siglist(private_t *, char *, sigset_t *, int *); 1070Sstevel@tonic-gate extern int fltlist(char *, fltset_t *, int *); 1080Sstevel@tonic-gate extern int fdlist(char *, fileset_t *); 1090Sstevel@tonic-gate extern int liblist(char *, int); 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate extern char *fetchstring(private_t *, long, int); 112*12273SCasper.Dik@Sun.COM extern void show_cred(private_t *, int, int); 1130Sstevel@tonic-gate extern void errmsg(const char *, const char *); 1140Sstevel@tonic-gate extern void abend(const char *, const char *); 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate extern void outstring(private_t *, const char *); 1170Sstevel@tonic-gate extern void grow(private_t *, int); 1180Sstevel@tonic-gate 1190Sstevel@tonic-gate extern void show_procset(private_t *, long); 1200Sstevel@tonic-gate extern const char *idtype_enum(private_t *, long); 1210Sstevel@tonic-gate extern const char *woptions(private_t *, int); 1220Sstevel@tonic-gate 1230Sstevel@tonic-gate extern void putpname(private_t *); 1240Sstevel@tonic-gate extern void timestamp(private_t *); 1250Sstevel@tonic-gate 1260Sstevel@tonic-gate extern const char *errname(int); 1270Sstevel@tonic-gate extern const char *sysname(private_t *, int, int); 1280Sstevel@tonic-gate extern const char *rawsigname(private_t *, int); 1290Sstevel@tonic-gate extern const char *signame(private_t *, int); 1300Sstevel@tonic-gate 1310Sstevel@tonic-gate extern int getsubcode(private_t *); 1320Sstevel@tonic-gate extern int maxsyscalls(void); 1330Sstevel@tonic-gate extern int nsubcodes(int); 1340Sstevel@tonic-gate 1350Sstevel@tonic-gate extern void show_stat(private_t *, long); 1360Sstevel@tonic-gate extern void show_stat64_32(private_t *, long); 1370Sstevel@tonic-gate 1380Sstevel@tonic-gate extern void establish_breakpoints(void); 1390Sstevel@tonic-gate extern void establish_stacks(void); 1400Sstevel@tonic-gate extern void reset_breakpoints(void); 1410Sstevel@tonic-gate extern void clear_breakpoints(void); 1420Sstevel@tonic-gate extern int function_trace(private_t *, int, int, int); 1430Sstevel@tonic-gate extern void reestablish_traps(void); 1440Sstevel@tonic-gate extern void report_htable_stats(void); 1450Sstevel@tonic-gate 1460Sstevel@tonic-gate extern const char *door_flags(private_t *, long); 1470Sstevel@tonic-gate extern void prt_ffg(private_t *, int, long); 1480Sstevel@tonic-gate extern void escape_string(private_t *, const char *); 1490Sstevel@tonic-gate 1500Sstevel@tonic-gate #ifdef __cplusplus 1510Sstevel@tonic-gate } 1520Sstevel@tonic-gate #endif 1530Sstevel@tonic-gate 1540Sstevel@tonic-gate #endif /* _PROTO_H */ 155