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, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * 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 2005 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _FMD_LOG_IMPL_H
2N/A#define _FMD_LOG_IMPL_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#include <sys/types.h>
2N/A#include <sys/stat.h>
2N/A#include <exacct.h>
2N/A#include <fmd_log.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/Astruct fmd_log {
2N/A struct stat64 log_stat; /* fstat64() information for log file */
2N/A ea_file_t log_ea; /* libexacct handle for log file */
2N/A char *log_path; /* log file pathname used for open */
2N/A char *log_version; /* creator version string */
2N/A char *log_label; /* label indicating type */
2N/A char *log_osrelease; /* uname -r at log creation time */
2N/A char *log_osversion; /* uname -v at log creation time */
2N/A char *log_platform; /* uname -i at log creation time */
2N/A char *log_uuid; /* log file uuid string */
2N/A int log_abi; /* abi version of library client */
2N/A int log_errno; /* err from last library call */
2N/A int log_fd; /* file descriptor for log */
2N/A int log_flags; /* miscellaneous flags (see below) */
2N/A struct fmd_log *log_xrefs; /* list of cross-referenced logs */
2N/A struct fmd_log *log_xnext; /* next log on cross-reference list */
2N/A};
2N/A
2N/A#define FMD_LF_EAOPEN 0x1 /* log_ea is open and active */
2N/A#define FMD_LF_START 0x2 /* log is at start of iter */
2N/A#define FMD_LF_XREFS 0x4 /* log xrefs have been loaded */
2N/A#define FMD_LF_DEBUG 0x8 /* print debug messages for this log */
2N/A
2N/Atypedef struct fmd_log_filtvec {
2N/A const fmd_log_filter_t *filt_argv; /* set of equivalent filters to OR */
2N/A uint_t filt_argc; /* number of total filters to AND */
2N/A} fmd_log_filtvec_t;
2N/A
2N/A#define EFDL_BASE 1000 /* base value for libfmd_log errnos */
2N/A
2N/Aenum {
2N/A EFDL_VERSION = EFDL_BASE, /* invalid library client version */
2N/A EFDL_NOMEM, /* memory allocation failure */
2N/A EFDL_BADHDR, /* invalid fmd file header */
2N/A EFDL_NOCLASS, /* record does not contain class */
2N/A EFDL_BADTAG, /* invalid exacct catalog tag */
2N/A EFDL_BADREF, /* invalid cross-reference group */
2N/A EFDL_BADDEV, /* invalid cross-reference dev_t */
2N/A /*
2N/A * Note: EFDL_EXACCT must be the final internal errno definition so we
2N/A * can store libexacct ea_error() values as EFDL_EXACCT + ea_error().
2N/A */
2N/A EFDL_EXACCT /* exacct error (must be last!) */
2N/A};
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _FMD_LOG_IMPL_H */