1*6bbe0590SSundeep Panicker /*
2*6bbe0590SSundeep Panicker  * CDDL HEADER START
3*6bbe0590SSundeep Panicker  *
4*6bbe0590SSundeep Panicker  * The contents of this file are subject to the terms of the
5*6bbe0590SSundeep Panicker  * Common Development and Distribution License (the "License").
6*6bbe0590SSundeep Panicker  * You may not use this file except in compliance with the License.
7*6bbe0590SSundeep Panicker  *
8*6bbe0590SSundeep Panicker  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*6bbe0590SSundeep Panicker  * or http://www.opensolaris.org/os/licensing.
10*6bbe0590SSundeep Panicker  * See the License for the specific language governing permissions
11*6bbe0590SSundeep Panicker  * and limitations under the License.
12*6bbe0590SSundeep Panicker  *
13*6bbe0590SSundeep Panicker  * When distributing Covered Code, include this CDDL HEADER in each
14*6bbe0590SSundeep Panicker  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*6bbe0590SSundeep Panicker  * If applicable, add the following below this CDDL HEADER, with the
16*6bbe0590SSundeep Panicker  * fields enclosed by brackets "[]" replaced with your own identifying
17*6bbe0590SSundeep Panicker  * information: Portions Copyright [yyyy] [name of copyright owner]
18*6bbe0590SSundeep Panicker  *
19*6bbe0590SSundeep Panicker  * CDDL HEADER END
20*6bbe0590SSundeep Panicker  */
21*6bbe0590SSundeep Panicker 
22*6bbe0590SSundeep Panicker /*
23*6bbe0590SSundeep Panicker  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*6bbe0590SSundeep Panicker  * Use is subject to license terms.
25*6bbe0590SSundeep Panicker  */
26*6bbe0590SSundeep Panicker 
27*6bbe0590SSundeep Panicker #ifndef _FRURAW_H
28*6bbe0590SSundeep Panicker #define	_FRURAW_H
29*6bbe0590SSundeep Panicker 
30*6bbe0590SSundeep Panicker #include <stdint.h>
31*6bbe0590SSundeep Panicker #include <fru_access.h>
32*6bbe0590SSundeep Panicker #include <libfruds.h>
33*6bbe0590SSundeep Panicker 
34*6bbe0590SSundeep Panicker #ifdef __cplusplus
35*6bbe0590SSundeep Panicker extern "C" {
36*6bbe0590SSundeep Panicker #endif
37*6bbe0590SSundeep Panicker 
38*6bbe0590SSundeep Panicker #define	FRU_CONT_CONF_SPARC	"/usr/platform/sun4u/lib/fru_container.conf"
39*6bbe0590SSundeep Panicker #define	FRU_CONT_CONF_X86	"/usr/lib/picl/plugins/fru_container.conf"
40*6bbe0590SSundeep Panicker #define	FRU_CONT_CONF_ENV_VAR   "FRU_CONTAINER_CONF"
41*6bbe0590SSundeep Panicker #define	IGNORE_CHECK		"IGNORE_CHECKSUM"
42*6bbe0590SSundeep Panicker 
43*6bbe0590SSundeep Panicker typedef struct segment_list {
44*6bbe0590SSundeep Panicker 	segment_t *segment;
45*6bbe0590SSundeep Panicker 	struct segment_list *next;
46*6bbe0590SSundeep Panicker } segment_list_t;
47*6bbe0590SSundeep Panicker 
48*6bbe0590SSundeep Panicker 
49*6bbe0590SSundeep Panicker typedef struct raw_list {
50*6bbe0590SSundeep Panicker 	uint8_t *raw;
51*6bbe0590SSundeep Panicker 	size_t size;
52*6bbe0590SSundeep Panicker 	char *cont_type;
53*6bbe0590SSundeep Panicker 
54*6bbe0590SSundeep Panicker 	container_hdl_t cont;
55*6bbe0590SSundeep Panicker 	segment_list_t *segs;
56*6bbe0590SSundeep Panicker 
57*6bbe0590SSundeep Panicker 	fru_treehdl_t hdl;
58*6bbe0590SSundeep Panicker } raw_list_t;
59*6bbe0590SSundeep Panicker 
60*6bbe0590SSundeep Panicker 
61*6bbe0590SSundeep Panicker /* raw_access.c */
62*6bbe0590SSundeep Panicker container_hdl_t open_raw_data(raw_list_t *);
63*6bbe0590SSundeep Panicker int fru_close_container(container_hdl_t);
64*6bbe0590SSundeep Panicker raw_list_t *seghdl_to_rawlist(segment_hdl_t node);
65*6bbe0590SSundeep Panicker 
66*6bbe0590SSundeep Panicker #ifdef __cplusplus
67*6bbe0590SSundeep Panicker }
68*6bbe0590SSundeep Panicker #endif
69*6bbe0590SSundeep Panicker 
70*6bbe0590SSundeep Panicker #endif /* _FRURAW_H */
71