Current File : //usr/share/man/man9f/nvlist_next_nvpair.9f
'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
.TH nvlist_next_nvpair 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
nvlist_next_nvpair, nvpair_name, nvpair_type \- return data regarding name-value pairs
.SH SYNOPSIS
.LP
.nf
#include <sys/nvpair.h>

\fBnvpair_t *\fR\fBnvlist_next_nvpair\fR(\fBnvlist_t *\fR\fInvl\fR, \fBnvpair_t *\fR\fInvpair\fR);
.fi

.LP
.nf
\fBchar *\fR\fBnvpair_name\fR(\fBnvpair_t *\fR\fInvpair\fR);
.fi

.LP
.nf
\fBdata_type_t\fR \fBnvpair_type\fR(\fBnvpair_t *\fR\fInvpair\fR);
.fi

.SH INTERFACE LEVEL
.sp
.LP
Solaris DDI specific (Solaris DDI)
.SH PARAMETERS
.sp
.ne 2
.mk
.na
\fB\fInvl\fR\fR
.ad
.RS 10n
.rt  
The list of name-value pairs (\fBnvlist_t\fR) to be processed.
.RE

.sp
.ne 2
.mk
.na
\fB\fInvpair\fR\fR
.ad
.RS 10n
.rt  
Handle to a name-value pair.
.RE

.SH DESCRIPTION
.sp
.LP
The \fBnvlist_next_nvpair()\fR function returns a handle to the next name-value pair (\fBnvpair\fR) in the list following \fInvpair\fR. If \fInvpair\fR is NULL, the first pair is returned. If \fInvpair\fR is the last pair in the \fBnvlist_t\fR, NULL is returned.
.sp
.LP
The \fBnvpair_name()\fR function returns a string containing the name of \fInvpair\fR.
.sp
.LP
The \fBnvpair_type()\fR function retrieves the value of the \fInvpair\fR in the form of enumerated type \fBdata_type_t\fR. This is used to determine the appropriate \fBnvpair_*()\fR function to call for retrieving the value.
.SH RETURN VALUES
.sp
.LP
For \fBnvpair_name()\fR: a string containing the name.
.sp
.LP
For \fBnvpair_type()\fR: an enumerated data type \fBdata_type_t\fR. Possible values for \fBdata_type_t\fR are:
.sp
.in +2
.nf
DATA_TYPE_BOOLEAN
DATA_TYPE_BOOLEAN_VALUE
DATA_TYPE_BYTE
DATA_TYPE_INT8
DATA_TYPE_UINT8
DATA_TYPE_INT16
DATA_TYPE_UINT16
DATA_TYPE_INT32
DATA_TYPE_UINT32
DATA_TYPE_INT64
DATA_TYPE_UINT64
DATA_TYPE_STRING
DATA_TYPE_NVLIST
DATA_TYPE_BOOLEAN_ARRAY
DATA_TYPE_BYTE_ARRAY
DATA_TYPE_INT8_ARRAY
DATA_TYPE_UINT8_ARRAY
DATA_TYPE_INT16_ARRAY
DATA_TYPE_UINT16_ARRAY
DATA_TYPE_INT32_ARRAY
DATA_TYPE_UINT32_ARRAY
DATA_TYPE_INT64_ARRAY
DATA_TYPE_UINT64_ARRAY
DATA_TYPE_STRING_ARRAY
DATA_TYPE_NVLIST_ARRAY
.fi
.in -2
.sp

.sp
.LP
After nvpairs is removed from or replaced in an nvlist, it cannot be manipulated. This includes \fBnvlist_next_nvpair()\fR, \fBnvpair_name()\fR and \fBnvpair_type()\fR. Replacement can happen during pair addition on nvlists created with NV_UNIQUE_NAME_TYPE and NV_UNIQUE_NAME. See \fBnvlist_alloc\fR(9F) for more details.
.SH CONTEXT
.sp
.LP
These functions can be called from user, interrupt, or kernel context.