0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ISCSI_SW_TCP_H
0014 #define ISCSI_SW_TCP_H
0015
0016 #include <scsi/libiscsi.h>
0017 #include <scsi/libiscsi_tcp.h>
0018
0019 struct socket;
0020 struct iscsi_tcp_conn;
0021
0022
0023 struct iscsi_sw_tcp_send {
0024 struct iscsi_hdr *hdr;
0025 struct iscsi_segment segment;
0026 struct iscsi_segment data_segment;
0027 };
0028
0029 struct iscsi_sw_tcp_conn {
0030 struct socket *sock;
0031 struct work_struct recvwork;
0032 bool queue_recv;
0033
0034 struct iscsi_sw_tcp_send out;
0035
0036 void (*old_data_ready)(struct sock *);
0037 void (*old_state_change)(struct sock *);
0038 void (*old_write_space)(struct sock *);
0039
0040
0041 struct ahash_request *tx_hash;
0042 struct ahash_request *rx_hash;
0043
0044
0045 uint32_t sendpage_failures_cnt;
0046 uint32_t discontiguous_hdr_cnt;
0047
0048 ssize_t (*sendpage)(struct socket *, struct page *, int, size_t, int);
0049 };
0050
0051 struct iscsi_sw_tcp_host {
0052 struct iscsi_session *session;
0053 };
0054
0055 struct iscsi_sw_tcp_hdrbuf {
0056 struct iscsi_hdr hdrbuf;
0057 char hdrextbuf[ISCSI_MAX_AHS_SIZE +
0058 ISCSI_DIGEST_SIZE];
0059 };
0060
0061 #endif