1it_config_load(3ISCSIT)iSCSI Management Library Functionsit_config_load(3ISCSIT)
2
3
4

NAME

6       it_config_load,  it_config_commit,  it_config_setprop, it_config_free -
7       set and retrieve configuration data for the iSCSI Target Port Provider
8

SYNOPSIS

10       cc [ flag... ] file... -liscsit [ library... ]
11       #include <libiscsit.h>
12
13       int it_config_load(it_config_t **cfg);
14
15
16       int it_config_commit(it_config_t *cfg);
17
18
19       int it_config_setprop(it_config_t *cfg, nvlist_t *proplist,
20            nvlist_t **errlist);
21
22
23       void it_config_free(it_config_t *cfg);
24
25

PARAMETERS

27       cfg         a pointer to the iSCSI configuration structure
28
29
30       proplist    a pointer to an nvlist_t containing the  global  properties
31                   to be set
32
33
34       errlist     an  optional  pointer  to  an nvlist_t that will be used to
35                   store specific errors (if any) when validating global prop‐
36                   erties
37
38

DESCRIPTION

40       The  it_config_load()  function  allocates  and  creates an it_config_t
41       structure representing the current iSCSI configuration. This  structure
42       is  compiled  using  the  "provider"  data returned by stmfGetProvider‐
43       Data(3STMF). If there is no provider data associated with  iscsit,  the
44       it_config_t structure is set to a default configuration.
45
46
47       The  it_config_commit()  function  informs  the iscsit service that the
48       configuration has changed and commits the new configuration to the per‐
49       sistent  store by calling stmfSetProviderData(3STMF). This function can
50       be called multiple times during a configuration sequence, if necessary.
51
52
53       The it_config_setprop() function validates the provided  property  list
54       and  sets  the  global  properties  for iSCSI Target. If errlist is not
55       NULL, this function returns detailed  errors  for  each  property  that
56       failed.  The  format  for  errorlist  is  key = property, value = error
57       string.
58
59
60       The it_config_free()  function  frees  resources  associated  with  the
61       it_config_t structure.
62
63
64       Global nvlist properties are as follows:
65
66
67
68
69        nvlist Key        Type                   Valid Values
70       ───────────────────────────────────────────────────────────────────
71       alias          string         any string
72       auth           string         radius, chap, or none
73       isns           boolean        B_TRUE, B_FALSE
74       isnsserver     string array   Array  of  portal  specifications of
75                                     the form  IPaddress:port.   Port  is
76                                     optional;   if  not  specified,  the
77                                     default iSNS  port  number  of  3205
78                                     will be used.  IPv6 addresses should
79                                     be enclosed in square  brackets  '['
80                                     ']'.   If  "none"  is specified, all
81                                     defined iSNS servers will be removed
82                                     from the configuration.
83       radiusserver   string         IPaddress:port    specification   as
84                                     described for 'isnsserver'
85       radiussecret   string         string of at least 12 characters but
86                                     not   more   than   255  characters.
87                                     secret will be base64  encoded  when
88                                     stored.
89
90

RETURN VALUES

92       The it_config_load(), it_config_commit(), and it_config_setprop() func‐
93       tions return 0 on success and an error value on failure.
94

ERRORS

96       The it_config_load(), it_config_commit(), and it_config_setprop() func‐
97       tions will fail if:
98
99       EINVAL    A parameter or property is invalid.
100
101
102       ENOMEM    Resources could not be allocated.
103
104
105
106       The it_config_commit() function will also fail if:
107
108       STMF_ERROR_SERVICE_DATA_VERSION
109
110           The  configuration  was  updated  by  another  client. See stmfSet‐
111           ProviderData(3STMF).
112
113

ATTRIBUTES

115       See attributes(5) for descriptions of the following attributes:
116
117
118
119
120       ┌─────────────────────────────┬─────────────────────────────┐
121       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
122       ├─────────────────────────────┼─────────────────────────────┤
123       │Interface Stability          │Committed                    │
124       ├─────────────────────────────┼─────────────────────────────┤
125       │MT-Level                     │MT-Safe                      │
126       └─────────────────────────────┴─────────────────────────────┘
127

SEE ALSO

129       it_ini_create(3ISCSIT), it_portal_create(3ISCSIT),  it_tgt_create(3ISC‐
130       SIT),  it_tpg_create(3ISCSIT),  libiscsit(3LIB),  libnvpair(3LIB), lib‐
131       stmf(3LIB),   stmfGetProviderData(3STMF),   stmfSetProviderData(3STMF),
132       attributes(5)
133
134
135
136SunOS 5.11                        1 Oct 2008           it_config_load(3ISCSIT)
Impressum