17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51af98250Seschrock * Common Development and Distribution License (the "License"). 61af98250Seschrock * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22602ca9eaScth * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_NVPAIR_H 277c478bd9Sstevel@tonic-gate #define _SYS_NVPAIR_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #include <sys/types.h> 327c478bd9Sstevel@tonic-gate #include <sys/errno.h> 337c478bd9Sstevel@tonic-gate #include <sys/va_list.h> 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #if defined(_KERNEL) && !defined(_BOOT) 367c478bd9Sstevel@tonic-gate #include <sys/kmem.h> 377c478bd9Sstevel@tonic-gate #endif 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate #ifdef __cplusplus 407c478bd9Sstevel@tonic-gate extern "C" { 417c478bd9Sstevel@tonic-gate #endif 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate typedef enum { 447c478bd9Sstevel@tonic-gate DATA_TYPE_UNKNOWN = 0, 457c478bd9Sstevel@tonic-gate DATA_TYPE_BOOLEAN, 467c478bd9Sstevel@tonic-gate DATA_TYPE_BYTE, 477c478bd9Sstevel@tonic-gate DATA_TYPE_INT16, 487c478bd9Sstevel@tonic-gate DATA_TYPE_UINT16, 497c478bd9Sstevel@tonic-gate DATA_TYPE_INT32, 507c478bd9Sstevel@tonic-gate DATA_TYPE_UINT32, 517c478bd9Sstevel@tonic-gate DATA_TYPE_INT64, 527c478bd9Sstevel@tonic-gate DATA_TYPE_UINT64, 537c478bd9Sstevel@tonic-gate DATA_TYPE_STRING, 547c478bd9Sstevel@tonic-gate DATA_TYPE_BYTE_ARRAY, 557c478bd9Sstevel@tonic-gate DATA_TYPE_INT16_ARRAY, 567c478bd9Sstevel@tonic-gate DATA_TYPE_UINT16_ARRAY, 577c478bd9Sstevel@tonic-gate DATA_TYPE_INT32_ARRAY, 587c478bd9Sstevel@tonic-gate DATA_TYPE_UINT32_ARRAY, 597c478bd9Sstevel@tonic-gate DATA_TYPE_INT64_ARRAY, 607c478bd9Sstevel@tonic-gate DATA_TYPE_UINT64_ARRAY, 617c478bd9Sstevel@tonic-gate DATA_TYPE_STRING_ARRAY, 627c478bd9Sstevel@tonic-gate DATA_TYPE_HRTIME, 637c478bd9Sstevel@tonic-gate DATA_TYPE_NVLIST, 647c478bd9Sstevel@tonic-gate DATA_TYPE_NVLIST_ARRAY, 657c478bd9Sstevel@tonic-gate DATA_TYPE_BOOLEAN_VALUE, 667c478bd9Sstevel@tonic-gate DATA_TYPE_INT8, 677c478bd9Sstevel@tonic-gate DATA_TYPE_UINT8, 687c478bd9Sstevel@tonic-gate DATA_TYPE_BOOLEAN_ARRAY, 697c478bd9Sstevel@tonic-gate DATA_TYPE_INT8_ARRAY, 70*825ba0f2Srobj #if !defined(_KERNEL) 71*825ba0f2Srobj DATA_TYPE_UINT8_ARRAY, 72*825ba0f2Srobj DATA_TYPE_DOUBLE 73*825ba0f2Srobj #else 747c478bd9Sstevel@tonic-gate DATA_TYPE_UINT8_ARRAY 75*825ba0f2Srobj #endif 767c478bd9Sstevel@tonic-gate } data_type_t; 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate typedef struct nvpair { 797c478bd9Sstevel@tonic-gate int32_t nvp_size; /* size of this nvpair */ 807c478bd9Sstevel@tonic-gate int16_t nvp_name_sz; /* length of name string */ 817c478bd9Sstevel@tonic-gate int16_t nvp_reserve; /* not used */ 827c478bd9Sstevel@tonic-gate int32_t nvp_value_elem; /* number of elements for array types */ 837c478bd9Sstevel@tonic-gate data_type_t nvp_type; /* type of value */ 847c478bd9Sstevel@tonic-gate /* name string */ 857c478bd9Sstevel@tonic-gate /* aligned ptr array for string arrays */ 867c478bd9Sstevel@tonic-gate /* aligned array of data for value */ 877c478bd9Sstevel@tonic-gate } nvpair_t; 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate /* nvlist header */ 907c478bd9Sstevel@tonic-gate typedef struct nvlist { 917c478bd9Sstevel@tonic-gate int32_t nvl_version; 927c478bd9Sstevel@tonic-gate uint32_t nvl_nvflag; /* persistent flags */ 937c478bd9Sstevel@tonic-gate uint64_t nvl_priv; /* ptr to private data if not packed */ 947c478bd9Sstevel@tonic-gate uint32_t nvl_flag; 957c478bd9Sstevel@tonic-gate int32_t nvl_pad; /* currently not used, for alignment */ 967c478bd9Sstevel@tonic-gate } nvlist_t; 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate /* nvp implementation version */ 997c478bd9Sstevel@tonic-gate #define NV_VERSION 0 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate /* nvlist pack encoding */ 1027c478bd9Sstevel@tonic-gate #define NV_ENCODE_NATIVE 0 1037c478bd9Sstevel@tonic-gate #define NV_ENCODE_XDR 1 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate /* nvlist persistent unique name flags, stored in nvl_nvflags */ 1067c478bd9Sstevel@tonic-gate #define NV_UNIQUE_NAME 0x1 1077c478bd9Sstevel@tonic-gate #define NV_UNIQUE_NAME_TYPE 0x2 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate /* nvlist lookup pairs related flags */ 1107c478bd9Sstevel@tonic-gate #define NV_FLAG_NOENTOK 0x1 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate /* convenience macros */ 1137c478bd9Sstevel@tonic-gate #define NV_ALIGN(x) (((ulong_t)(x) + 7ul) & ~7ul) 1147c478bd9Sstevel@tonic-gate #define NV_ALIGN4(x) (((x) + 3) & ~3) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate #define NVP_SIZE(nvp) ((nvp)->nvp_size) 1177c478bd9Sstevel@tonic-gate #define NVP_NAME(nvp) ((char *)(nvp) + sizeof (nvpair_t)) 1187c478bd9Sstevel@tonic-gate #define NVP_TYPE(nvp) ((nvp)->nvp_type) 1197c478bd9Sstevel@tonic-gate #define NVP_NELEM(nvp) ((nvp)->nvp_value_elem) 1207c478bd9Sstevel@tonic-gate #define NVP_VALUE(nvp) ((char *)(nvp) + NV_ALIGN(sizeof (nvpair_t) \ 1217c478bd9Sstevel@tonic-gate + (nvp)->nvp_name_sz)) 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate #define NVL_VERSION(nvl) ((nvl)->nvl_version) 1247c478bd9Sstevel@tonic-gate #define NVL_SIZE(nvl) ((nvl)->nvl_size) 1257c478bd9Sstevel@tonic-gate #define NVL_FLAG(nvl) ((nvl)->nvl_flag) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate /* NV allocator framework */ 1287c478bd9Sstevel@tonic-gate typedef struct nv_alloc_ops nv_alloc_ops_t; 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate typedef struct nv_alloc { 1317c478bd9Sstevel@tonic-gate const nv_alloc_ops_t *nva_ops; 1327c478bd9Sstevel@tonic-gate void *nva_arg; 1337c478bd9Sstevel@tonic-gate } nv_alloc_t; 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate struct nv_alloc_ops { 1367c478bd9Sstevel@tonic-gate int (*nv_ao_init)(nv_alloc_t *, __va_list); 1377c478bd9Sstevel@tonic-gate void (*nv_ao_fini)(nv_alloc_t *); 1387c478bd9Sstevel@tonic-gate void *(*nv_ao_alloc)(nv_alloc_t *, size_t); 1397c478bd9Sstevel@tonic-gate void (*nv_ao_free)(nv_alloc_t *, void *, size_t); 1407c478bd9Sstevel@tonic-gate void (*nv_ao_reset)(nv_alloc_t *); 1417c478bd9Sstevel@tonic-gate }; 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate extern const nv_alloc_ops_t *nv_fixed_ops; 1447c478bd9Sstevel@tonic-gate extern nv_alloc_t *nv_alloc_nosleep; 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate #if defined(_KERNEL) && !defined(_BOOT) 1477c478bd9Sstevel@tonic-gate extern nv_alloc_t *nv_alloc_sleep; 1487c478bd9Sstevel@tonic-gate #endif 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate int nv_alloc_init(nv_alloc_t *, const nv_alloc_ops_t *, /* args */ ...); 1517c478bd9Sstevel@tonic-gate void nv_alloc_reset(nv_alloc_t *); 1527c478bd9Sstevel@tonic-gate void nv_alloc_fini(nv_alloc_t *); 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gate /* list management */ 1557c478bd9Sstevel@tonic-gate int nvlist_alloc(nvlist_t **, uint_t, int); 1567c478bd9Sstevel@tonic-gate void nvlist_free(nvlist_t *); 1577c478bd9Sstevel@tonic-gate int nvlist_size(nvlist_t *, size_t *, int); 1587c478bd9Sstevel@tonic-gate int nvlist_pack(nvlist_t *, char **, size_t *, int, int); 1597c478bd9Sstevel@tonic-gate int nvlist_unpack(char *, size_t, nvlist_t **, int); 1607c478bd9Sstevel@tonic-gate int nvlist_dup(nvlist_t *, nvlist_t **, int); 1617c478bd9Sstevel@tonic-gate int nvlist_merge(nvlist_t *, nvlist_t *, int); 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate int nvlist_xalloc(nvlist_t **, uint_t, nv_alloc_t *); 1647c478bd9Sstevel@tonic-gate int nvlist_xpack(nvlist_t *, char **, size_t *, int, nv_alloc_t *); 1657c478bd9Sstevel@tonic-gate int nvlist_xunpack(char *, size_t, nvlist_t **, nv_alloc_t *); 1667c478bd9Sstevel@tonic-gate int nvlist_xdup(nvlist_t *, nvlist_t **, nv_alloc_t *); 1677c478bd9Sstevel@tonic-gate nv_alloc_t *nvlist_lookup_nv_alloc(nvlist_t *); 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gate int nvlist_add_nvpair(nvlist_t *, nvpair_t *); 1707c478bd9Sstevel@tonic-gate int nvlist_add_boolean(nvlist_t *, const char *); 1717c478bd9Sstevel@tonic-gate int nvlist_add_boolean_value(nvlist_t *, const char *, boolean_t); 1727c478bd9Sstevel@tonic-gate int nvlist_add_byte(nvlist_t *, const char *, uchar_t); 1737c478bd9Sstevel@tonic-gate int nvlist_add_int8(nvlist_t *, const char *, int8_t); 1747c478bd9Sstevel@tonic-gate int nvlist_add_uint8(nvlist_t *, const char *, uint8_t); 1757c478bd9Sstevel@tonic-gate int nvlist_add_int16(nvlist_t *, const char *, int16_t); 1767c478bd9Sstevel@tonic-gate int nvlist_add_uint16(nvlist_t *, const char *, uint16_t); 1777c478bd9Sstevel@tonic-gate int nvlist_add_int32(nvlist_t *, const char *, int32_t); 1787c478bd9Sstevel@tonic-gate int nvlist_add_uint32(nvlist_t *, const char *, uint32_t); 1797c478bd9Sstevel@tonic-gate int nvlist_add_int64(nvlist_t *, const char *, int64_t); 1807c478bd9Sstevel@tonic-gate int nvlist_add_uint64(nvlist_t *, const char *, uint64_t); 1817c478bd9Sstevel@tonic-gate int nvlist_add_string(nvlist_t *, const char *, const char *); 1827c478bd9Sstevel@tonic-gate int nvlist_add_nvlist(nvlist_t *, const char *, nvlist_t *); 1837c478bd9Sstevel@tonic-gate int nvlist_add_boolean_array(nvlist_t *, const char *, boolean_t *, uint_t); 1847c478bd9Sstevel@tonic-gate int nvlist_add_byte_array(nvlist_t *, const char *, uchar_t *, uint_t); 1857c478bd9Sstevel@tonic-gate int nvlist_add_int8_array(nvlist_t *, const char *, int8_t *, uint_t); 1867c478bd9Sstevel@tonic-gate int nvlist_add_uint8_array(nvlist_t *, const char *, uint8_t *, uint_t); 1877c478bd9Sstevel@tonic-gate int nvlist_add_int16_array(nvlist_t *, const char *, int16_t *, uint_t); 1887c478bd9Sstevel@tonic-gate int nvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, uint_t); 1897c478bd9Sstevel@tonic-gate int nvlist_add_int32_array(nvlist_t *, const char *, int32_t *, uint_t); 1907c478bd9Sstevel@tonic-gate int nvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, uint_t); 1917c478bd9Sstevel@tonic-gate int nvlist_add_int64_array(nvlist_t *, const char *, int64_t *, uint_t); 1927c478bd9Sstevel@tonic-gate int nvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t); 1937c478bd9Sstevel@tonic-gate int nvlist_add_string_array(nvlist_t *, const char *, char *const *, uint_t); 1947c478bd9Sstevel@tonic-gate int nvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t); 1957c478bd9Sstevel@tonic-gate int nvlist_add_hrtime(nvlist_t *, const char *, hrtime_t); 196*825ba0f2Srobj #if !defined(_KERNEL) 197*825ba0f2Srobj int nvlist_add_double(nvlist_t *, const char *, double); 198*825ba0f2Srobj #endif 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate int nvlist_remove(nvlist_t *, const char *, data_type_t); 2017c478bd9Sstevel@tonic-gate int nvlist_remove_all(nvlist_t *, const char *); 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate int nvlist_lookup_boolean(nvlist_t *, const char *); 2047c478bd9Sstevel@tonic-gate int nvlist_lookup_boolean_value(nvlist_t *, const char *, boolean_t *); 2057c478bd9Sstevel@tonic-gate int nvlist_lookup_byte(nvlist_t *, const char *, uchar_t *); 2067c478bd9Sstevel@tonic-gate int nvlist_lookup_int8(nvlist_t *, const char *, int8_t *); 2077c478bd9Sstevel@tonic-gate int nvlist_lookup_uint8(nvlist_t *, const char *, uint8_t *); 2087c478bd9Sstevel@tonic-gate int nvlist_lookup_int16(nvlist_t *, const char *, int16_t *); 2097c478bd9Sstevel@tonic-gate int nvlist_lookup_uint16(nvlist_t *, const char *, uint16_t *); 2107c478bd9Sstevel@tonic-gate int nvlist_lookup_int32(nvlist_t *, const char *, int32_t *); 2117c478bd9Sstevel@tonic-gate int nvlist_lookup_uint32(nvlist_t *, const char *, uint32_t *); 2127c478bd9Sstevel@tonic-gate int nvlist_lookup_int64(nvlist_t *, const char *, int64_t *); 2137c478bd9Sstevel@tonic-gate int nvlist_lookup_uint64(nvlist_t *, const char *, uint64_t *); 2147c478bd9Sstevel@tonic-gate int nvlist_lookup_string(nvlist_t *, const char *, char **); 2157c478bd9Sstevel@tonic-gate int nvlist_lookup_nvlist(nvlist_t *, const char *, nvlist_t **); 2167c478bd9Sstevel@tonic-gate int nvlist_lookup_boolean_array(nvlist_t *, const char *, 2177c478bd9Sstevel@tonic-gate boolean_t **, uint_t *); 2187c478bd9Sstevel@tonic-gate int nvlist_lookup_byte_array(nvlist_t *, const char *, uchar_t **, uint_t *); 2197c478bd9Sstevel@tonic-gate int nvlist_lookup_int8_array(nvlist_t *, const char *, int8_t **, uint_t *); 2207c478bd9Sstevel@tonic-gate int nvlist_lookup_uint8_array(nvlist_t *, const char *, uint8_t **, uint_t *); 2217c478bd9Sstevel@tonic-gate int nvlist_lookup_int16_array(nvlist_t *, const char *, int16_t **, uint_t *); 2227c478bd9Sstevel@tonic-gate int nvlist_lookup_uint16_array(nvlist_t *, const char *, uint16_t **, uint_t *); 2237c478bd9Sstevel@tonic-gate int nvlist_lookup_int32_array(nvlist_t *, const char *, int32_t **, uint_t *); 2247c478bd9Sstevel@tonic-gate int nvlist_lookup_uint32_array(nvlist_t *, const char *, uint32_t **, uint_t *); 2257c478bd9Sstevel@tonic-gate int nvlist_lookup_int64_array(nvlist_t *, const char *, int64_t **, uint_t *); 2267c478bd9Sstevel@tonic-gate int nvlist_lookup_uint64_array(nvlist_t *, const char *, uint64_t **, uint_t *); 2277c478bd9Sstevel@tonic-gate int nvlist_lookup_string_array(nvlist_t *, const char *, char ***, uint_t *); 2287c478bd9Sstevel@tonic-gate int nvlist_lookup_nvlist_array(nvlist_t *, const char *, 2297c478bd9Sstevel@tonic-gate nvlist_t ***, uint_t *); 2307c478bd9Sstevel@tonic-gate int nvlist_lookup_hrtime(nvlist_t *, const char *, hrtime_t *); 231602ca9eaScth int nvlist_lookup_pairs(nvlist_t *, int, ...); 232*825ba0f2Srobj #if !defined(_KERNEL) 233*825ba0f2Srobj int nvlist_lookup_double(nvlist_t *, const char *, double *); 234*825ba0f2Srobj #endif 2357c478bd9Sstevel@tonic-gate 236602ca9eaScth int nvlist_lookup_nvpair(nvlist_t *, const char *, nvpair_t **); 237602ca9eaScth int nvlist_lookup_nvpair_embedded_index(nvlist_t *, const char *, nvpair_t **, 238602ca9eaScth int *, char **); 239602ca9eaScth boolean_t nvlist_exists(nvlist_t *, const char *); 2401af98250Seschrock 2417c478bd9Sstevel@tonic-gate /* processing nvpair */ 242602ca9eaScth nvpair_t *nvlist_next_nvpair(nvlist_t *, nvpair_t *); 2437c478bd9Sstevel@tonic-gate char *nvpair_name(nvpair_t *); 2447c478bd9Sstevel@tonic-gate data_type_t nvpair_type(nvpair_t *); 245602ca9eaScth int nvpair_type_is_array(nvpair_t *); 2467c478bd9Sstevel@tonic-gate int nvpair_value_boolean_value(nvpair_t *, boolean_t *); 2477c478bd9Sstevel@tonic-gate int nvpair_value_byte(nvpair_t *, uchar_t *); 2487c478bd9Sstevel@tonic-gate int nvpair_value_int8(nvpair_t *, int8_t *); 2497c478bd9Sstevel@tonic-gate int nvpair_value_uint8(nvpair_t *, uint8_t *); 2507c478bd9Sstevel@tonic-gate int nvpair_value_int16(nvpair_t *, int16_t *); 2517c478bd9Sstevel@tonic-gate int nvpair_value_uint16(nvpair_t *, uint16_t *); 2527c478bd9Sstevel@tonic-gate int nvpair_value_int32(nvpair_t *, int32_t *); 2537c478bd9Sstevel@tonic-gate int nvpair_value_uint32(nvpair_t *, uint32_t *); 2547c478bd9Sstevel@tonic-gate int nvpair_value_int64(nvpair_t *, int64_t *); 2557c478bd9Sstevel@tonic-gate int nvpair_value_uint64(nvpair_t *, uint64_t *); 2567c478bd9Sstevel@tonic-gate int nvpair_value_string(nvpair_t *, char **); 2577c478bd9Sstevel@tonic-gate int nvpair_value_nvlist(nvpair_t *, nvlist_t **); 2587c478bd9Sstevel@tonic-gate int nvpair_value_boolean_array(nvpair_t *, boolean_t **, uint_t *); 2597c478bd9Sstevel@tonic-gate int nvpair_value_byte_array(nvpair_t *, uchar_t **, uint_t *); 2607c478bd9Sstevel@tonic-gate int nvpair_value_int8_array(nvpair_t *, int8_t **, uint_t *); 2617c478bd9Sstevel@tonic-gate int nvpair_value_uint8_array(nvpair_t *, uint8_t **, uint_t *); 2627c478bd9Sstevel@tonic-gate int nvpair_value_int16_array(nvpair_t *, int16_t **, uint_t *); 2637c478bd9Sstevel@tonic-gate int nvpair_value_uint16_array(nvpair_t *, uint16_t **, uint_t *); 2647c478bd9Sstevel@tonic-gate int nvpair_value_int32_array(nvpair_t *, int32_t **, uint_t *); 2657c478bd9Sstevel@tonic-gate int nvpair_value_uint32_array(nvpair_t *, uint32_t **, uint_t *); 2667c478bd9Sstevel@tonic-gate int nvpair_value_int64_array(nvpair_t *, int64_t **, uint_t *); 2677c478bd9Sstevel@tonic-gate int nvpair_value_uint64_array(nvpair_t *, uint64_t **, uint_t *); 2687c478bd9Sstevel@tonic-gate int nvpair_value_string_array(nvpair_t *, char ***, uint_t *); 2697c478bd9Sstevel@tonic-gate int nvpair_value_nvlist_array(nvpair_t *, nvlist_t ***, uint_t *); 2707c478bd9Sstevel@tonic-gate int nvpair_value_hrtime(nvpair_t *, hrtime_t *); 271*825ba0f2Srobj #if !defined(_KERNEL) 272*825ba0f2Srobj int nvpair_value_double(nvpair_t *, double *); 273*825ba0f2Srobj #endif 2747c478bd9Sstevel@tonic-gate 2757c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2767c478bd9Sstevel@tonic-gate } 2777c478bd9Sstevel@tonic-gate #endif 2787c478bd9Sstevel@tonic-gate 2797c478bd9Sstevel@tonic-gate #endif /* _SYS_NVPAIR_H */ 280