kill tsol ("Trusted Solaris") aka TX ("Trusted Extensions")
[unleashed.git] / usr / src / cmd / auditreduce / auditr.h
blobe1c3dbb7bb92225910263ba957353c3568250145
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _AUDITR_H
27 #define _AUDITR_H
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 #include <sys/types.h>
34 #include <stdio.h>
35 #include <sys/types.h>
37 #include <grp.h>
38 #include <pwd.h>
39 #include <signal.h>
40 #include <string.h>
41 #include <values.h>
43 #include <dirent.h>
44 #include <sys/errno.h>
45 #include <sys/file.h>
46 #include <sys/param.h>
47 #include <sys/stat.h>
48 #include <sys/socket.h>
49 #include <sys/wait.h>
50 #include <sys/time.h>
51 #include <tzfile.h>
52 #include <sys/resource.h>
53 #include <netdb.h>
54 #include <unistd.h>
55 #include <libgen.h>
56 #include <stdlib.h>
57 #include <libscf_priv.h>
59 #include <bsm/audit.h>
60 #include <bsm/audit_record.h>
61 #include <bsm/libbsm.h>
63 #include "auditrt.h"
66 * Flags for on/off code.
67 * The release setting would be 0 0 0 1.
69 #define AUDIT_PROC_TRACE 0 /* process trace code */
70 #define AUDIT_FILE 0 /* file trace code (use -V also) */
71 #define AUDIT_REC 0 /* record trace code (very verbose) */
72 #define AUDIT_RENAME 1 /* rename output file w/time stamps */
74 #define TRUE 1
75 #define FALSE 0
77 #define FM_ALLDIR 1 /* f_mode in o.c - all dirs in this dir */
78 #define FM_ALLFILE 0 /* f_mode in o.c - all audit files in dir */
80 #define MAXFILELEN (MAXPATHLEN+MAXNAMLEN+1)
83 * Initial size of a record buffer.
84 * Never smaller than (2 * sizeof (short)).
85 * If a buffer is too small for the record being read then the
86 * current buffer is freed and a large-enough one is allocated.
88 #define AUDITBUFSIZE 512 /* size of default record buffer */
91 * Controls size of audit_pcbs[] array.
92 * INITSIZE is the initial allocation for the array.
93 * INC is the growth jump when the array becomes too small.
95 #define PCB_INITSIZE 100
96 #define PCB_INC 50
100 * Memory allocation functions.
101 * audit calloc that checks for NULL return
103 extern void *a_calloc(int, size_t);
106 * Statistical reporting for error conditions.
108 extern void audit_stats(void);
109 extern int errno;
111 #ifdef __cplusplus
113 #endif
115 #endif /* _AUDITR_H */