iSCSI Management Library Functions itconfigload(3ISCSIT)
NAME
itconfigload, itconfigcommit, itconfigsetprop,
itconfigfree - set and retrieve configuration data for the
iSCSI Target Port Provider
SYNOPSIS
cc [ flag... ] file... -liscsit [ library... ]
#include
int itconfigload(itconfigt **cfg);
int itconfigcommit(itconfigt *cfg);
int itconfigsetprop(itconfigt *cfg, nvlistt *proplist,
nvlistt **errlist);
void itconfigfree(itconfigt *cfg);
PARAMETERS
cfg a pointer to the iSCSI configuration structure
proplist a pointer to an nvlistt containing the global
properties to be set
errlist an optional pointer to an nvlistt that will be
used to store specific errors (if any) when
validating global properties
DESCRIPTION
The itconfigload() function allocates and creates an
itconfigt structure representing the current iSCSI confi-
guration. This structure is compiled using the "provider"
data returned by stmfGetProviderData(3STMF). If there is no
provider data associated with iscsit, the itconfigt struc-
ture is set to a default configuration.
The itconfigcommit() function informs the iscsit service
that the configuration has changed and commits the new con-
figuration to the persistent store by calling
stmfSetProviderData(3STMF). This function can be called mul-
tiple times during a configuration sequence, if necessary.
SunOS 5.11 Last change: 1 Oct 2008 1
iSCSI Management Library Functions itconfigload(3ISCSIT)
The itconfigsetprop() function validates the provided pro-
perty list and sets the global properties for iSCSI Target.
If errlist is not NUL, this function returns detailed
errors for each property that failed. The format for error-
list is key = property, value = error string.
The itconfigfree() function frees resources associated
with the itconfigt structure.
Global nvlist properties are as follows:
nvlist Key Type Valid Values
alias string any string
auth string radius, chap, or none
isns boolean BTRUE, BFALSE
isnsserver string array 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 '['
defined iSNS servers will be removed
from the configuration.
radiusserver string IPaddress:port specification as
described for 'isnsserver'
radiussecret string string of at least 12 characters but
not more than 255 characters.
secret will be base64 encoded when
stored.
RETURN VALUES
The itconfigload(), itconfigcommit(), and
itconfigsetprop() functions return 0 on success and an
error value on failure.
ERORS
The itconfigload(), itconfigcommit(), and
itconfigsetprop() functions will fail if:
EINVAL A parameter or property is invalid.
ENOMEM Resources could not be allocated.
SunOS 5.11 Last change: 1 Oct 2008 2
iSCSI Management Library Functions itconfigload(3ISCSIT)
The itconfigcommit() function will also fail if:
STMFERORSERVICEDATAVERSION
The configuration was updated by another client. See
stmfSetProviderData(3STMF).
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
itinicreate(3ISCSIT), itportalcreate(3ISCSIT),
ittgtcreate(3ISCSIT), ittpgcreate(3ISCSIT),
libiscsit(3LIB), libnvpair(3LIB), libstmf(3LIB),
stmfGetProviderData(3STMF), stmfSetProviderData(3STMF),
attributes(5)
SunOS 5.11 Last change: 1 Oct 2008 3
|