nvlist_lookup_int64(9F)
NAME
| SYNOPSIS
| INTERFACE LEVEL
| PARAMETERS
| DESCRIPTION
| RETURN VALUES
| CONTEXT
NAME
nvlist_lookup_boolean, nvlist_lookup_byte, nvlist_lookup_int16, nvlist_lookup_uint16, nvlist_lookup_int32, nvlist_lookup_uint32, nvlist_lookup_int64, nvlist_lookup_uint64, 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- match name and type indicated by the interface name and retrieve
data value
SYNOPSIS
#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, 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);
INTERFACE LEVEL
PARAMETERS
-
nvl
-
The list of name-value pairs (nvlist_t) to be processed.
-
name
-
Name of the name-value pair (nvpair) to search.
-
nelem
-
Address to store the number of elements in value.
-
val
-
Address to store the value or starting address of the array value.
DESCRIPTION
These functions find the nvpair that matches the name and type as indicated by the interface name. If one is found, nelem and val are modified to contain the number of elements in value and the starting address of data, respectively.
These interfaces work for nvlist_ts allocated with NV_UNIQUE_NAME or NV_UNIQUE_NAME_TYPE specified in nvlist_alloc(). (See nvlist_alloc(9F).) If this is not the case, the interface will return ENOTSUP because the list potentially contains multiple nvpairs with the same name and type.
All memory required for storing the array elements, including string values, are managed by the library. References to such data remain valid until nvlist_free() is called on nvl.
RETURN VALUES
-
0
-
success
-
EINVAL
-
invalid argument
-
ENOENT
-
no matching name-value pair found
-
ENOTSUP
-
encode/decode method not supported
CONTEXT
SunOS 5.9 Last Revised 26 September 2000
NAME
| SYNOPSIS
| INTERFACE LEVEL
| PARAMETERS
| DESCRIPTION
| RETURN VALUES
| CONTEXT