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
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.
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]
23 * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
24 * All rights reserved.
28 #ifndef _FRU_DATA_IMPL_H
29 #define _FRU_DATA_IMPL_H
31 #pragma ident "%Z%%M% %I% %E% SMI"
46 #include "fru_access.h"
48 #define TABLE_SIZE 64 /* hash table size */
50 #define NUM_OF_COL_IN_PKT_TABLE 2
52 #define FRUTREE_PATH "/frutree" /* picltree path of frutree node */
54 #define FRUDATA_CONFFILE_NAME \
55 "/usr/platform/%s/lib/picl/plugins/libpiclfrudata.conf"
57 #define SECNAMESIZE 10 /* section name length */
59 typedef enum {CONTAINER_NODE
, SECTION_NODE
, SEGMENT_NODE
, PACKET_NODE
} node_t
;
61 typedef uint64_t fru_access_hdl_t
;
66 fru_access_hdl_t pkt_handle
; /* fru access handle */
67 size_t paylen
; /* payload length */
69 struct hash_obj
*next
;
73 fru_access_hdl_t segment_hdl
; /* fru_access handle */
74 picl_nodehdl_t sec_nodehdl
; /* section node handle */
75 int num_of_pkt
; /* number of packet */
76 struct hash_obj
*packet_list
;
77 struct hash_obj
*next
;
81 fru_access_hdl_t section_hdl
; /* fru_access handle */
82 picl_nodehdl_t container_hdl
; /* container node hdl. */
83 int num_of_segment
; /* number of segment */
84 struct hash_obj
*segment_list
;
85 struct hash_obj
*next
;
89 fru_access_hdl_t cont_hdl
; /* fru_access handle */
90 int num_of_section
; /* number of section */
91 struct hash_obj
*section_list
;
94 typedef struct hash_obj
{
95 uint64_t picl_hdl
; /* picl node/property handle */
98 container_node_t
*cont_node
; /* container */
99 section_node_t
*sec_node
; /* section */
100 segment_node_t
*seg_node
; /* segment */
101 packet_node_t
*pkt_node
; /* packet */
103 struct hash_obj
*next
;
104 struct hash_obj
*prev
;
107 typedef struct container_tbl
{
109 pthread_rwlock_t rwlock
;
110 pthread_cond_t cond_var
;
111 hash_obj_t
*hash_obj
;
112 struct container_tbl
*next
;
113 struct container_tbl
*prev
;
120 #endif /* _FRU_DATA_IMPL_H */