'\" te .\" Copyright (c) 2006, 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 NVPAIR_VALUE_BYTE 9F "Jan 16, 2006" .SH NAME nvpair_value_byte, nvpair_value_nvlist, nvpair_value_int8, nvpair_value_int16, nvpair_value_int32, nvpair_value_int64, nvpair_value_uint8, nvpair_value_uint16, nvpair_value_uint32, nvpair_value_uint64, nvpair_value_string, nvpair_value_boolean_array, nvpair_value_byte_array, nvpair_value_nvlist_array, nvpair_value_int8_array, nvpair_value_int16_array, nvpair_value_int32_array, nvpair_value_int64_array, nvpair_value_uint8_array, nvpair_value_uint16_array, nvpair_value_uint32_array, nvpair_value_uint64_array, nvpair_value_string_array \- retrieve value from a name-value pair .SH SYNOPSIS .nf #include \fBint\fR \fBnvpair_value_boolean_value\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBboolean_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_byte\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuchar_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int8\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint8_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint8\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint8_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int16\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint16_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint16\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint16_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int32\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint32_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint32\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint32_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int64\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint64_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint64\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint64_t *\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_string\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBchar **\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_nvlist\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBnvlist_t **\fR\fIval\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_boolean_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBboolean_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_byte_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuchar_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int8_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint8_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint8_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint8_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int16_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint16_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint16_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint16_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int32_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint32_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint32_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint32_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_int64_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBint64_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_uint64_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBuint64_t **\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_string_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBchar ***\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .LP .nf \fBint\fR \fBnvpair_value_nvlist_array\fR(\fBnvpair_t *\fR\fInvpair\fR, \fBnvlist_t ***\fR\fIval\fR, \fBuint_t *\fR\fInelem\fR); .fi .SH INTERFACE LEVEL illumos DDI specific (illumos DDI) .SH PARAMETERS .ne 2 .na \fB\fInvpair\fR\fR .ad .RS 10n Name-value pair (\fBnvpair\fR) to be processed. .RE .sp .ne 2 .na \fB\fInelem\fR\fR .ad .RS 10n Address to store the number of elements in value. .RE .sp .ne 2 .na \fB\fIval\fR\fR .ad .RS 10n Address to store the value or starting address of array value. .RE .SH DESCRIPTION These functions retrieve the value of \fInvpair\fR. The data type of \fInvpair\fR must match the function name for the call to be successful. .sp .LP There is no \fBnvpair_value_boolean()\fR; the existence of the name implies the value is true. .sp .LP For array data types, including string, the memory containing the data is managed by the library and references to the value remains valid until \fBnvlist_free()\fR is called on the \fBnvlist_t\fR from which \fInvpair\fR is obtained. See \fBnvlist_free\fR(9F) .sp .LP The value of an nvpair may not be retrieved after the nvpair having been removed from or replaced in an nvlist. Replacement can happen during pair addition on nvlists created with NV_UNIQUE_NAME_TYPE and NV_UNIQUE_NAME. See \fBnvlist_alloc(9F)\fR for more details. .SH RETURN VALUES .ne 2 .na \fB\fB0\fR\fR .ad .RS 10n Success .RE .sp .ne 2 .na \fB\fBEINVAL\fR\fR .ad .RS 10n Either one of the arguments is \fINULL\fR or type of \fInvpair\fR does not match the interface name. .RE .SH CONTEXT These functions can be called from user, interrupt, or kernel context.