1 '\" te
2 .\" Copyright (c) 2006, 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 NVLIST_ALLOC 9F "Jan 16, 2006"
7 .SH NAME
8 nvlist_alloc, nvlist_free, nvlist_size, nvlist_pack, nvlist_unpack, nvlist_dup,
9 nv_alloc_init, nv_alloc_fini, nvlist_xalloc, nvlist_xpack, nvlist_xunpack,
10 nvlist_xdup, nvlist_merge \- Manage a name-value pair list
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/nvpair.h>
15
16 List Manipulation:
17
18 \fBint\fR \fBnvlist_alloc\fR(\fBnvlist_t **\fR\fInvlp\fR, \fBuint_t\fR \fInvflag\fR,
19 \fBint\fR \fIkmflag\fR);
20 .fi
21
22 .LP
23 .nf
24 \fBint\fR \fBnvlist_xalloc\fR(\fBnvlist_t **\fR\fInvlp\fR, \fBuint_t\fR \fInvflag\fR, \fBnv_alloc_t *\fR\fInva\fR);
25 .fi
26
242 .sp
243 .LP
244 The \fBnvlist_alloc()\fR function allocates a new name-value pair list and
245 updates \fInvlp\fR to point to the handle. The argument \fInvflag\fR specifies
246 \fBnvlist_t\fR properties to remain persistent across packing, unpacking, and
247 duplication.
248 .sp
249 .LP
250 If \fBNV_UNIQUE_NAME\fR is specified for nvflag, existing nvpairs with matching
251 names are removed before the new nvpair is added. If \fBNV_UNIQUE_NAME_TYPE\fR
252 is specified for nvflag, existing nvpairs with matching names and data types
253 are removed before the new nvpair is added. See \fBnvlist_add_byte\fR(9F) for
254 more details.
255 .sp
256 .LP
257 The \fBnvlist_xalloc()\fR function differs from \fBnvlist_alloc()\fR in that
258 \fBnvlist_xalloc()\fR can use a different allocator, as described in the
259 Pluggable Allocators section.
260 .sp
261 .LP
262 The \fBnvlist_free()\fR function frees a name-value pair list.
263 .sp
264 .LP
265 The \fBnvlist_size()\fR function returns the minimum size of a contiguous
266 buffer large enough to pack \fInvl\fR. The \fIencoding\fR parameter specifies
267 the method of encoding when packing \fInvl\fR. Supported encoding methods are:
268 .sp
269 .ne 2
270 .na
271 \fB\fBNV_ENCODE_NATIVE\fR\fR
272 .ad
273 .RS 20n
274 Straight \fBbcopy()\fR as described in \fBbcopy\fR(9F).
275 .RE
276
277 .sp
278 .ne 2
279 .na
280 \fB\fBNV_ENCODE_XDR\fR\fR
281 .ad
282 .RS 20n
|
1 '\" te
2 .\" Copyright (c) 2006, 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 NVLIST_ALLOC 9F "Feb 15, 2016"
7 .SH NAME
8 nvlist_alloc, nvlist_free, nvlist_size, nvlist_pack, nvlist_unpack, nvlist_dup,
9 nv_alloc_init, nv_alloc_fini, nvlist_xalloc, nvlist_xpack, nvlist_xunpack,
10 nvlist_xdup, nvlist_merge \- Manage a name-value pair list
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/nvpair.h>
15
16 List Manipulation:
17
18 \fBint\fR \fBnvlist_alloc\fR(\fBnvlist_t **\fR\fInvlp\fR, \fBuint_t\fR \fInvflag\fR,
19 \fBint\fR \fIkmflag\fR);
20 .fi
21
22 .LP
23 .nf
24 \fBint\fR \fBnvlist_xalloc\fR(\fBnvlist_t **\fR\fInvlp\fR, \fBuint_t\fR \fInvflag\fR, \fBnv_alloc_t *\fR\fInva\fR);
25 .fi
26
242 .sp
243 .LP
244 The \fBnvlist_alloc()\fR function allocates a new name-value pair list and
245 updates \fInvlp\fR to point to the handle. The argument \fInvflag\fR specifies
246 \fBnvlist_t\fR properties to remain persistent across packing, unpacking, and
247 duplication.
248 .sp
249 .LP
250 If \fBNV_UNIQUE_NAME\fR is specified for nvflag, existing nvpairs with matching
251 names are removed before the new nvpair is added. If \fBNV_UNIQUE_NAME_TYPE\fR
252 is specified for nvflag, existing nvpairs with matching names and data types
253 are removed before the new nvpair is added. See \fBnvlist_add_byte\fR(9F) for
254 more details.
255 .sp
256 .LP
257 The \fBnvlist_xalloc()\fR function differs from \fBnvlist_alloc()\fR in that
258 \fBnvlist_xalloc()\fR can use a different allocator, as described in the
259 Pluggable Allocators section.
260 .sp
261 .LP
262 The \fBnvlist_free()\fR function frees a name-value pair list. If \fInvl\fR
263 is a null pointer, no action occurs.
264 .sp
265 .LP
266 The \fBnvlist_size()\fR function returns the minimum size of a contiguous
267 buffer large enough to pack \fInvl\fR. The \fIencoding\fR parameter specifies
268 the method of encoding when packing \fInvl\fR. Supported encoding methods are:
269 .sp
270 .ne 2
271 .na
272 \fB\fBNV_ENCODE_NATIVE\fR\fR
273 .ad
274 .RS 20n
275 Straight \fBbcopy()\fR as described in \fBbcopy\fR(9F).
276 .RE
277
278 .sp
279 .ne 2
280 .na
281 \fB\fBNV_ENCODE_XDR\fR\fR
282 .ad
283 .RS 20n
|