1 1.1 haad /* 2 1.1 haad * CDDL HEADER START 3 1.1 haad * 4 1.1 haad * The contents of this file are subject to the terms of the 5 1.1 haad * Common Development and Distribution License, Version 1.0 only 6 1.1 haad * (the "License"). You may not use this file except in compliance 7 1.1 haad * with the License. 8 1.1 haad * 9 1.1 haad * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 1.1 haad * or http://www.opensolaris.org/os/licensing. 11 1.1 haad * See the License for the specific language governing permissions 12 1.1 haad * and limitations under the License. 13 1.1 haad * 14 1.1 haad * When distributing Covered Code, include this CDDL HEADER in each 15 1.1 haad * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 1.1 haad * If applicable, add the following below this CDDL HEADER, with the 17 1.1 haad * fields enclosed by brackets "[]" replaced with your own identifying 18 1.1 haad * information: Portions Copyright [yyyy] [name of copyright owner] 19 1.1 haad * 20 1.1 haad * CDDL HEADER END 21 1.1 haad */ 22 1.1 haad /* 23 1.1 haad * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 1.1 haad * Use is subject to license terms. 25 1.1 haad */ 26 1.1 haad 27 1.1 haad #ifndef _NVPAIR_IMPL_H 28 1.1 haad #define _NVPAIR_IMPL_H 29 1.1 haad 30 1.1 haad #pragma ident "%Z%%M% %I% %E% SMI" 31 1.1 haad 32 1.1 haad #ifdef __cplusplus 33 1.1 haad extern "C" { 34 1.1 haad #endif 35 1.1 haad 36 1.1 haad #include <sys/nvpair.h> 37 1.1 haad 38 1.1 haad /* 39 1.1 haad * The structures here provided for information and debugging purposes only 40 1.1 haad * may be changed in the future. 41 1.1 haad */ 42 1.1 haad 43 1.1 haad /* 44 1.1 haad * implementation linked list for pre-packed data 45 1.1 haad */ 46 1.1 haad typedef struct i_nvp i_nvp_t; 47 1.1 haad 48 1.1 haad struct i_nvp { 49 1.1 haad union { 50 1.1 haad uint64_t _nvi_align; /* ensure alignment */ 51 1.1 haad struct { 52 1.1 haad i_nvp_t *_nvi_next; /* pointer to next nvpair */ 53 1.1 haad i_nvp_t *_nvi_prev; /* pointer to prev nvpair */ 54 1.1 haad } _nvi; 55 1.1 haad } _nvi_un; 56 1.1 haad nvpair_t nvi_nvp; /* nvpair */ 57 1.1 haad }; 58 1.1 haad #define nvi_next _nvi_un._nvi._nvi_next 59 1.1 haad #define nvi_prev _nvi_un._nvi._nvi_prev 60 1.1 haad 61 1.1 haad typedef struct { 62 1.1 haad i_nvp_t *nvp_list; /* linked list of nvpairs */ 63 1.1 haad i_nvp_t *nvp_last; /* last nvpair */ 64 1.1 haad i_nvp_t *nvp_curr; /* current walker nvpair */ 65 1.1 haad nv_alloc_t *nvp_nva; /* pluggable allocator */ 66 1.1 haad uint32_t nvp_stat; /* internal state */ 67 1.1 haad } nvpriv_t; 68 1.1 haad 69 1.1 haad #ifdef __cplusplus 70 1.1 haad } 71 1.1 haad #endif 72 1.1 haad 73 1.1 haad #endif /* _NVPAIR_IMPL_H */ 74