10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 70Sstevel@tonic-gate * with the License. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate * See the License for the specific language governing permissions 120Sstevel@tonic-gate * and limitations under the License. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * CDDL HEADER END 210Sstevel@tonic-gate */ 220Sstevel@tonic-gate /* 23*1052Sdilpreet * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _FMD_LOG_IMPL_H 280Sstevel@tonic-gate #define _FMD_LOG_IMPL_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 310Sstevel@tonic-gate 320Sstevel@tonic-gate #include <sys/types.h> 330Sstevel@tonic-gate #include <sys/stat.h> 340Sstevel@tonic-gate #include <exacct.h> 350Sstevel@tonic-gate #include <fmd_log.h> 360Sstevel@tonic-gate 370Sstevel@tonic-gate #ifdef __cplusplus 380Sstevel@tonic-gate extern "C" { 390Sstevel@tonic-gate #endif 400Sstevel@tonic-gate 410Sstevel@tonic-gate struct fmd_log { 420Sstevel@tonic-gate struct stat64 log_stat; /* fstat64() information for log file */ 430Sstevel@tonic-gate ea_file_t log_ea; /* libexacct handle for log file */ 440Sstevel@tonic-gate char *log_path; /* log file pathname used for open */ 450Sstevel@tonic-gate char *log_version; /* creator version string */ 460Sstevel@tonic-gate char *log_label; /* label indicating type */ 470Sstevel@tonic-gate char *log_osrelease; /* uname -r at log creation time */ 480Sstevel@tonic-gate char *log_osversion; /* uname -v at log creation time */ 490Sstevel@tonic-gate char *log_platform; /* uname -i at log creation time */ 50*1052Sdilpreet char *log_uuid; /* log file uuid string */ 510Sstevel@tonic-gate int log_abi; /* abi version of library client */ 520Sstevel@tonic-gate int log_errno; /* err from last library call */ 530Sstevel@tonic-gate int log_fd; /* file descriptor for log */ 540Sstevel@tonic-gate int log_flags; /* miscellaneous flags (see below) */ 550Sstevel@tonic-gate struct fmd_log *log_xrefs; /* list of cross-referenced logs */ 560Sstevel@tonic-gate struct fmd_log *log_xnext; /* next log on cross-reference list */ 570Sstevel@tonic-gate }; 580Sstevel@tonic-gate 590Sstevel@tonic-gate #define FMD_LF_EAOPEN 0x1 /* log_ea is open and active */ 600Sstevel@tonic-gate #define FMD_LF_START 0x2 /* log is at start of iter */ 610Sstevel@tonic-gate #define FMD_LF_XREFS 0x4 /* log xrefs have been loaded */ 620Sstevel@tonic-gate #define FMD_LF_DEBUG 0x8 /* print debug messages for this log */ 630Sstevel@tonic-gate 640Sstevel@tonic-gate typedef struct fmd_log_filtvec { 650Sstevel@tonic-gate const fmd_log_filter_t *filt_argv; /* set of equivalent filters to OR */ 660Sstevel@tonic-gate uint_t filt_argc; /* number of total filters to AND */ 670Sstevel@tonic-gate } fmd_log_filtvec_t; 680Sstevel@tonic-gate 690Sstevel@tonic-gate #define EFDL_BASE 1000 /* base value for libfmd_log errnos */ 700Sstevel@tonic-gate 710Sstevel@tonic-gate enum { 720Sstevel@tonic-gate EFDL_VERSION = EFDL_BASE, /* invalid library client version */ 730Sstevel@tonic-gate EFDL_NOMEM, /* memory allocation failure */ 740Sstevel@tonic-gate EFDL_BADHDR, /* invalid fmd file header */ 750Sstevel@tonic-gate EFDL_NOCLASS, /* record does not contain class */ 760Sstevel@tonic-gate EFDL_BADTAG, /* invalid exacct catalog tag */ 770Sstevel@tonic-gate EFDL_BADREF, /* invalid cross-reference group */ 780Sstevel@tonic-gate EFDL_BADDEV, /* invalid cross-reference dev_t */ 790Sstevel@tonic-gate /* 800Sstevel@tonic-gate * Note: EFDL_EXACCT must be the final internal errno definition so we 810Sstevel@tonic-gate * can store libexacct ea_error() values as EFDL_EXACCT + ea_error(). 820Sstevel@tonic-gate */ 830Sstevel@tonic-gate EFDL_EXACCT /* exacct error (must be last!) */ 840Sstevel@tonic-gate }; 850Sstevel@tonic-gate 860Sstevel@tonic-gate #ifdef __cplusplus 870Sstevel@tonic-gate } 880Sstevel@tonic-gate #endif 890Sstevel@tonic-gate 900Sstevel@tonic-gate #endif /* _FMD_LOG_IMPL_H */ 91