fme.h revision 2120:a6bf44af2330
1/* 2 * CDDL HEADER START 3 * 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. 7 * 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. 12 * 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] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 * 25 * fme.h -- public definitions for fme module 26 * 27 * this module supports the management of a "fault management exercise". 28 */ 29 30#ifndef _EFT_FME_H 31#define _EFT_FME_H 32 33#pragma ident "%Z%%M% %I% %E% SMI" 34 35#include <fm/fmd_api.h> 36 37#ifdef __cplusplus 38extern "C" { 39#endif 40 41#define UNDIAGNOSABLE_DEFECT "defect.sunos.eft.undiagnosable_problem" 42#define UNDIAG_REASON "reason" 43 44/* Undiagnosable reason strings */ 45#define UD_MISSINGPATH "bad or missing path in persisted observation" 46#define UD_MISSINGINFO "buffer persisting case info is AWOL" 47#define UD_MISSINGZERO "buffer persisting principal ereport is AWOL" 48#define UD_CFGMISMATCH "persisted config buffer size != actual size" 49#define UD_MISSINGOBS "buffer persisting an observation is AWOL" 50#define UD_BADEVENTF "ereport event not found in fault tree" 51#define UD_BADEVENTI "ereport zero not found in instance tree" 52#define UD_INSTFAIL "creation of instance tree failed" 53#define UD_UNSOLVD "all hypotheses disproved" 54#define UD_BADOBS "persisted observation not found in instance tree" 55#define UD_NOPATH "no path to component found in ereport" 56#define UD_NOCONF "no configuration information to build instance tree" 57#define UD_MAXFME "reached the maximum number of open FMEs (maxfme)" 58 59#define WOBUF_CFGLEN "rawcfglen" 60#define WOBUF_POSTD "posted" 61#define WOBUF_NOBS "observations" 62#define WOBUF_PULL "timewaited" 63#define WOBUF_CFG "rawcfgdata" 64#define WOBUF_ID "fmeid" 65#define WOBUF_ISTATS "istats" 66 67struct lut *Istats; /* instanced stats a la "count=" */ 68 69struct fme; 70 71void fme_receive_external_report(fmd_hdl_t *hdl, fmd_event_t *ffep, 72 nvlist_t *nvl, const char *eventstring); 73void fme_receive_repair_list(fmd_hdl_t *hdl, fmd_event_t *ffep, 74 nvlist_t *nvl, const char *eventstring); 75void fme_restart(fmd_hdl_t *hdl, fmd_case_t *inprogress); 76void fme_istat_load(fmd_hdl_t *hdl); 77void fme_close_case(fmd_hdl_t *hdl, fmd_case_t *fmcase); 78void fme_timer_fired(struct fme *, id_t); 79void fme_status(int flags); 80void fme_fini(void); 81void istat_fini(void); 82 83struct istat_entry { 84 const char *ename; 85 const struct ipath *ipath; 86}; 87int istat_cmp(struct istat_entry *ent1, struct istat_entry *ent2); 88 89#ifdef __cplusplus 90} 91#endif 92 93#endif /* _EFT_FME_H */ 94