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 https://opensource.org/licenses/CDDL-1.0.
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 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
28 * Copyright (c) 2017 by Delphix. All rights reserved.
31 #ifndef _NVPAIR_IMPL_H
32 #define _NVPAIR_IMPL_H
38 #include <sys/nvpair.h>
41 * The structures here provided for information and debugging purposes only
42 * may be changed in the future.
46 * implementation linked list for pre-packed data
48 typedef struct i_nvp i_nvp_t
;
52 /* ensure alignment */
56 /* pointer to next nvpair */
59 /* pointer to prev nvpair */
62 /* next pair in table bucket */
63 i_nvp_t
*_nvi_hashtable_next
;
70 #define nvi_next _nvi_un._nvi._nvi_next
71 #define nvi_prev _nvi_un._nvi._nvi_prev
72 #define nvi_hashtable_next _nvi_un._nvi._nvi_hashtable_next
75 i_nvp_t
*nvp_list
; /* linked list of nvpairs */
76 i_nvp_t
*nvp_last
; /* last nvpair */
77 const i_nvp_t
*nvp_curr
; /* current walker nvpair */
78 nv_alloc_t
*nvp_nva
; /* pluggable allocator */
79 uint32_t nvp_stat
; /* internal state */
81 i_nvp_t
**nvp_hashtable
; /* table of entries used for lookup */
82 uint32_t nvp_nbuckets
; /* # of buckets in hash table */
83 uint32_t nvp_nentries
; /* # of entries in hash table */
90 #endif /* _NVPAIR_IMPL_H */