icl.h (265502) | icl.h (265509) |
---|---|
1/*- 2 * Copyright (c) 2012 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Edward Tomasz Napierala under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2012 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Edward Tomasz Napierala under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: stable/10/sys/dev/iscsi/icl.h 265502 2014-05-07 07:17:11Z trasz $ | 29 * $FreeBSD: stable/10/sys/dev/iscsi/icl.h 265509 2014-05-07 07:32:45Z trasz $ |
30 */ 31 32#ifndef ICL_H 33#define ICL_H 34 35/* 36 * iSCSI Common Layer. It's used by both the initiator and target to send 37 * and receive iSCSI PDUs. --- 75 unchanged lines hidden (view full) --- 113 114#ifdef ICL_KERNEL_PROXY 115 116struct sockaddr; 117struct icl_listen; 118 119struct icl_listen_sock { 120 TAILQ_ENTRY(icl_listen_sock) ils_next; | 30 */ 31 32#ifndef ICL_H 33#define ICL_H 34 35/* 36 * iSCSI Common Layer. It's used by both the initiator and target to send 37 * and receive iSCSI PDUs. --- 75 unchanged lines hidden (view full) --- 113 114#ifdef ICL_KERNEL_PROXY 115 116struct sockaddr; 117struct icl_listen; 118 119struct icl_listen_sock { 120 TAILQ_ENTRY(icl_listen_sock) ils_next; |
121 struct icl_listen *ils_listen; 122 struct socket *ils_socket; 123 bool ils_running; 124 bool ils_disconnecting; | 121 struct icl_listen *ils_listen; 122 struct socket *ils_socket; 123 bool ils_running; 124 bool ils_disconnecting; 125 int ils_id; |
125}; 126 127struct icl_listen { 128 TAILQ_HEAD(, icl_listen_sock) il_sockets; 129 struct sx il_lock; | 126}; 127 128struct icl_listen { 129 TAILQ_HEAD(, icl_listen_sock) il_sockets; 130 struct sx il_lock; |
130 void (*il_accept)(struct socket *); | 131 void (*il_accept)(struct socket *, int); |
131}; 132 133/* 134 * Initiator part. 135 */ 136int icl_conn_connect(struct icl_conn *ic, bool rdma, 137 int domain, int socktype, int protocol, 138 struct sockaddr *from_sa, struct sockaddr *to_sa); 139/* 140 * Target part. 141 */ | 132}; 133 134/* 135 * Initiator part. 136 */ 137int icl_conn_connect(struct icl_conn *ic, bool rdma, 138 int domain, int socktype, int protocol, 139 struct sockaddr *from_sa, struct sockaddr *to_sa); 140/* 141 * Target part. 142 */ |
142struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *)); | 143struct icl_listen *icl_listen_new(void (*accept_cb)(struct socket *, int)); |
143void icl_listen_free(struct icl_listen *il); | 144void icl_listen_free(struct icl_listen *il); |
144int icl_listen_add(struct icl_listen *il, bool rdma, int domain, 145 int socktype, int protocol, struct sockaddr *sa); | 145int icl_listen_add(struct icl_listen *il, bool rdma, 146 int domain, int socktype, int protocol, 147 struct sockaddr *sa, int portal_id); |
146int icl_listen_remove(struct icl_listen *il, struct sockaddr *sa); 147 148/* 149 * This one is not a public API; only to be used by icl_proxy.c. 150 */ 151int icl_conn_handoff_sock(struct icl_conn *ic, struct socket *so); 152 153#endif /* ICL_KERNEL_PROXY */ 154 155#endif /* !ICL_H */ | 148int icl_listen_remove(struct icl_listen *il, struct sockaddr *sa); 149 150/* 151 * This one is not a public API; only to be used by icl_proxy.c. 152 */ 153int icl_conn_handoff_sock(struct icl_conn *ic, struct socket *so); 154 155#endif /* ICL_KERNEL_PROXY */ 156 157#endif /* !ICL_H */ |