17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
508f6c065Sgavinm  * Common Development and Distribution License (the "License").
608f6c065Sgavinm  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22b5016cbbSstephh  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  *
257c478bd9Sstevel@tonic-gate  * platform -- platform-specific access to configuration database
267c478bd9Sstevel@tonic-gate  */
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate #ifndef	_EFT_PLATFORM_H
297c478bd9Sstevel@tonic-gate #define	_EFT_PLATFORM_H
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #include <libnvpair.h>
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
347c478bd9Sstevel@tonic-gate extern "C" {
357c478bd9Sstevel@tonic-gate #endif
367c478bd9Sstevel@tonic-gate 
37161b16f0Scindi #include <config.h>
38b5016cbbSstephh #include <fm/fmd_api.h>
39da40b264SAlex Wilson #include <fm/libtopo.h>
407c478bd9Sstevel@tonic-gate 
41*cfc9ef1dSToomas Soome extern nvlist_t *Action_nvl;	/* nvl for problem with action=... prop on it */
427aec1d6eScindi 
437c478bd9Sstevel@tonic-gate void platform_init(void);
447c478bd9Sstevel@tonic-gate void platform_fini(void);
457c478bd9Sstevel@tonic-gate void platform_run_poller(const char *poller);
467c478bd9Sstevel@tonic-gate void platform_set_payloadnvp(nvlist_t *nvlp);
47da40b264SAlex Wilson void platform_unit_translate(int, struct config *, const char *, nvlist_t **,
48da40b264SAlex Wilson     char *);
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate struct cfgdata *platform_config_snapshot(void);
51b5016cbbSstephh void platform_restore_config(fmd_hdl_t *hdl, fmd_case_t *fmcase);
52b5016cbbSstephh void platform_save_config(fmd_hdl_t *hdl, fmd_case_t *fmcase);
537c478bd9Sstevel@tonic-gate struct node *platform_getpath(nvlist_t *nvl);
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate char **platform_get_eft_files(void);
567c478bd9Sstevel@tonic-gate void platform_free_eft_files(char **);
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate int platform_call(struct node *np, struct lut **globals, struct config *croot,
597c478bd9Sstevel@tonic-gate     struct arrow *arrowp, struct evalue *valuep);
607aec1d6eScindi int platform_confcall(struct node *np, struct lut **globals,
617aec1d6eScindi     struct config *croot, struct arrow *arrowp, struct evalue *valuep);
627c478bd9Sstevel@tonic-gate int platform_payloadprop(struct node *np, struct evalue *valuep);
637aec1d6eScindi struct evalue *platform_payloadprop_values(const char *s, int *nvals);
647aec1d6eScindi int platform_path_exists(nvlist_t *fmri);
6508f6c065Sgavinm const struct ipath *platform_fault2ipath(nvlist_t *flt);
667c478bd9Sstevel@tonic-gate 
677c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
687c478bd9Sstevel@tonic-gate }
697c478bd9Sstevel@tonic-gate #endif
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate #endif	/* _EFT_PLATFORM_H */
72