xref: /illumos-gate/usr/src/cmd/fm/modules/common/eversholt/platform.h (revision cbab2b2687744cbfdc12fae90f8088127a0b266c)
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  * 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 
41 nvlist_t *Action_nvl;	/* nvl for problem with action=... prop on it */
42 
43 void platform_init(void);
44 void platform_fini(void);
45 void platform_run_poller(const char *poller);
46 void platform_set_payloadnvp(nvlist_t *nvlp);
47 void platform_units_translate(int, struct config *, nvlist_t **, nvlist_t **,
48     nvlist_t **, char *);
49 
50 struct cfgdata *platform_config_snapshot(void);
51 struct node *platform_getpath(nvlist_t *nvl);
52 
53 char **platform_get_eft_files(void);
54 void platform_free_eft_files(char **);
55 
56 int platform_call(struct node *np, struct lut **globals, struct config *croot,
57     struct arrow *arrowp, struct evalue *valuep);
58 int platform_confcall(struct node *np, struct lut **globals,
59     struct config *croot, struct arrow *arrowp, struct evalue *valuep);
60 int platform_payloadprop(struct node *np, struct evalue *valuep);
61 struct evalue *platform_payloadprop_values(const char *s, int *nvals);
62 int platform_path_exists(nvlist_t *fmri);
63 const struct ipath *platform_fault2ipath(nvlist_t *flt);
64 
65 #ifdef	__cplusplus
66 }
67 #endif
68 
69 #endif	/* _EFT_PLATFORM_H */
70