1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_NVPAIR_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_NVPAIR_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #include <sys/types.h> 33*7c478bd9Sstevel@tonic-gate #include <sys/errno.h> 34*7c478bd9Sstevel@tonic-gate #include <sys/va_list.h> 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #if defined(_KERNEL) && !defined(_BOOT) 37*7c478bd9Sstevel@tonic-gate #include <sys/kmem.h> 38*7c478bd9Sstevel@tonic-gate #endif 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 41*7c478bd9Sstevel@tonic-gate extern "C" { 42*7c478bd9Sstevel@tonic-gate #endif 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gate typedef enum { 45*7c478bd9Sstevel@tonic-gate DATA_TYPE_UNKNOWN = 0, 46*7c478bd9Sstevel@tonic-gate DATA_TYPE_BOOLEAN, 47*7c478bd9Sstevel@tonic-gate DATA_TYPE_BYTE, 48*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT16, 49*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT16, 50*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT32, 51*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT32, 52*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT64, 53*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT64, 54*7c478bd9Sstevel@tonic-gate DATA_TYPE_STRING, 55*7c478bd9Sstevel@tonic-gate DATA_TYPE_BYTE_ARRAY, 56*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT16_ARRAY, 57*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT16_ARRAY, 58*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT32_ARRAY, 59*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT32_ARRAY, 60*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT64_ARRAY, 61*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT64_ARRAY, 62*7c478bd9Sstevel@tonic-gate DATA_TYPE_STRING_ARRAY, 63*7c478bd9Sstevel@tonic-gate DATA_TYPE_HRTIME, 64*7c478bd9Sstevel@tonic-gate DATA_TYPE_NVLIST, 65*7c478bd9Sstevel@tonic-gate DATA_TYPE_NVLIST_ARRAY, 66*7c478bd9Sstevel@tonic-gate DATA_TYPE_BOOLEAN_VALUE, 67*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT8, 68*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT8, 69*7c478bd9Sstevel@tonic-gate DATA_TYPE_BOOLEAN_ARRAY, 70*7c478bd9Sstevel@tonic-gate DATA_TYPE_INT8_ARRAY, 71*7c478bd9Sstevel@tonic-gate DATA_TYPE_UINT8_ARRAY 72*7c478bd9Sstevel@tonic-gate } data_type_t; 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gate typedef struct nvpair { 75*7c478bd9Sstevel@tonic-gate int32_t nvp_size; /* size of this nvpair */ 76*7c478bd9Sstevel@tonic-gate int16_t nvp_name_sz; /* length of name string */ 77*7c478bd9Sstevel@tonic-gate int16_t nvp_reserve; /* not used */ 78*7c478bd9Sstevel@tonic-gate int32_t nvp_value_elem; /* number of elements for array types */ 79*7c478bd9Sstevel@tonic-gate data_type_t nvp_type; /* type of value */ 80*7c478bd9Sstevel@tonic-gate /* name string */ 81*7c478bd9Sstevel@tonic-gate /* aligned ptr array for string arrays */ 82*7c478bd9Sstevel@tonic-gate /* aligned array of data for value */ 83*7c478bd9Sstevel@tonic-gate } nvpair_t; 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate /* nvlist header */ 86*7c478bd9Sstevel@tonic-gate typedef struct nvlist { 87*7c478bd9Sstevel@tonic-gate int32_t nvl_version; 88*7c478bd9Sstevel@tonic-gate uint32_t nvl_nvflag; /* persistent flags */ 89*7c478bd9Sstevel@tonic-gate uint64_t nvl_priv; /* ptr to private data if not packed */ 90*7c478bd9Sstevel@tonic-gate uint32_t nvl_flag; 91*7c478bd9Sstevel@tonic-gate int32_t nvl_pad; /* currently not used, for alignment */ 92*7c478bd9Sstevel@tonic-gate } nvlist_t; 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate /* nvp implementation version */ 95*7c478bd9Sstevel@tonic-gate #define NV_VERSION 0 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate /* nvlist pack encoding */ 98*7c478bd9Sstevel@tonic-gate #define NV_ENCODE_NATIVE 0 99*7c478bd9Sstevel@tonic-gate #define NV_ENCODE_XDR 1 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate /* nvlist persistent unique name flags, stored in nvl_nvflags */ 102*7c478bd9Sstevel@tonic-gate #define NV_UNIQUE_NAME 0x1 103*7c478bd9Sstevel@tonic-gate #define NV_UNIQUE_NAME_TYPE 0x2 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate /* nvlist lookup pairs related flags */ 106*7c478bd9Sstevel@tonic-gate #define NV_FLAG_NOENTOK 0x1 107*7c478bd9Sstevel@tonic-gate 108*7c478bd9Sstevel@tonic-gate /* convenience macros */ 109*7c478bd9Sstevel@tonic-gate #define NV_ALIGN(x) (((ulong_t)(x) + 7ul) & ~7ul) 110*7c478bd9Sstevel@tonic-gate #define NV_ALIGN4(x) (((x) + 3) & ~3) 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gate #define NVP_SIZE(nvp) ((nvp)->nvp_size) 113*7c478bd9Sstevel@tonic-gate #define NVP_NAME(nvp) ((char *)(nvp) + sizeof (nvpair_t)) 114*7c478bd9Sstevel@tonic-gate #define NVP_TYPE(nvp) ((nvp)->nvp_type) 115*7c478bd9Sstevel@tonic-gate #define NVP_NELEM(nvp) ((nvp)->nvp_value_elem) 116*7c478bd9Sstevel@tonic-gate #define NVP_VALUE(nvp) ((char *)(nvp) + NV_ALIGN(sizeof (nvpair_t) \ 117*7c478bd9Sstevel@tonic-gate + (nvp)->nvp_name_sz)) 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gate #define NVL_VERSION(nvl) ((nvl)->nvl_version) 120*7c478bd9Sstevel@tonic-gate #define NVL_SIZE(nvl) ((nvl)->nvl_size) 121*7c478bd9Sstevel@tonic-gate #define NVL_FLAG(nvl) ((nvl)->nvl_flag) 122*7c478bd9Sstevel@tonic-gate 123*7c478bd9Sstevel@tonic-gate /* NV allocator framework */ 124*7c478bd9Sstevel@tonic-gate typedef struct nv_alloc_ops nv_alloc_ops_t; 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate typedef struct nv_alloc { 127*7c478bd9Sstevel@tonic-gate const nv_alloc_ops_t *nva_ops; 128*7c478bd9Sstevel@tonic-gate void *nva_arg; 129*7c478bd9Sstevel@tonic-gate } nv_alloc_t; 130*7c478bd9Sstevel@tonic-gate 131*7c478bd9Sstevel@tonic-gate struct nv_alloc_ops { 132*7c478bd9Sstevel@tonic-gate int (*nv_ao_init)(nv_alloc_t *, __va_list); 133*7c478bd9Sstevel@tonic-gate void (*nv_ao_fini)(nv_alloc_t *); 134*7c478bd9Sstevel@tonic-gate void *(*nv_ao_alloc)(nv_alloc_t *, size_t); 135*7c478bd9Sstevel@tonic-gate void (*nv_ao_free)(nv_alloc_t *, void *, size_t); 136*7c478bd9Sstevel@tonic-gate void (*nv_ao_reset)(nv_alloc_t *); 137*7c478bd9Sstevel@tonic-gate }; 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gate extern const nv_alloc_ops_t *nv_fixed_ops; 140*7c478bd9Sstevel@tonic-gate extern nv_alloc_t *nv_alloc_nosleep; 141*7c478bd9Sstevel@tonic-gate 142*7c478bd9Sstevel@tonic-gate #if defined(_KERNEL) && !defined(_BOOT) 143*7c478bd9Sstevel@tonic-gate extern nv_alloc_t *nv_alloc_sleep; 144*7c478bd9Sstevel@tonic-gate #endif 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate int nv_alloc_init(nv_alloc_t *, const nv_alloc_ops_t *, /* args */ ...); 147*7c478bd9Sstevel@tonic-gate void nv_alloc_reset(nv_alloc_t *); 148*7c478bd9Sstevel@tonic-gate void nv_alloc_fini(nv_alloc_t *); 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate /* list management */ 151*7c478bd9Sstevel@tonic-gate int nvlist_alloc(nvlist_t **, uint_t, int); 152*7c478bd9Sstevel@tonic-gate void nvlist_free(nvlist_t *); 153*7c478bd9Sstevel@tonic-gate int nvlist_size(nvlist_t *, size_t *, int); 154*7c478bd9Sstevel@tonic-gate int nvlist_pack(nvlist_t *, char **, size_t *, int, int); 155*7c478bd9Sstevel@tonic-gate int nvlist_unpack(char *, size_t, nvlist_t **, int); 156*7c478bd9Sstevel@tonic-gate int nvlist_dup(nvlist_t *, nvlist_t **, int); 157*7c478bd9Sstevel@tonic-gate int nvlist_merge(nvlist_t *, nvlist_t *, int); 158*7c478bd9Sstevel@tonic-gate 159*7c478bd9Sstevel@tonic-gate int nvlist_xalloc(nvlist_t **, uint_t, nv_alloc_t *); 160*7c478bd9Sstevel@tonic-gate int nvlist_xpack(nvlist_t *, char **, size_t *, int, nv_alloc_t *); 161*7c478bd9Sstevel@tonic-gate int nvlist_xunpack(char *, size_t, nvlist_t **, nv_alloc_t *); 162*7c478bd9Sstevel@tonic-gate int nvlist_xdup(nvlist_t *, nvlist_t **, nv_alloc_t *); 163*7c478bd9Sstevel@tonic-gate nv_alloc_t *nvlist_lookup_nv_alloc(nvlist_t *); 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate int nvlist_add_nvpair(nvlist_t *, nvpair_t *); 166*7c478bd9Sstevel@tonic-gate int nvlist_add_boolean(nvlist_t *, const char *); 167*7c478bd9Sstevel@tonic-gate int nvlist_add_boolean_value(nvlist_t *, const char *, boolean_t); 168*7c478bd9Sstevel@tonic-gate int nvlist_add_byte(nvlist_t *, const char *, uchar_t); 169*7c478bd9Sstevel@tonic-gate int nvlist_add_int8(nvlist_t *, const char *, int8_t); 170*7c478bd9Sstevel@tonic-gate int nvlist_add_uint8(nvlist_t *, const char *, uint8_t); 171*7c478bd9Sstevel@tonic-gate int nvlist_add_int16(nvlist_t *, const char *, int16_t); 172*7c478bd9Sstevel@tonic-gate int nvlist_add_uint16(nvlist_t *, const char *, uint16_t); 173*7c478bd9Sstevel@tonic-gate int nvlist_add_int32(nvlist_t *, const char *, int32_t); 174*7c478bd9Sstevel@tonic-gate int nvlist_add_uint32(nvlist_t *, const char *, uint32_t); 175*7c478bd9Sstevel@tonic-gate int nvlist_add_int64(nvlist_t *, const char *, int64_t); 176*7c478bd9Sstevel@tonic-gate int nvlist_add_uint64(nvlist_t *, const char *, uint64_t); 177*7c478bd9Sstevel@tonic-gate int nvlist_add_string(nvlist_t *, const char *, const char *); 178*7c478bd9Sstevel@tonic-gate int nvlist_add_nvlist(nvlist_t *, const char *, nvlist_t *); 179*7c478bd9Sstevel@tonic-gate int nvlist_add_boolean_array(nvlist_t *, const char *, boolean_t *, uint_t); 180*7c478bd9Sstevel@tonic-gate int nvlist_add_byte_array(nvlist_t *, const char *, uchar_t *, uint_t); 181*7c478bd9Sstevel@tonic-gate int nvlist_add_int8_array(nvlist_t *, const char *, int8_t *, uint_t); 182*7c478bd9Sstevel@tonic-gate int nvlist_add_uint8_array(nvlist_t *, const char *, uint8_t *, uint_t); 183*7c478bd9Sstevel@tonic-gate int nvlist_add_int16_array(nvlist_t *, const char *, int16_t *, uint_t); 184*7c478bd9Sstevel@tonic-gate int nvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, uint_t); 185*7c478bd9Sstevel@tonic-gate int nvlist_add_int32_array(nvlist_t *, const char *, int32_t *, uint_t); 186*7c478bd9Sstevel@tonic-gate int nvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, uint_t); 187*7c478bd9Sstevel@tonic-gate int nvlist_add_int64_array(nvlist_t *, const char *, int64_t *, uint_t); 188*7c478bd9Sstevel@tonic-gate int nvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t); 189*7c478bd9Sstevel@tonic-gate int nvlist_add_string_array(nvlist_t *, const char *, char *const *, uint_t); 190*7c478bd9Sstevel@tonic-gate int nvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t); 191*7c478bd9Sstevel@tonic-gate int nvlist_add_hrtime(nvlist_t *, const char *, hrtime_t); 192*7c478bd9Sstevel@tonic-gate 193*7c478bd9Sstevel@tonic-gate int nvlist_remove(nvlist_t *, const char *, data_type_t); 194*7c478bd9Sstevel@tonic-gate int nvlist_remove_all(nvlist_t *, const char *); 195*7c478bd9Sstevel@tonic-gate 196*7c478bd9Sstevel@tonic-gate int nvlist_lookup_boolean(nvlist_t *, const char *); 197*7c478bd9Sstevel@tonic-gate int nvlist_lookup_boolean_value(nvlist_t *, const char *, boolean_t *); 198*7c478bd9Sstevel@tonic-gate int nvlist_lookup_byte(nvlist_t *, const char *, uchar_t *); 199*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int8(nvlist_t *, const char *, int8_t *); 200*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint8(nvlist_t *, const char *, uint8_t *); 201*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int16(nvlist_t *, const char *, int16_t *); 202*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint16(nvlist_t *, const char *, uint16_t *); 203*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int32(nvlist_t *, const char *, int32_t *); 204*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint32(nvlist_t *, const char *, uint32_t *); 205*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int64(nvlist_t *, const char *, int64_t *); 206*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint64(nvlist_t *, const char *, uint64_t *); 207*7c478bd9Sstevel@tonic-gate int nvlist_lookup_string(nvlist_t *, const char *, char **); 208*7c478bd9Sstevel@tonic-gate int nvlist_lookup_nvlist(nvlist_t *, const char *, nvlist_t **); 209*7c478bd9Sstevel@tonic-gate int nvlist_lookup_boolean_array(nvlist_t *, const char *, 210*7c478bd9Sstevel@tonic-gate boolean_t **, uint_t *); 211*7c478bd9Sstevel@tonic-gate int nvlist_lookup_byte_array(nvlist_t *, const char *, uchar_t **, uint_t *); 212*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int8_array(nvlist_t *, const char *, int8_t **, uint_t *); 213*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint8_array(nvlist_t *, const char *, uint8_t **, uint_t *); 214*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int16_array(nvlist_t *, const char *, int16_t **, uint_t *); 215*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint16_array(nvlist_t *, const char *, uint16_t **, uint_t *); 216*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int32_array(nvlist_t *, const char *, int32_t **, uint_t *); 217*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint32_array(nvlist_t *, const char *, uint32_t **, uint_t *); 218*7c478bd9Sstevel@tonic-gate int nvlist_lookup_int64_array(nvlist_t *, const char *, int64_t **, uint_t *); 219*7c478bd9Sstevel@tonic-gate int nvlist_lookup_uint64_array(nvlist_t *, const char *, uint64_t **, uint_t *); 220*7c478bd9Sstevel@tonic-gate int nvlist_lookup_string_array(nvlist_t *, const char *, char ***, uint_t *); 221*7c478bd9Sstevel@tonic-gate int nvlist_lookup_nvlist_array(nvlist_t *, const char *, 222*7c478bd9Sstevel@tonic-gate nvlist_t ***, uint_t *); 223*7c478bd9Sstevel@tonic-gate int nvlist_lookup_hrtime(nvlist_t *, const char *, hrtime_t *); 224*7c478bd9Sstevel@tonic-gate int nvlist_lookup_pairs(nvlist_t *nvl, int, ...); 225*7c478bd9Sstevel@tonic-gate 226*7c478bd9Sstevel@tonic-gate /* processing nvpair */ 227*7c478bd9Sstevel@tonic-gate nvpair_t *nvlist_next_nvpair(nvlist_t *nvl, nvpair_t *); 228*7c478bd9Sstevel@tonic-gate char *nvpair_name(nvpair_t *); 229*7c478bd9Sstevel@tonic-gate data_type_t nvpair_type(nvpair_t *); 230*7c478bd9Sstevel@tonic-gate int nvpair_value_boolean_value(nvpair_t *, boolean_t *); 231*7c478bd9Sstevel@tonic-gate int nvpair_value_byte(nvpair_t *, uchar_t *); 232*7c478bd9Sstevel@tonic-gate int nvpair_value_int8(nvpair_t *, int8_t *); 233*7c478bd9Sstevel@tonic-gate int nvpair_value_uint8(nvpair_t *, uint8_t *); 234*7c478bd9Sstevel@tonic-gate int nvpair_value_int16(nvpair_t *, int16_t *); 235*7c478bd9Sstevel@tonic-gate int nvpair_value_uint16(nvpair_t *, uint16_t *); 236*7c478bd9Sstevel@tonic-gate int nvpair_value_int32(nvpair_t *, int32_t *); 237*7c478bd9Sstevel@tonic-gate int nvpair_value_uint32(nvpair_t *, uint32_t *); 238*7c478bd9Sstevel@tonic-gate int nvpair_value_int64(nvpair_t *, int64_t *); 239*7c478bd9Sstevel@tonic-gate int nvpair_value_uint64(nvpair_t *, uint64_t *); 240*7c478bd9Sstevel@tonic-gate int nvpair_value_string(nvpair_t *, char **); 241*7c478bd9Sstevel@tonic-gate int nvpair_value_nvlist(nvpair_t *, nvlist_t **); 242*7c478bd9Sstevel@tonic-gate int nvpair_value_boolean_array(nvpair_t *, boolean_t **, uint_t *); 243*7c478bd9Sstevel@tonic-gate int nvpair_value_byte_array(nvpair_t *, uchar_t **, uint_t *); 244*7c478bd9Sstevel@tonic-gate int nvpair_value_int8_array(nvpair_t *, int8_t **, uint_t *); 245*7c478bd9Sstevel@tonic-gate int nvpair_value_uint8_array(nvpair_t *, uint8_t **, uint_t *); 246*7c478bd9Sstevel@tonic-gate int nvpair_value_int16_array(nvpair_t *, int16_t **, uint_t *); 247*7c478bd9Sstevel@tonic-gate int nvpair_value_uint16_array(nvpair_t *, uint16_t **, uint_t *); 248*7c478bd9Sstevel@tonic-gate int nvpair_value_int32_array(nvpair_t *, int32_t **, uint_t *); 249*7c478bd9Sstevel@tonic-gate int nvpair_value_uint32_array(nvpair_t *, uint32_t **, uint_t *); 250*7c478bd9Sstevel@tonic-gate int nvpair_value_int64_array(nvpair_t *, int64_t **, uint_t *); 251*7c478bd9Sstevel@tonic-gate int nvpair_value_uint64_array(nvpair_t *, uint64_t **, uint_t *); 252*7c478bd9Sstevel@tonic-gate int nvpair_value_string_array(nvpair_t *, char ***, uint_t *); 253*7c478bd9Sstevel@tonic-gate int nvpair_value_nvlist_array(nvpair_t *, nvlist_t ***, uint_t *); 254*7c478bd9Sstevel@tonic-gate int nvpair_value_hrtime(nvpair_t *, hrtime_t *); 255*7c478bd9Sstevel@tonic-gate 256*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 257*7c478bd9Sstevel@tonic-gate } 258*7c478bd9Sstevel@tonic-gate #endif 259*7c478bd9Sstevel@tonic-gate 260*7c478bd9Sstevel@tonic-gate #endif /* _SYS_NVPAIR_H */ 261