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]
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
37 typedef struct aln audit_link_t
;
39 audit_link_t
*aln_next
;
42 /* one audit_rec_t per audit record */
44 typedef struct abq audit_rec_t
;
48 size_t abq_buf_len
; /* space allocated */
49 size_t abq_data_len
; /* space used */
50 char abq_buffer
[1]; /* variable length */
52 #define AUDIT_REC_HEADER offsetof(audit_rec_t, abq_buffer[0])
54 /* one audit_q_t entry per audit record per plugin */
56 typedef struct aqq audit_q_t
; /* plugin queued data */
59 audit_rec_t
*aqq_data
;
60 uint64_t aqq_sequence
;
65 typedef struct auq au_queue_t
;
71 pthread_mutex_t auq_lock
;
74 int audit_dequeue(au_queue_t
*, void **);
75 void audit_queue_destroy(au_queue_t
*);
76 void audit_enqueue(au_queue_t
*, void *);
77 int audit_queue_size(au_queue_t
*);
78 void audit_queue_init(au_queue_t
*);
79 audit_rec_t
*audit_release(pthread_mutex_t
*, audit_rec_t
*);
80 void audit_incr_ref(pthread_mutex_t
*, audit_rec_t
*);