1it_ini_create(3ISCSIT)iSCSI Management Library Functionsit_ini_create(3ISCSIT)
2
3
4

NAME

6       it_ini_create,  it_ini_setprop,  it_ini_delete,  it_ini_free  - create,
7       modify and delete iSCSI Initiator Contexts
8

SYNOPSIS

10       cc [ flag... ] file... -liscsit [ library... ]
11       #include <libiscsit.h>
12
13       int it_ini_create(it_config_t *cfg, it_ini_t **ini,
14            char *ini_node_name);
15
16
17       int it_ini_setprop(it_ini_t *ini, nvlist_t *proplist,
18            nvlist_t **errlist););
19
20
21       void it_ini_delete(it_config_t *cfg, it_ini_t *ini);
22
23
24       void it_ini_free(it_ini_t *ini);
25
26

PARAMETERS

28       cfg              a pointer t the iSCSI configuration structure
29
30
31       ini              a pointer to the it_ini_t structure  representing  the
32                        initiator context
33
34
35       ini_node_name    the iSCSI node name of the remote initiator
36
37
38       proplist         a  pointer  to  an  nvlist_t  containing the initiator
39                        properties to be set
40
41
42       errlist          an optional pointer to an nvlist_t that will  be  used
43                        to store specific errors (if any) when validating ini‐
44                        tiator properties
45
46

DESCRIPTION

48       The it_ini_create() function adds an initiator context  to  the  global
49       configuration.
50
51
52       The  it_ini_setprop() function validates the provided property list and
53       sets the properties for the specified initiator.   If  errlist  is  not
54       NULL,  this  function  returns  detailed  errors for each property that
55       failed.  The format for errlist  is  key  =  property,  value  =  error
56       string.
57
58
59       The  it_ini_delete()  function  removes the specified initiator context
60       from the global configuration.
61
62
63       The it_ini_free() function deallocates resources of an it_ini_t  struc‐
64       ture.  If  ininext is not NULL, this function frees all members of the
65       list.
66
67
68       Configuration changes as a result of these functions are not  instanti‐
69       ated  until  the modified configuration is committed by calling it_con‐
70       fig_commit(3ISCSIT).
71
72
73       Initiator nvlist properties are as follows:
74
75
76
77
78       nvlist Key     Type                  Valid Values
79       ───────────────────────────────────────────────────────────────
80       chapuser     string      any string, or none to remove
81       chapsecret   string      string of at least 12 characters but
82                                not   more   than   255  characters.
83                                secret will be base64  encoded  when
84                                stored.
85
86

RETURN VALUES

88       The  it_ini_create(),  it_ini_setprop(),  and it_ini_delete() functions
89       return 0 on success and an error value on failure.
90

ERRORS

92       The it_ini_create(), it_ini_setprop(),  and  it_ini_delete()  functions
93       will fail if:
94
95       EEXIST    The requested initiator context is already configured.
96
97
98       EINVAL    A parameter or property is invalid.
99
100
101       ENOMEM    Resources could not be allocated.
102
103

ATTRIBUTES

105       See attributes(5) for descriptions of the following attributes:
106
107
108
109
110       ┌─────────────────────────────┬─────────────────────────────┐
111       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
112       ├─────────────────────────────┼─────────────────────────────┤
113       │Interface Stability          │Committed                    │
114       ├─────────────────────────────┼─────────────────────────────┤
115       │MT-Level                     │MT-Safe                      │
116       └─────────────────────────────┴─────────────────────────────┘
117

SEE ALSO

119       it_config_commit(3ISCSIT),    it_portal_create(3ISCSIT),    it_tgt_cre‐
120       ate(3ISCSIT), it_tpg_create(3ISCSIT), libiscsit(3LIB), libnvpair(3LIB),
121       libstmf(3LIB),  stmfGetProviderData(3STMF), stmfSetProviderData(3STMF),
122       attributes(5)
123
124
125
126SunOS 5.11                        1 Oct 2008            it_ini_create(3ISCSIT)
Impressum