1*1303Swesolows /* 2*1303Swesolows * CDDL HEADER START 3*1303Swesolows * 4*1303Swesolows * The contents of this file are subject to the terms of the 5*1303Swesolows * Common Development and Distribution License (the "License"). 6*1303Swesolows * You may not use this file except in compliance with the License. 7*1303Swesolows * 8*1303Swesolows * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*1303Swesolows * or http://www.opensolaris.org/os/licensing. 10*1303Swesolows * See the License for the specific language governing permissions 11*1303Swesolows * and limitations under the License. 12*1303Swesolows * 13*1303Swesolows * When distributing Covered Code, include this CDDL HEADER in each 14*1303Swesolows * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*1303Swesolows * If applicable, add the following below this CDDL HEADER, with the 16*1303Swesolows * fields enclosed by brackets "[]" replaced with your own identifying 17*1303Swesolows * information: Portions Copyright [yyyy] [name of copyright owner] 18*1303Swesolows * 19*1303Swesolows * CDDL HEADER END 20*1303Swesolows */ 21*1303Swesolows 22*1303Swesolows /* 23*1303Swesolows * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*1303Swesolows * Use is subject to license terms. 25*1303Swesolows */ 26*1303Swesolows 27*1303Swesolows #ifndef _RESOURCE_H 28*1303Swesolows #define _RESOURCE_H 29*1303Swesolows 30*1303Swesolows #pragma ident "%Z%%M% %I% %E% SMI" 31*1303Swesolows 32*1303Swesolows #ifdef __cplusplus 33*1303Swesolows extern "C" { 34*1303Swesolows #endif 35*1303Swesolows 36*1303Swesolows #include <sys/types.h> 37*1303Swesolows #include <libuutil.h> 38*1303Swesolows 39*1303Swesolows typedef struct sunFmResource_data { 40*1303Swesolows ulong_t d_index; /* MIB index */ 41*1303Swesolows int d_valid; /* iteration stamp */ 42*1303Swesolows uu_avl_node_t d_fmri_avl; /* by-FMRI AVL node */ 43*1303Swesolows uu_avl_node_t d_index_avl; /* by-index AVL node */ 44*1303Swesolows char d_ari_fmri[256]; /* resource FMRI */ 45*1303Swesolows char d_ari_case[256]; /* resource state case UUID */ 46*1303Swesolows uint_t d_ari_flags; /* resource flags */ 47*1303Swesolows } sunFmResource_data_t; 48*1303Swesolows 49*1303Swesolows typedef struct sunFmResource_update_ctx { 50*1303Swesolows const char *uc_host; 51*1303Swesolows uint32_t uc_prog; 52*1303Swesolows int uc_version; 53*1303Swesolows int uc_all; 54*1303Swesolows ulong_t uc_index; 55*1303Swesolows uint32_t uc_type; 56*1303Swesolows } sunFmResource_update_ctx_t; 57*1303Swesolows 58*1303Swesolows int sunFmResourceTable_init(void); 59*1303Swesolows int sunFmResourceCount_init(void); 60*1303Swesolows 61*1303Swesolows #ifdef __cplusplus 62*1303Swesolows } 63*1303Swesolows #endif 64*1303Swesolows 65*1303Swesolows #endif /* _RESOURCE_H */ 66