2 .\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH IT_CONFIG_LOAD 3ISCSIT "Oct 1, 2008"
8 it_config_load, it_config_commit, it_config_setprop, it_config_free \- set and
9 retrieve configuration data for the iSCSI Target Port Provider
13 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ]
14 #include <libiscsit.h>
16 \fBint\fR \fBit_config_load\fR(\fBit_config_t **\fR\fIcfg\fR);
21 \fBint\fR \fBit_config_commit\fR(\fBit_config_t *\fR\fIcfg\fR);
26 \fBint\fR \fBit_config_setprop\fR(\fBit_config_t *\fR\fIcfg\fR, \fBnvlist_t *\fR\fIproplist\fR,
27 \fBnvlist_t **\fR\fIerrlist\fR);
32 \fBvoid\fR \fBit_config_free\fR(\fBit_config_t *\fR\fIcfg\fR);
42 a pointer to the iSCSI configuration structure
51 a pointer to an \fBnvlist_t\fR containing the global properties to be set
60 an optional pointer to an \fBnvlist_t\fR that will be used to store specific
61 errors (if any) when validating global properties
67 The \fBit_config_load()\fR function allocates and creates an \fBit_config_t\fR
68 structure representing the current iSCSI configuration. This structure is
69 compiled using the "provider" data returned by
70 \fBstmfGetProviderData\fR(3STMF). If there is no provider data associated with
71 iscsit, the \fBit_config_t\fR structure is set to a default configuration.
74 The \fBit_config_commit()\fR function informs the iscsit service that the
75 configuration has changed and commits the new configuration to the persistent
76 store by calling \fBstmfSetProviderData\fR(3STMF). This function can be called
77 multiple times during a configuration sequence, if necessary.
80 The \fBit_config_setprop()\fR function validates the provided property list and
81 sets the global properties for iSCSI Target. If \fIerrlist\fR is not
82 \fINULL\fR, this function returns detailed errors for each property that
83 failed. The format for \fIerrorlist\fR is \fIkey\fR = \fIproperty\fR,
84 \fIvalue\fR = \fIerror\fR string.
87 The \fBit_config_free()\fR function frees resources associated with the
88 \fBit_config_t\fR structure.
91 Global nvlist properties are as follows:
98 \fBnvlist\fR Key Type Valid Values
100 \fBalias\fR \fBstring\fR any string
101 \fBauth\fR \fBstring\fR \fBradius\fR, \fBchap\fR, or \fBnone\fR
102 \fBisns\fR \fBboolean\fR \fBB_TRUE\fR, \fBB_FALSE\fR
103 \fBisnsserver\fR \fBstring\fR array T{
104 Array of portal specifications of the form IPaddress:port. Port is optional; if not specified, the default iSNS port number of 3205 will be used. IPv6 addresses should be enclosed in square brackets '[' ']'. If "none" is specified, all defined iSNS servers will be removed from the configuration.
106 \fBradiusserver\fR \fBstring\fR T{
107 IPaddress:port specification as described for 'isnsserver'
109 \fBradiussecret\fR \fBstring\fR T{
110 string of at least 12 characters but not more than 255 characters. secret will be base64 encoded when stored.
117 The \fBit_config_load()\fR, \fBit_config_commit()\fR, and
118 \fBit_config_setprop()\fR functions return 0 on success and an error value on
123 The \fBit_config_load()\fR, \fBit_config_commit()\fR, and
124 \fBit_config_setprop()\fR functions will fail if:
131 A parameter or property is invalid.
140 Resources could not be allocated.
145 The \fBit_config_commit()\fR function will also fail if:
149 \fB\fBSTMF_ERROR_SERVICE_DATA_VERSION\fR\fR
153 The configuration was updated by another client. See
154 \fBstmfSetProviderData\fR(3STMF).
160 See \fBattributes\fR(5) for descriptions of the following attributes:
168 ATTRIBUTE TYPE ATTRIBUTE VALUE
170 Interface Stability Committed
178 \fBit_ini_create\fR(3ISCSIT), \fBit_portal_create\fR(3ISCSIT),
179 \fBit_tgt_create\fR(3ISCSIT), \fBit_tpg_create\fR(3ISCSIT),
180 \fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), \fBlibstmf\fR(3LIB),
181 \fBstmfGetProviderData\fR(3STMF), \fBstmfSetProviderData\fR(3STMF),