4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
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 2000 by Cisco Systems, Inc. All rights reserved.
23 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 #ifndef _ISCSI_H
27 #define _ISCSI_H
28
29 /*
30 * Block comment which describes the contents of this file.
31 */
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <sys/scsi/scsi.h>
38 #include <sys/ddi.h>
39 #include <sys/sunddi.h>
40 #include <sys/socket.h>
41 #include <sys/kstat.h>
42 #include <sys/sunddi.h>
43 #include <sys/sunmdi.h>
44 #include <sys/mdi_impldefs.h>
45 #include <sys/time.h>
46 #include <sys/nvpair.h>
47 #include <sys/sdt.h>
48
49 #include <sys/iscsi_protocol.h>
50 #include <sys/scsi/adapters/iscsi_if.h>
51 #include <iscsiAuthClient.h>
52 #include <iscsi_stats.h>
53 #include <iscsi_thread.h>
54 #include <sys/idm/idm.h>
55 #include <sys/idm/idm_conn_sm.h>
56 #include <nvfile.h>
57
58 #ifndef MIN
59 #define MIN(a, b) ((a) < (b) ? (a) : (b))
60 #endif
61
62 #ifndef TRUE
63 #define TRUE 1
64 #endif
65
66 #ifndef FALSE
67 #define FALSE 0
68 #endif
69
70 #define LOGIN_PDU_BUFFER_SIZE (16 * 1024) /* move somewhere else */
71
72 extern boolean_t iscsi_conn_logging;
73 extern boolean_t iscsi_io_logging;
74 extern boolean_t iscsi_login_logging;
75 extern boolean_t iscsi_logging;
76 extern boolean_t iscsi_sess_logging;
1386 boolean_t iscsid_del(iscsi_hba_t *ihp, char *target_name,
1387 iSCSIDiscoveryMethod_t method, struct sockaddr *addr_dsc);
1388 boolean_t iscsid_login_tgt(iscsi_hba_t *ihp, char *target_name,
1389 iSCSIDiscoveryMethod_t method, struct sockaddr *addr_dsc);
1390 void iscsid_addr_to_sockaddr(int src_insize, void *src_addr, int src_port,
1391 struct sockaddr *dst_addr);
1392 void iscsid_set_default_initiator_node_settings(iscsi_hba_t *ihp,
1393 boolean_t minimal);
1394
1395 void iscsi_send_sysevent(iscsi_hba_t *ihp, char *eventcalss,
1396 char *subclass, nvlist_t *np);
1397 boolean_t iscsi_reconfig_boot_sess(iscsi_hba_t *ihp);
1398 boolean_t iscsi_chk_bootlun_mpxio(iscsi_hba_t *ihp);
1399 boolean_t iscsi_cmp_boot_ini_name(char *name);
1400 boolean_t iscsi_cmp_boot_tgt_name(char *name);
1401 boolean_t iscsi_client_request_service(iscsi_hba_t *ihp);
1402 void iscsi_client_release_service(iscsi_hba_t *ihp);
1403
1404 extern void bcopy(const void *s1, void *s2, size_t n);
1405 extern void bzero(void *s, size_t n);
1406 /*
1407 * Here we need a contract for inet_ntop() and inet_pton()
1408 * in uts/common/inet/ip/inet_ntop.c
1409 */
1410 extern char *inet_ntop(int af, const void *addr, char *buf, int addrlen);
1411 extern int inet_pton(int af, char *inp, void *outp);
1412
1413 #ifdef __cplusplus
1414 }
1415 #endif
1416
1417 #endif /* _ISCSI_H */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
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 2000 by Cisco Systems, Inc. All rights reserved.
23 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
25 */
26
27 #ifndef _ISCSI_H
28 #define _ISCSI_H
29
30 /*
31 * Block comment which describes the contents of this file.
32 */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #include <sys/scsi/scsi.h>
39 #include <sys/ddi.h>
40 #include <sys/sunddi.h>
41 #include <sys/socket.h>
42 #include <sys/kstat.h>
43 #include <sys/sunddi.h>
44 #include <sys/sunmdi.h>
45 #include <sys/mdi_impldefs.h>
46 #include <sys/time.h>
47 #include <sys/nvpair.h>
48 #include <sys/sdt.h>
49
50 #include <sys/iscsi_protocol.h>
51 #include <sys/scsi/adapters/iscsi_if.h>
52 #include <iscsiAuthClient.h>
53 #include <iscsi_stats.h>
54 #include <iscsi_thread.h>
55 #include <sys/idm/idm.h>
56 #include <sys/idm/idm_conn_sm.h>
57 #include <nvfile.h>
58 #include <inet/ip.h>
59
60 #ifndef MIN
61 #define MIN(a, b) ((a) < (b) ? (a) : (b))
62 #endif
63
64 #ifndef TRUE
65 #define TRUE 1
66 #endif
67
68 #ifndef FALSE
69 #define FALSE 0
70 #endif
71
72 #define LOGIN_PDU_BUFFER_SIZE (16 * 1024) /* move somewhere else */
73
74 extern boolean_t iscsi_conn_logging;
75 extern boolean_t iscsi_io_logging;
76 extern boolean_t iscsi_login_logging;
77 extern boolean_t iscsi_logging;
78 extern boolean_t iscsi_sess_logging;
1388 boolean_t iscsid_del(iscsi_hba_t *ihp, char *target_name,
1389 iSCSIDiscoveryMethod_t method, struct sockaddr *addr_dsc);
1390 boolean_t iscsid_login_tgt(iscsi_hba_t *ihp, char *target_name,
1391 iSCSIDiscoveryMethod_t method, struct sockaddr *addr_dsc);
1392 void iscsid_addr_to_sockaddr(int src_insize, void *src_addr, int src_port,
1393 struct sockaddr *dst_addr);
1394 void iscsid_set_default_initiator_node_settings(iscsi_hba_t *ihp,
1395 boolean_t minimal);
1396
1397 void iscsi_send_sysevent(iscsi_hba_t *ihp, char *eventcalss,
1398 char *subclass, nvlist_t *np);
1399 boolean_t iscsi_reconfig_boot_sess(iscsi_hba_t *ihp);
1400 boolean_t iscsi_chk_bootlun_mpxio(iscsi_hba_t *ihp);
1401 boolean_t iscsi_cmp_boot_ini_name(char *name);
1402 boolean_t iscsi_cmp_boot_tgt_name(char *name);
1403 boolean_t iscsi_client_request_service(iscsi_hba_t *ihp);
1404 void iscsi_client_release_service(iscsi_hba_t *ihp);
1405
1406 extern void bcopy(const void *s1, void *s2, size_t n);
1407 extern void bzero(void *s, size_t n);
1408
1409 #ifdef __cplusplus
1410 }
1411 #endif
1412
1413 #endif /* _ISCSI_H */
|