'\" te .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. .\" 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. .\" 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. .\" 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] .TH LIBNVPAIR 3LIB "Mar 13, 2016" .SH NAME libnvpair \- name-value pair library .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lnvpair\fR [ \fIlibrary\fR... ] #include <\fBlibnvpair.h\fR> .fi .SH DESCRIPTION .LP The \fBlibnvpair\fR library exports a set of functions for managing name-value pairs. .sp .LP The library defines four opaque handles: .sp .ne 2 .na \fB\fBnvpair_t\fR\fR .ad .RS 18n handle to a name-value pair .RE .sp .ne 2 .na \fB\fBnvlist_t\fR\fR .ad .RS 18n handle to a list of name-value pairs .RE .sp .ne 2 .na \fB\fBnv_alloc_t\fR\fR .ad .RS 18n handle to a pluggable allocator .RE .sp .ne 2 .na \fB\fBnv_alloc_ops_t\fR\fR .ad .RS 18n handle to pluggable allocator operations .RE .sp .LP The library supports the following operations: .RS +4 .TP .ie t \(bu .el o Allocate and free an \fBnvlist_t\fR. .RE .RS +4 .TP .ie t \(bu .el o Specify the allocater to be used when manipulating an \fBnvlist_t\fR. .RE .RS +4 .TP .ie t \(bu .el o Add and remove an \fBnvpair_t\fR from a list. .RE .RS +4 .TP .ie t \(bu .el o Search \fBnvlist_t\fR for a specified name pair. .RE .RS +4 .TP .ie t \(bu .el o Pack an \fBnvlist_t\fR into a contiguous buffer. .RE .RS +4 .TP .ie t \(bu .el o Expand a packed nvlist into a searchable \fBnvlist_t\fR. .RE .SH INTERFACES .LP The shared object \fBlibnvpair.so.1\fR provides the public interfaces defined below. See \fBIntro\fR(3) for additional information on shared object interfaces. .sp .sp .TS l l l l . \fBnvlist_add_boolean\fR \fBnvlist_add_boolean_value\fR \fBnvlist_add_boolean_array\fR \fBnvlist_add_byte\fR \fBnvlist_add_byte_array\fR \fBnvlist_add_double\fR \fBnvlist_add_int8\fR \fBnvlist_add_int8_array\fR \fBnvlist_add_int16\fR \fBnvlist_add_int16_array\fR \fBnvlist_add_int32\fR \fBnvlist_add_int32_array\fR \fBnvlist_add_int64\fR \fBnvlist_add_int64_array\fR \fBnvlist_add_nvlist\fR \fBnvlist_add_nvlist_array\fR \fBnvlist_add_nvpair\fR \fBnvlist_add_string\fR \fBnvlist_add_string_array\fR \fBnvlist_add_uint8\fR \fBnvlist_add_uint8_array\fR \fBnvlist_add_uint16\fR \fBnvlist_add_uint16_array\fR \fBnvlist_add_uint32\fR \fBnvlist_add_uint32_array\fR \fBnvlist_add_uint64\fR \fBnvlist_add_uint64_array\fR \fBnvlist_alloc\fR \fBnvlist_dup\fR \fBnvpair_empty\fR \fBnvlist_exists\fR \fBnvlist_free\fR \fBnvlist_lookup_boolean\fR \fBnvlist_lookup_boolean_value\fR \fBnvlist_lookup_boolean_array\fR \fBnvlist_lookup_byte\fR \fBnvlist_lookup_byte_array\fR \fBnvlist_lookup_double\fR \fBnvlist_lookup_int8\fR \fBnvlist_lookup_int8_array\fR \fBnvlist_lookup_int16\fR \fBnvlist_lookup_int16_array\fR \fBnvlist_lookup_int32\fR \fBnvlist_lookup_int32_array\fR \fBnvlist_lookup_int64\fR \fBnvlist_lookup_int64_array\fR \fBnvlist_lookup_nvlist\fR \fBnvlist_lookup_nvlist_array\fR \fBnvlist_lookup_nv_alloc\fR \fBnvlist_lookup_nvpair\fR \fBnvlist_lookup_pairs\fR \fBnvlist_lookup_string\fR \fBnvlist_lookup_string_array\fR \fBnvlist_lookup_uint8\fR \fBnvlist_lookup_uint8_array\fR \fBnvlist_lookup_uint16\fR \fBnvlist_lookup_uint16_array\fR \fBnvlist_lookup_uint32\fR \fBnvlist_lookup_uint32_array\fR \fBnvlist_lookup_uint64\fR \fBnvlist_lookup_uint64_array\fR \fBnvlist_merge\fR \fBnvlist_next_nvpair\fR \fBnvlist_pack\fR \fBnvlist_remove\fR \fBnvlist_remove_all\fR \fBnvlist_size\fR \fBnvlist_unpack\fR \fBnvlist_xalloc\fR \fBnvlist_xdup\fR \fBnvlist_xpack\fR \fBnvlist_xunpack\fR \fBnvpair_name\fR \fBnvpair_type\fR \fBnvpair_value_boolean_array\fR \fBnvpair_value_boolean_value\fR \fBnvpair_value_byte\fR \fBnvpair_value_byte_array\fR \fBnvpair_value_double\fR \fBnvpair_value_int8\fR \fBnvpair_value_int8_array\fR \fBnvpair_value_int16\fR \fBnvpair_value_int16_array\fR \fBnvpair_value_int32\fR \fBnvpair_value_int32_array\fR \fBnvpair_value_int64\fR \fBnvpair_value_int64_array\fR \fBnvpair_value_nvlist\fR \fBnvpair_value_nvlist_array\fR \fBnvpair_value_string\fR \fBnvpair_value_string_array\fR \fBnvpair_value_uint8\fR \fBnvpair_value_uint8_array\fR \fBnvpair_value_uint16\fR \fBnvpair_value_uint16_array\fR \fBnvpair_value_uint32\fR \fBnvpair_value_uint32_array\fR \fBnvpair_value_uint64\fR \fBnvpair_value_uint64_array\fR \fBnv_alloc_init\fR \fBnv_alloc_fini\fR \fBnv_alloc_reset\fR .TE .SH FILES .ne 2 .na \fB\fB/lib/libnvpair.so.1\fR\fR .ad .RS 26n shared object .RE .sp .ne 2 .na \fB\fB/lib/64/libnvpair.so.1\fR\fR .ad .RS 26n 64-bit shared object .RE .SH ATTRIBUTES .LP See \fBattributes\fR(5) for description of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level MT-Safe .TE .SH SEE ALSO .LP \fBIntro\fR(3), \fBattributes\fR(5)