xref: /titanic_50/usr/src/cmd/fm/modules/common/eversholt/fme.h (revision 6d9a41ff63273acce102bfb2d51423ed920e6dcd)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * fme.h -- public definitions for fme module
27  *
28  * this module supports the management of a "fault management exercise".
29  */
30 
31 #ifndef	_EFT_FME_H
32 #define	_EFT_FME_H
33 
34 #pragma ident	"%Z%%M%	%I%	%E% SMI"
35 
36 #include <fm/fmd_api.h>
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 #define	UNDIAGNOSABLE_DEFECT	"defect.sunos.eft.undiagnosable_problem"
43 #define	UNDIAG_REASON		"reason"
44 
45 /* Undiagnosable reason strings */
46 #define	UD_MISSINGPATH	"bad or missing path in persisted observation"
47 #define	UD_MISSINGINFO	"buffer persisting case info is AWOL"
48 #define	UD_MISSINGZERO	"buffer persisting principal ereport is AWOL"
49 #define	UD_CFGMISMATCH	"persisted config buffer size != actual size"
50 #define	UD_MISSINGOBS	"buffer persisting an observation is AWOL"
51 #define	UD_BADEVENTF	"ereport event not found in fault tree"
52 #define	UD_BADEVENTI	"ereport zero not found in instance tree"
53 #define	UD_INSTFAIL	"creation of instance tree failed"
54 #define	UD_UNSOLVD	"all hypotheses disproved"
55 #define	UD_BADOBS	"persisted observation not found in instance tree"
56 #define	UD_NOPATH	"no path to component found in ereport"
57 #define	UD_NOCONF	"no configuration information to build instance tree"
58 #define	UD_MAXFME	"reached the maximum number of open FMEs (maxfme)"
59 
60 #define	WOBUF_CFGLEN	"rawcfglen"
61 #define	WOBUF_POSTD	"posted"
62 #define	WOBUF_NOBS	"observations"
63 #define	WOBUF_PULL	"timewaited"
64 #define	WOBUF_CFG	"rawcfgdata"
65 #define	WOBUF_ID	"fmeid"
66 
67 struct fme;
68 
69 void fme_receive_external_report(fmd_hdl_t *hdl, fmd_event_t *ffep,
70     nvlist_t *nvl, const char *eventstring);
71 void fme_restart(fmd_hdl_t *hdl, fmd_case_t *inprogress);
72 void fme_close_case(fmd_hdl_t *hdl, fmd_case_t *fmcase);
73 void fme_timer_fired(struct fme *, id_t);
74 void fme_status(int flags);
75 void fme_fini(void);
76 
77 #ifdef	__cplusplus
78 }
79 #endif
80 
81 #endif	/* _EFT_FME_H */
82