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_TPG_CREATE 3ISCSIT "Oct 1, 2008"
8 it_tpg_create, it_tpg_delete, it_tpg_free \- create and delete iSCSI
13 cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-liscsit\fR [ \fIlibrary\fR\&.\|.\|. ]
14 #include <libiscsit.h>
16 \fBint\fR \fBit_tpg_create\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tpg_t **\fR\fItpg\fR,
17 \fBchar *\fR\fItpg_name\fR, \fBchar *\fR\fIportal_ip_port\fR);
22 \fBint\fR \fBit_tpg_delete\fR(\fBit_config_t *\fR\fIcfg\fR, \fBit_tpg_t *\fR\fItpg\fR,
23 \fBboolean_t\fR \fIforce\fR););
28 \fBvoid\fR \fBit_tpg_free\fR(\fBit_tpg_t *\fR\fItpg\fR);
38 a pointer t the iSCSI configuration structure
47 a pointer to the \fBit_tpg_t\fR structure representing the target portal group
56 an identifier for the target portal group
62 \fB\fIportal_ip_port\fR\fR
65 a string containing an appropriately formatted IP \fBaddress\fR:\fBport\fR.
66 Both IPv4 and IPv6 addresses are permitted. This value becomes the first portal
67 in the target portal group. Applications can add additional values using
68 \fBit_portal_create\fR(3ISCSIT) before committing the target portal group. IPv6
69 addresses should be enclosed in square brackets ('[', ']').
78 boolean value indicating if the target portal group should be removed even if
79 it is associated with one or more targets. If not \fBB_TRUE\fR, the operation
80 will fail if the target product group is associated with a target.
86 The \fBit_tpg_create()\fR function allocates and creates an \fBit_tpg_t\fR
87 structure representing a new iSCSI target portal group. The new \fBit_tpg_t\fR
88 structure is added to the global \fItpg\fR list (\fIcfg_tgt_list\fR) in the
89 \fBit_config_t\fR structure.
92 The \fBit_tpg_delete()\fR function deletes the target portal group represented
93 by \fItpg\fR, where \fItpg\fR is an existing \fBit_tpg_t\fR structure within
94 the global configuration \fIcfg\fR.
97 The \fBit_tpg_free()\fR function deallocates resources associated with an
98 \fBit_tpg_t\fR structure. If \fItpg\fR->\fInext\fR is not \fINULL\fR, this
99 function frees all members of the list.
102 Configuration changes as a result of these functions are not instantiated until
103 the modified configuration is committed by calling
104 \fBit_config_commit\fR(3ISCSIT).
108 The \fBit_tpg_create()\fR and \fBit_tpg_delete()\fR functions return 0 on
109 success and an error value on failure.
113 The \fBit_tpg_create()\fR and \fBit_tpg_delete()\fR functions will fail if:
120 The portal group is associated with one or more targets.
129 The portal was already configured for another portal group associated with this
139 A parameter is invalid.
148 Resources could not be allocated.
154 See \fBattributes\fR(5) for descriptions of the following attributes:
162 ATTRIBUTE TYPE ATTRIBUTE VALUE
164 Interface Stability Committed
172 \fBit_config_commit\fR(3ISCSIT), \fBit_ini_create\fR(3ISCSIT),
173 \fBit_portal_create\fR(3ISCSIT), \fBit_tgt_create\fR(3ISCSIT),
174 \fBlibiscsit\fR(3LIB), \fBlibnvpair\fR(3LIB), \fBlibstmf\fR(3LIB),