1nvpair_value_byte(9F)    Kernel Functions for Drivers    nvpair_value_byte(9F)
2
3
4

NAME

6       nvpair_value_byte,        nvpair_value_nvlist,       nvpair_value_int8,
7       nvpair_value_int16,       nvpair_value_int32,       nvpair_value_int64,
8       nvpair_value_uint8,      nvpair_value_uint16,      nvpair_value_uint32,
9       nvpair_value_uint64,  nvpair_value_string,  nvpair_value_boolean_array,
10       nvpair_value_byte_array,                     nvpair_value_nvlist_array,
11       nvpair_value_int8_array,                      nvpair_value_int16_array,
12       nvpair_value_int32_array,                     nvpair_value_int64_array,
13       nvpair_value_uint8_array,                    nvpair_value_uint16_array,
14       nvpair_value_uint32_array,                   nvpair_value_uint64_array,
15       nvpair_value_string_array - retrieve value from a name-value pair
16

SYNOPSIS

18       #include <sys/nvpair.h>
19
20       int nvpair_value_boolean_value(nvpair_t *nvpair, boolean_t *val);
21
22
23       int nvpair_value_byte(nvpair_t *nvpair, uchar_t *val);
24
25
26       int nvpair_value_int8(nvpair_t *nvpair, int8_t *val);
27
28
29       int nvpair_value_uint8(nvpair_t *nvpair, uint8_t *val);
30
31
32       int nvpair_value_int16(nvpair_t *nvpair, int16_t *val);
33
34
35       int nvpair_value_uint16(nvpair_t *nvpair, uint16_t *val);
36
37
38       int nvpair_value_int32(nvpair_t *nvpair, int32_t *val);
39
40
41       int nvpair_value_uint32(nvpair_t *nvpair, uint32_t *val);
42
43
44       int nvpair_value_int64(nvpair_t *nvpair, int64_t *val);
45
46
47       int nvpair_value_uint64(nvpair_t *nvpair, uint64_t *val);
48
49
50       int nvpair_value_string(nvpair_t *nvpair, char **val);
51
52
53       int nvpair_value_nvlist(nvpair_t *nvpair, nvlist_t **val);
54
55
56       int nvpair_value_boolean_array(nvpair_t *nvpair, boolean_t **val,
57            uint_t *nelem);
58
59
60       int nvpair_value_byte_array(nvpair_t *nvpair, uchar_t **val,
61            uint_t *nelem);
62
63
64       int nvpair_value_int8_array(nvpair_t *nvpair, int8_t **val,
65            uint_t *nelem);
66
67
68       int nvpair_value_uint8_array(nvpair_t *nvpair, uint8_t **val,
69            uint_t *nelem);
70
71
72       int nvpair_value_int16_array(nvpair_t *nvpair, int16_t **val,
73            uint_t *nelem);
74
75
76       int nvpair_value_uint16_array(nvpair_t *nvpair, uint16_t **val,
77            uint_t *nelem);
78
79
80       int nvpair_value_int32_array(nvpair_t *nvpair, int32_t **val,
81            uint_t *nelem);
82
83
84       int nvpair_value_uint32_array(nvpair_t *nvpair, uint32_t **val,
85            uint_t *nelem);
86
87
88       int nvpair_value_int64_array(nvpair_t *nvpair, int64_t **val,
89            uint_t *nelem);
90
91
92       int nvpair_value_uint64_array(nvpair_t *nvpair, uint64_t **val,
93            uint_t *nelem);
94
95
96       int nvpair_value_string_array(nvpair_t *nvpair, char ***val,
97            uint_t *nelem);
98
99
100       int nvpair_value_nvlist_array(nvpair_t *nvpair, nvlist_t ***val,
101            uint_t *nelem);
102
103

INTERFACE LEVEL

105       Solaris DDI specific (Solaris DDI)
106

PARAMETERS

108       nvpair    Name-value pair (nvpair) to be processed.
109
110
111       nelem     Address to store the number of elements in value.
112
113
114       val       Address to store the  value  or  starting  address  of  array
115                 value.
116
117

DESCRIPTION

119       These  functions  retrieve the value of nvpair. The data type of nvpair
120       must match the function name for the call to be successful.
121
122
123       There is no nvpair_value_boolean(); the existence of the  name  implies
124       the value is true.
125
126
127       For  array data types, including string, the memory containing the data
128       is managed by the library and references to  the  value  remains  valid
129       until  nvlist_free()  is  called  on  the nvlist_t from which nvpair is
130       obtained. See nvlist_free(9F)
131
132
133       The value of an nvpair may not be retrieved  after  the  nvpair  having
134       been removed from or replaced in an nvlist. Replacement can happen dur‐
135       ing pair addition  on  nvlists  created  with  NV_UNIQUE_NAME_TYPE  and
136       NV_UNIQUE_NAME. See nvlist_alloc(9F) for more details.
137

RETURN VALUES

139       0         Success
140
141
142       EINVAL    Either  one  of  the arguments is NULL or type of nvpair does
143                 not match the interface name.
144
145

CONTEXT

147       These functions can be called from user, interrupt, or kernel context.
148
149
150
151SunOS 5.11                        16 Jan 2006            nvpair_value_byte(9F)
Impressum