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