6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 /*
26 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
27 */
28
29 #ifndef _LIBISCSIT_H
30 #define _LIBISCSIT_H
31
32 #ifndef _KERNEL
33 #include <libnvpair.h>
34 #include <sys/socket.h>
35 #endif
36
37 #include <sys/iscsit/iscsit_common.h>
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #define MAX_TARGETS 255 /* maximum targets that may be created */
44 #define MAX_TPGT 256
45 #define CFG_TPGTLIST "tpgt-list"
46
47 #define IS_IQN_NAME(s) (strncmp((s), "iqn.", 4) == 0)
48 #define IS_EUI_NAME(s) (strncmp((s), "eui.", 4) == 0)
49
50 /*
51 * We change the default IQN here to org.illumos.
52 * Other distros using it need to change accordingly.
53 */
54
55 #define DEFAULT_IQN "iqn.2010-08.org.illumos:"
56
57 /*
58 * Object Hierarchy
59 *
60 * _______________________
61 * | |
62 * | iSCSI Target Config |
63 * | it_config_t |
64 * |_______________________|
65 * | |
66 * | |
67 * | | ________ ________ ________
68 * | | | | | | | |
69 * | | | Target |-->| Target |-- - - -->| Target |
70 * | | |________| |________| |________|
71 * | | |
72 * | | |
73 * | | |
74 * | | | ______ ______
75 * | | | | | | |
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 /*
26 * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
27 */
28
29 #ifndef _LIBISCSIT_H
30 #define _LIBISCSIT_H
31
32 #ifndef _KERNEL
33 #include <libnvpair.h>
34 #include <sys/socket.h>
35 #endif
36
37 #include <sys/iscsit/iscsit_common.h>
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #define MAX_TARGETS 4095 /* maximum targets that may be created */
44 #define MAX_TPGT 256
45 #define CFG_TPGTLIST "tpgt-list"
46
47 #define IS_IQN_NAME(s) (strncmp((s), "iqn.", 4) == 0)
48 #define IS_EUI_NAME(s) (strncmp((s), "eui.", 4) == 0)
49
50 /*
51 * We change the default IQN here to org.illumos.
52 * Other distros using it need to change accordingly.
53 */
54
55 #define DEFAULT_IQN "iqn.2005-07.com.nexenta:"
56
57 /*
58 * Object Hierarchy
59 *
60 * _______________________
61 * | |
62 * | iSCSI Target Config |
63 * | it_config_t |
64 * |_______________________|
65 * | |
66 * | |
67 * | | ________ ________ ________
68 * | | | | | | | |
69 * | | | Target |-->| Target |-- - - -->| Target |
70 * | | |________| |________| |________|
71 * | | |
72 * | | |
73 * | | |
74 * | | | ______ ______
75 * | | | | | | |
|