nvlist_lookup_byte_array(3EXT)
NAME
| SYNOPSIS
| API RESTRICTIONS
| PARAMETERS
| DESCRIPTION
| RETURN VALUE
| ERRORS
| ATTRIBUTES
NAME
nvlist_lookup_boolean, nvlist_lookup_byte, nvlist_lookup_int16, nvlist_lookup_uint16, nvlist_lookup_int32, nvlist_lookup_uint64, nvlist_lookup_uint32, nvlist_lookup_int64, nvlist_lookup_string, nvlist_lookup_byte_array, nvlist_lookup_int16_array, nvlist_lookup_uint16_array, nvlist_lookup_int32_array, nvlist_lookup_uint32_array, nvlist_lookup_int64_array, nvlist_lookup_uint64_array, nvlist_lookup_string_array, nvlist_lookup_hrtime- retrieve pairs from name-value pair lists
SYNOPSIS
$(OS_DIR)/lib/libnvpair.a
#include <libnvpair.h>
#include <sys/nvpair.h>
int
nvlist_lookup_boolean(nvlist_t *
nvl, char *
name);
int
nvlist_lookup_byte(nvlist_t *
nvl, char *
name, uchar_t *
val);
int
nvlist_lookup_int16(nvlist_t *
nvl, char *
name, int16_t *
val);
int
nvlist_lookup_uint16(nvlist_t *
nvl, char *
name, uint16_t *
val);
int
nvlist_lookup_int32(nvlist_t *
nvl, char *
name, int32_t *
val);
int
nvlist_lookup_uint32(nvlist_t *
nvl, char *
name, uint32_t *
val);
int
nvlist_lookup_int64(nvlist_t *
nvl, char *
name, int64_t *
val);
int
nvlist_lookup_uint64(nvlist_t *
nvl, char *
name, uint64_t *
val);
int
nvlist_lookup_string(nvlist_t *
nvl, char *
name, char **
val);
int
nvlist_lookup_byte_array(nvlist_t *
nvl, char *
name, uchar_t **
val, uint_t *
nelem);
int
nvlist_lookup_int16_array(nvlist_t *
nvl, char *
name, int16_t **
val, uint16_t *
nelem);
int
nvlist_lookup_uint16_array(nvlist_t *
nvl, char *
name, uint16_t *
val, uint_t
nelem);
int
nvlist_lookup_uint16_array(nvlist_t *
nvl, char *
name, uint16_t *
val, uint_t
nelem);
int
nvlist_lookup_int32_array(nvlist_t *
nvl, char *
name, int32_t **
val, uint_t *
nelem);
int
nvlist_lookup_uint32_array(nvlist_t *
nvl, char *
name, uint32_t **
val, uint_t *
nelem);
int
nvlist_lookup_int64_array(nvlist_t *
nvl, char *
name, int64_t **
val, uint_t *
nelem);
int
nvlist_lookup_uint64_array(nvlist_t *
nvl, char *
name, uint64_t **
val, uint_t *
nelem);
int
nvlist_lookup_string_array(nvlist_t *
nvl, char *
name, char ***
val, uint_t *
nelem);
int
nvlist_lookup_hrtime(nvlist_t *
nvl, char *
name, hrtime_t *
val);
API RESTRICTIONS
The function or functions documented here may not be used safely in
all application contexts with all APIs provided in the ChorusOS 5.0 product.
See
API(5FEA)
for details.
PARAMETERS
-
nvl
-
nvlist_t
to be processed
-
name
-
Name
of the name-value pair to search for
-
nelem
-
Address
to store the number of elements in value
-
val
-
Address
to store the starting address of the value
DESCRIPTION
The
nvlist_lookup_*()
function finds the first occurrence
of
nvpair
which matches the
name
and
type
indicated by the interface name.
If one is found,
nelem
and
val
are modified in order to contain the number of elements in value and the starting
address of data, respectively.
All memory required for storing the array elements, including string
value, is managed by the library. References to such data remain valid until
nvlist_free()
is called on
nvl
.
RETURN VALUE
These functions return 0 upon success. Otherwise, they return one of
the following error codes.
ERRORS
-
[EINVAL]
-
Invalid
argument
-
[ENOMEM]
-
No matching
name-value pair found
-
[ENOTSUP]
-
The
name-value list was not allocated with the
NV_UNIQUE_NAME
or
NV_UNIQUE_NAME_TYPE
flag
ATTRIBUTES
ChorusOS 5.0 Last Revised December 2001
NAME
| SYNOPSIS
| API RESTRICTIONS
| PARAMETERS
| DESCRIPTION
| RETURN VALUE
| ERRORS
| ATTRIBUTES