/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _FMD_LOG_H
#define _FMD_LOG_H
#include <libnvpair.h>
#include <exacct.h>
#include <regex.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Fault Management Daemon Log File Interfaces
*
* Note: The contents of this file are private to the implementation of the
* Solaris system and FMD subsystem and are subject to change at any time
* without notice. Applications and drivers using these interfaces will fail
* to run on future releases. These interfaces should not be used for any
* purpose until they are publicly documented for use outside of Sun.
*/
extern fmd_log_t *fmd_log_open(int, const char *, int *);
extern void fmd_log_close(fmd_log_t *);
extern const char *fmd_log_label(fmd_log_t *);
extern const char *fmd_log_errmsg(fmd_log_t *, int);
extern int fmd_log_errno(fmd_log_t *);
typedef struct fmd_log_header {
typedef struct fmd_log_record {
extern int fmd_log_rewind(fmd_log_t *);
typedef struct fmd_log_filter {
extern int fmd_log_filter(fmd_log_t *,
typedef struct fmd_log_filter_nvarg {
char *nvarg_name;
char *nvarg_value;
/*
* fmd_log_xiter() can be used to perform sophisticated iteration over an fmd
* log file such as that required by fmdump(1M). The arguments are as follows:
*
* fmd_log_t *lp - log to use for iteration from fmd_log_open()
* uint_t iflags - FMD_LOG_XITER_* flags (see above)
* uint_t filtc - count of number of filters (or zero for no filtering)
* fmd_log_filter_t *filtv - array of 'filtc' filter structures
* fmd_log_rec_f *rfunc - function to invoke for each record in log
* fmd_log_err_f *efunc - function to invoke for any errors in log
* void *private - argument to pass to 'rfunc' and 'efunc' callbacks
* ulong_t *cntp - pointer to storage for record count (or NULL)
*/
#ifdef __cplusplus
}
#endif
#endif /* _FMD_LOG_H */