Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 3 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 3
nvlist_add_boolean_array(3NVPAIR)
nvlist_add_boolean_value(3NVPAIR)
nvlist_add_byte_array(3NVPAIR)
nvlist_add_int16_array(3NVPAIR)
nvlist_add_int32_array(3NVPAIR)
nvlist_add_int64_array(3NVPAIR)
nvlist_add_int8_array(3NVPAIR)
nvlist_add_nvlist_array(3NVPAIR)
nvlist_add_string_array(3NVPAIR)
nvlist_add_uint16_array(3NVPAIR)
nvlist_add_uint32_array(3NVPAIR)
nvlist_add_uint64_array(3NVPAIR)
nvlist_add_uint8_array(3NVPAIR)
nvlist_lookup_boolean(3NVPAIR)
nvlist_lookup_boolean_array(3NVPAIR)
nvlist_lookup_boolean_value(3NVPAIR)
nvlist_lookup_byte_array(3NVPAIR)
nvlist_lookup_int16_array(3NVPAIR)
nvlist_lookup_int32_array(3NVPAIR)
nvlist_lookup_int64_array(3NVPAIR)
nvlist_lookup_int8_array(3NVPAIR)
nvlist_lookup_nv_alloc(3NVPAIR)
nvlist_lookup_nvlist_array(3NVPAIR)
nvlist_lookup_uint16_array(3NVPAIR)
nvlist_lookup_uint32_array(3NVPAIR)
nvlist_lookup_uint64_array(3NVPAIR)
nvlist_lookup_uint8_array(3NVPAIR)
nvpair_value_boolean_array(3NVPAIR)
nvpair_value_boolean_value(3NVPAIR)
nvpair_value_byte_array(3NVPAIR)
nvpair_value_int16_array(3NVPAIR)
nvpair_value_int32_array(3NVPAIR)
nvpair_value_int64_array(3NVPAIR)
nvpair_value_int8_array(3NVPAIR)
nvpair_value_nvlist_array(3NVPAIR)
nvpair_value_string_array(3NVPAIR)
nvpair_value_uint16_array(3NVPAIR)
nvpair_value_uint32_array(3NVPAIR)
nvpair_value_uint64_array(3NVPAIR)
nvpair_value_uint8_array(3NVPAIR)
papiAttributeListAddBoolean(3PAPI)
papiAttributeListAddCollection(3PAPI)
papiAttributeListAddDatetime(3PAPI)
papiAttributeListAddInteger(3PAPI)
papiAttributeListAddMetadata(3PAPI)
papiAttributeListAddRange(3PAPI)
papiAttributeListAddResolution(3PAPI)
papiAttributeListAddString(3PAPI)
papiAttributeListAddValue(3PAPI)
papiAttributeListDelete(3PAPI)
papiAttributeListFromString(3PAPI)
papiAttributeListGetBoolean(3PAPI)
papiAttributeListGetCollection(3PAPI)
papiAttributeListGetDatetime(3PAPI)
papiAttributeListGetInteger(3PAPI)
papiAttributeListGetMetadata(3PAPI)
papiAttributeListGetNext(3PAPI)
papiAttributeListGetRange(3PAPI)
papiAttributeListGetResolution(3PAPI)
papiAttributeListGetString(3PAPI)
papiAttributeListGetValue(3PAPI)
papiAttributeListToString(3PAPI)
papiJobGetAttributeList(3PAPI)
papiJobSubmitByReference(3PAPI)
papiLibrarySupportedCall(3PAPI)
papiLibrarySupportedCalls(3PAPI)
papiPrinterGetAttributeList(3PAPI)
papiServiceGetAttributeList(3PAPI)
papiServiceGetEncryption(3PAPI)
papiServiceGetServiceName(3PAPI)
papiServiceGetStatusMessage(3PAPI)
papiServiceSetEncryption(3PAPI)
picld_plugin_register(3PICLTREE)
picl_get_frutree_parent(3PICL)
picl_get_propinfo_by_name(3PICL)
picl_get_propval_by_name(3PICL)
picl_set_propval_by_name(3PICL)
picl_walk_tree_by_class(3PICL)
pool_get_owning_resource(3POOL)
pool_get_resource_binding(3POOL)
pool_query_pool_resources(3POOL)
pool_query_resource_components(3POOL)
pool_resource_type_list(3POOL)
pool_resource_xtransfer(3POOL)
ptree_add_row_to_table(3PICLTREE)
ptree_create_and_add_node(3PICLTREE)
ptree_create_and_add_prop(3PICLTREE)
ptree_get_first_prop(3PICLTREE)
ptree_get_frutree_parent(3PICLTREE)
ptree_get_next_by_col(3PICLTREE)
ptree_get_next_by_row(3PICLTREE)
ptree_get_next_prop(3PICLTREE)
ptree_get_node_by_path(3PICLTREE)
ptree_get_prop_by_name(3PICLTREE)
ptree_get_propinfo_by_name(3PICLTREE)
ptree_get_propval_by_name(3PICLTREE)
ptree_init_propinfo(3PICLTREE)
ptree_register_handler(3PICLTREE)
ptree_unregister_handler(3PICLTREE)
ptree_update_propval(3PICLTREE)
ptree_update_propval_by_name(3PICLTREE)
- match name and type indicated by the interface name and retrieve data value
cc [ flag... ] file... -lnvpair [ library... ] #include <libnvpair.h> int nvlist_lookup_boolean(nvlist_t *nvl, const char *name);
int nvlist_lookup_boolean_value(nvlist_t *nvl, const char *name, boolean_t *val);
int nvlist_lookup_byte(nvlist_t *nvl, const char *name, uchar_t *val);
int nvlist_lookup_int8(nvlist_t *nvl, const char *name, int8_t *val);
int nvlist_lookup_uint8(nvlist_t *nvl, const char *name, uint8_t *val);
int nvlist_lookup_int16(nvlist_t *nvl, const char *name, int16_t *val);
int nvlist_lookup_uint16(nvlist_t *nvl, const char *name, uint16_t *val);
int nvlist_lookup_int32(nvlist_t *nvl, const char *name, int32_t *val);
int nvlist_lookup_uint32(nvlist_t *nvl, const char *name, uint32_t *val);
int nvlist_lookup_int64(nvlist_t *nvl, const char *name, int64_t *val);
int nvlist_lookup_uint64(nvlist_t *nvl, const char *name, uint64_t *val);
int nvlist_lookup_double(nvlist_t *nvl, const char *name, double *val);
int nvlist_lookup_string(nvlist_t *nvl, const char *name, char **val);
int nvlist_lookup_nvlist(nvlist_t *nvl, const char *name, nvlist_t **val);
int nvlist_lookup_boolean_array(nvlist_t *nvl, const char *name, boolean_t **val, uint_t *nelem);
int nvlist_lookup_byte_array(nvlist_t *nvl, const char *name, uchar_t **val, uint_t *nelem);
int nvlist_lookup_int8_array(nvlist_t *nvl, const char *name, int8_t **val, uint_t *nelem);
int nvlist_lookup_uint8_array(nvlist_t *nvl, const char *name, uint8_t **val, uint_t *nelem);
int nvlist_lookup_int16_array(nvlist_t *nvl, const char *name, int16_t **val, uint_t *nelem);
int nvlist_lookup_uint16_array(nvlist_t *nvl, const char *name, uint16_t **val, uint_t *nelem);
int nvlist_lookup_int32_array(nvlist_t *nvl, const char *name, int32_t **val, uint_t *nelem);
int nvlist_lookup_uint32_array(nvlist_t *nvl, const char *name, uint32_t **val, uint_t *nelem);
int nvlist_lookup_int64_array(nvlist_t *nvl, const char *name, int64_t **val, uint_t *nelem);
int nvlist_lookup_uint64_array(nvlist_t *nvl, const char *name, uint64_t **val, uint_t *nelem);
int nvlist_lookup_string_array(nvlist_t *nvl, const char *name, char ***val, uint_t *nelem);
int nvlist_lookup_nvlist_array(nvlist_t *nvl, const char *name, nvlist_t ***val, uint_t *nelem);
int nvlist_lookup_pairs(nvlist_t *nvl, int flag...);
The nvlist_t to be processed.
Name of the name-value pair to search.
Address to store the number of elements in value.
Address to store the starting address of the value.
Specify bit fields defining lookup behavior:
The retrival function will not fail if no matching name-value pair is found.
These functions find the nvpair (name-value pair) 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 functions work for nvlists (lists of name-value pairs) allocated with NV_UNIQUE_NAME or NV_UNIQUE_NAME_TYPE specified in nvlist_alloc(3NVPAIR). If this is not the case, the function returns ENOTSUP because the list potentially contains multiple nvpairs with the same name and type.
Multiple threads can simultaneously read the same nvlist_t but only one thread can actively change a given nvlist_t at a time. The caller is responsible for the synchronization.
All memory required for storing the array elements, including string value, are managed by the library. References to such data remain valid until nvlist_free() is called on nvl or until the element is removed with nvlist_remove(3NVPAIR) or nvlist_remove_all(3NVPAIR).
The nvlist_lookup_pairs() function retrieves a set of nvpairs. The arguments are a null-terminated list of pairs (data type DATA_TYPE_BOOLEAN), triples (non-array data types) or quads (array data types). The interpretation of the arguments depends on the value of type (see nvpair_type(3NVPAIR)) as follows:
Name of the name-value pair to search.
Data type (see nvpair_type(3NVPAIR)).
Address to store the starting address of the value. When using data type DATA_TYPE_BOOLEAN, the val argument is omitted.
Address to store the number of elements in value. Non-array data types have only one argument and nelem is omitted.
The order of the arguments is name, type, [val], [nelem].
When using NV_FLAG_NOENTOK and no matching name-value pair is found, the memory pointed to by val and nelem is left untouched.
These functions return 0 on success and an error value on failure.
These functions will fail if:
There is an invalid argument.
No matching name-value pair is found
An encode/decode method is not supported.
See attributes(5) for descriptions of the following attributes:
|
libnvpair(3LIB), nvlist_alloc(3NVPAIR), nvlist_remove(3NVPAIR), nvpair_type(3NVPAIR), attributes(5)