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