2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LIBNVPAIR 3LIB "Mar 13, 2016"
8 libnvpair \- name-value pair library
12 cc [ \fIflag\fR... ] \fIfile\fR... \fB-lnvpair\fR [ \fIlibrary\fR... ]
13 #include <\fBlibnvpair.h\fR>
18 The \fBlibnvpair\fR library exports a set of functions for managing name-value
22 The library defines four opaque handles:
29 handle to a name-value pair
38 handle to a list of name-value pairs
44 \fB\fBnv_alloc_t\fR\fR
47 handle to a pluggable allocator
53 \fB\fBnv_alloc_ops_t\fR\fR
56 handle to pluggable allocator operations
61 The library supports the following operations:
66 Allocate and free an \fBnvlist_t\fR.
72 Specify the allocater to be used when manipulating an \fBnvlist_t\fR.
78 Add and remove an \fBnvpair_t\fR from a list.
84 Search \fBnvlist_t\fR for a specified name pair.
90 Pack an \fBnvlist_t\fR into a contiguous buffer.
96 Expand a packed nvlist into a searchable \fBnvlist_t\fR.
100 The shared object \fBlibnvpair.so.1\fR provides the public interfaces defined
101 below. See \fBIntro\fR(3) for additional information on shared object
109 \fBnvlist_add_boolean\fR \fBnvlist_add_boolean_value\fR
110 \fBnvlist_add_boolean_array\fR \fBnvlist_add_byte\fR
111 \fBnvlist_add_byte_array\fR \fBnvlist_add_double\fR
112 \fBnvlist_add_int8\fR \fBnvlist_add_int8_array\fR
113 \fBnvlist_add_int16\fR \fBnvlist_add_int16_array\fR
114 \fBnvlist_add_int32\fR \fBnvlist_add_int32_array\fR
115 \fBnvlist_add_int64\fR \fBnvlist_add_int64_array\fR
116 \fBnvlist_add_nvlist\fR \fBnvlist_add_nvlist_array\fR
117 \fBnvlist_add_nvpair\fR \fBnvlist_add_string\fR
118 \fBnvlist_add_string_array\fR \fBnvlist_add_uint8\fR
119 \fBnvlist_add_uint8_array\fR \fBnvlist_add_uint16\fR
120 \fBnvlist_add_uint16_array\fR \fBnvlist_add_uint32\fR
121 \fBnvlist_add_uint32_array\fR \fBnvlist_add_uint64\fR
122 \fBnvlist_add_uint64_array\fR \fBnvlist_alloc\fR
123 \fBnvlist_dup\fR \fBnvpair_empty\fR
125 \fBnvlist_free\fR \fBnvlist_lookup_boolean\fR
126 \fBnvlist_lookup_boolean_value\fR \fBnvlist_lookup_boolean_array\fR
127 \fBnvlist_lookup_byte\fR \fBnvlist_lookup_byte_array\fR
128 \fBnvlist_lookup_double\fR \fBnvlist_lookup_int8\fR
129 \fBnvlist_lookup_int8_array\fR \fBnvlist_lookup_int16\fR
130 \fBnvlist_lookup_int16_array\fR \fBnvlist_lookup_int32\fR
131 \fBnvlist_lookup_int32_array\fR \fBnvlist_lookup_int64\fR
132 \fBnvlist_lookup_int64_array\fR \fBnvlist_lookup_nvlist\fR
133 \fBnvlist_lookup_nvlist_array\fR \fBnvlist_lookup_nv_alloc\fR
134 \fBnvlist_lookup_nvpair\fR \fBnvlist_lookup_pairs\fR
135 \fBnvlist_lookup_string\fR \fBnvlist_lookup_string_array\fR
136 \fBnvlist_lookup_uint8\fR \fBnvlist_lookup_uint8_array\fR
137 \fBnvlist_lookup_uint16\fR \fBnvlist_lookup_uint16_array\fR
138 \fBnvlist_lookup_uint32\fR \fBnvlist_lookup_uint32_array\fR
139 \fBnvlist_lookup_uint64\fR \fBnvlist_lookup_uint64_array\fR
140 \fBnvlist_merge\fR \fBnvlist_next_nvpair\fR
141 \fBnvlist_pack\fR \fBnvlist_remove\fR
142 \fBnvlist_remove_all\fR \fBnvlist_size\fR
143 \fBnvlist_unpack\fR \fBnvlist_xalloc\fR
144 \fBnvlist_xdup\fR \fBnvlist_xpack\fR
145 \fBnvlist_xunpack\fR \fBnvpair_name\fR
146 \fBnvpair_type\fR \fBnvpair_value_boolean_array\fR
147 \fBnvpair_value_boolean_value\fR \fBnvpair_value_byte\fR
148 \fBnvpair_value_byte_array\fR \fBnvpair_value_double\fR
149 \fBnvpair_value_int8\fR \fBnvpair_value_int8_array\fR
150 \fBnvpair_value_int16\fR \fBnvpair_value_int16_array\fR
151 \fBnvpair_value_int32\fR \fBnvpair_value_int32_array\fR
152 \fBnvpair_value_int64\fR \fBnvpair_value_int64_array\fR
153 \fBnvpair_value_nvlist\fR \fBnvpair_value_nvlist_array\fR
154 \fBnvpair_value_string\fR \fBnvpair_value_string_array\fR
155 \fBnvpair_value_uint8\fR \fBnvpair_value_uint8_array\fR
156 \fBnvpair_value_uint16\fR \fBnvpair_value_uint16_array\fR
157 \fBnvpair_value_uint32\fR \fBnvpair_value_uint32_array\fR
158 \fBnvpair_value_uint64\fR \fBnvpair_value_uint64_array\fR
159 \fBnv_alloc_init\fR \fBnv_alloc_fini\fR
166 \fB\fB/lib/libnvpair.so.1\fR\fR
175 \fB\fB/lib/64/libnvpair.so.1\fR\fR
183 See \fBattributes\fR(5) for description of the following attributes:
191 ATTRIBUTE TYPE ATTRIBUTE VALUE
193 Interface Stability Committed
200 \fBIntro\fR(3), \fBattributes\fR(5)