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_NEXT_NVPAIR 9F "Jan 16, 2006"
8 nvlist_next_nvpair, nvpair_name, nvpair_type \- return data regarding
13 #include <sys/nvpair.h>
15 \fBnvpair_t *\fR\fBnvlist_next_nvpair\fR(\fBnvlist_t *\fR\fInvl\fR, \fBnvpair_t *\fR\fInvpair\fR);
20 \fBchar *\fR\fBnvpair_name\fR(\fBnvpair_t *\fR\fInvpair\fR);
25 \fBdata_type_t\fR \fBnvpair_type\fR(\fBnvpair_t *\fR\fInvpair\fR);
31 Solaris DDI specific (Solaris DDI)
39 The list of name-value pairs (\fBnvlist_t\fR) to be processed.
48 Handle to a name-value pair.
54 The \fBnvlist_next_nvpair()\fR function returns a handle to the next name-value
55 pair (\fBnvpair\fR) in the list following \fInvpair\fR. If \fInvpair\fR is
56 NULL, the first pair is returned. If \fInvpair\fR is the last pair in the
57 \fBnvlist_t\fR, NULL is returned.
60 The \fBnvpair_name()\fR function returns a string containing the name of
64 The \fBnvpair_type()\fR function retrieves the value of the \fInvpair\fR in the
65 form of enumerated type \fBdata_type_t\fR. This is used to determine the
66 appropriate \fBnvpair_*()\fR function to call for retrieving the value.
70 For \fBnvpair_name()\fR: a string containing the name.
73 For \fBnvpair_type()\fR: an enumerated data type \fBdata_type_t\fR. Possible
74 values for \fBdata_type_t\fR are:
79 DATA_TYPE_BOOLEAN_VALUE
91 DATA_TYPE_BOOLEAN_ARRAY
96 DATA_TYPE_UINT16_ARRAY
98 DATA_TYPE_UINT32_ARRAY
100 DATA_TYPE_UINT64_ARRAY
101 DATA_TYPE_STRING_ARRAY
102 DATA_TYPE_NVLIST_ARRAY
109 After nvpairs is removed from or replaced in an nvlist, it cannot be
110 manipulated. This includes \fBnvlist_next_nvpair()\fR, \fBnvpair_name()\fR and
111 \fBnvpair_type()\fR. Replacement can happen during pair addition on nvlists
112 created with NV_UNIQUE_NAME_TYPE and NV_UNIQUE_NAME. See \fBnvlist_alloc\fR(9F)
117 These functions can be called from user, interrupt, or kernel context.