auditd.h revision 2
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
2N/A *
2N/A * This is an unstable interface; changes may be made without
2N/A * notice.
2N/A */
2N/A
2N/A#ifndef _AUDITD_H
2N/A#define _AUDITD_H
2N/A
2N/A#include <secdb.h>
2N/A#include <sys/types.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * "WARN" errors trigger calls to audit_warn
2N/A */
2N/Aenum auditd_rc {
2N/A AUDITD_SUCCESS, /* ok */
2N/A AUDITD_RETRY, /* retry after a delay (WARN retry) */
2N/A AUDITD_NO_MEMORY, /* can't allocate memory (WARN no_memory) */
2N/A AUDITD_INVALID, /* bad input (WARN invalid) */
2N/A AUDITD_COMM_FAIL, /* communications failure */
2N/A AUDITD_FATAL, /* other error (WARN failure) */
2N/A AUDITD_FAIL /* other non-fatal error */
2N/A};
2N/Atypedef enum auditd_rc auditd_rc_t;
2N/A
2N/A/*
2N/A * auditd_plugin()
2N/A * arg 1 - input buffer, binary Solaris audit record
2N/A * arg 2 - input buffer length
2N/A * arg 3 - record sequence number
2N/A * arg 4 - plugin private data
2N/A * arg 5 - optional explanation of error return (use NULL,
2N/A * not an empty string if not used.)
2N/A */
2N/Aauditd_rc_t auditd_plugin(const char *, size_t, uint64_t, void *, char **);
2N/A/*
2N/A * auditd_plugin_open()
2N/A * arg 1 - attr/val struct, use with kva_match()
2N/A * arg 2 - attr/value pair string: attr1=value1;attr2=value2
2N/A * arg 3 - plugin private data
2N/A * arg 4 - optional explanation of error return (use NULL,
2N/A * not an empty string if not used.)
2N/A *
2N/A * make local copy of args 1 and 2; they are trashed after return.
2N/A */
2N/Aauditd_rc_t auditd_plugin_open(const kva_t *, char **, void **, char **);
2N/A
2N/A/*
2N/A * auditd_plugin_close()
2N/A * arg 1 - plugin private data
2N/A * arg 2 - optional explanation of error return (use NULL,
2N/A * not an empty string if not used.)
2N/A */
2N/Aauditd_rc_t auditd_plugin_close(void **, char **);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _AUDITD_H */