xref: /illumos-gate/usr/src/cmd/fm/modules/common/eversholt/platform.h (revision 75eba5b6d79ed4d2ce3daf7b2806306b6b69a938)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  *
25  * platform -- platform-specific access to configuration database
26  */
27 
28 #ifndef	_EFT_PLATFORM_H
29 #define	_EFT_PLATFORM_H
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"
32 
33 #include <libnvpair.h>
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 #include <config.h>
40 #include <fm/fmd_api.h>
41 
42 nvlist_t *Action_nvl;	/* nvl for problem with action=... prop on it */
43 
44 void platform_init(void);
45 void platform_fini(void);
46 void platform_run_poller(const char *poller);
47 void platform_set_payloadnvp(nvlist_t *nvlp);
48 void platform_units_translate(int, struct config *, nvlist_t **, nvlist_t **,
49     nvlist_t **, char *);
50 
51 struct cfgdata *platform_config_snapshot(void);
52 void platform_restore_config(fmd_hdl_t *hdl, fmd_case_t *fmcase);
53 void platform_save_config(fmd_hdl_t *hdl, fmd_case_t *fmcase);
54 struct node *platform_getpath(nvlist_t *nvl);
55 
56 char **platform_get_eft_files(void);
57 void platform_free_eft_files(char **);
58 
59 int platform_call(struct node *np, struct lut **globals, struct config *croot,
60     struct arrow *arrowp, struct evalue *valuep);
61 int platform_confcall(struct node *np, struct lut **globals,
62     struct config *croot, struct arrow *arrowp, struct evalue *valuep);
63 int platform_payloadprop(struct node *np, struct evalue *valuep);
64 struct evalue *platform_payloadprop_values(const char *s, int *nvals);
65 int platform_path_exists(nvlist_t *fmri);
66 const struct ipath *platform_fault2ipath(nvlist_t *flt);
67 
68 #ifdef	__cplusplus
69 }
70 #endif
71 
72 #endif	/* _EFT_PLATFORM_H */
73