]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/dev/iscsi/icl_conn_if.m
Merge libxo 0.4.6
[FreeBSD/FreeBSD.git] / sys / dev / iscsi / icl_conn_if.m
1 #-
2 # Copyright (c) 2014 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
9 # modification, are permitted provided that the following conditions
10 # are met:
11 # 1. Redistributions of source code must retain the above copyright
12 #    notice, this list of conditions and the following disclaimer.
13 # 2. Redistributions in binary form must reproduce the above copyright
14 #    notice, this list of conditions and the following disclaimer in the
15 #    documentation and/or other materials provided with the distribution.
16 #
17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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$
30 #
31
32 #include <dev/iscsi/icl.h>
33
34 INTERFACE icl_conn;
35
36 METHOD size_t pdu_data_segment_length {
37         struct icl_conn *_ic;
38         const struct icl_pdu *_ip;
39 };
40
41 METHOD int pdu_append_data {
42         struct icl_conn *_ic;
43         struct icl_pdu *_ip;
44         const void *_addr;
45         size_t _len;
46         int _flags;
47 };
48
49 METHOD void pdu_get_data {
50         struct icl_conn *_ic;
51         struct icl_pdu *_ip;
52         size_t _off;
53         void *_addr;
54         size_t _len;
55 };
56
57 METHOD void pdu_queue {
58         struct icl_conn *_ic;
59         struct icl_pdu *_ip;
60 };
61
62 METHOD void pdu_free {
63         struct icl_conn *_ic;
64         struct icl_pdu *_ip;
65 };
66
67 METHOD struct icl_pdu * new_pdu {
68         struct icl_conn *_ic;
69         int _flags;
70 };
71
72 METHOD void free {
73         struct icl_conn *_ic;
74 };
75
76 METHOD int handoff {
77         struct icl_conn *_ic;
78         int _fd;
79 };
80
81 METHOD void close {
82         struct icl_conn *_ic;
83 };
84
85 METHOD int task_setup {
86         struct icl_conn *_ic;
87         struct ccb_scsiio *_csio;
88         uint32_t *_task_tag;
89         void **_prvp;
90 };
91
92 METHOD void task_done {
93         struct icl_conn *_ic;
94         void *_prv;
95 };
96
97 METHOD int transfer_setup {
98         struct icl_conn *_ic;
99         union ctl_io *_io;
100         uint32_t *_transfer_tag;
101         void **_prvp;
102 };
103
104 METHOD void transfer_done {
105         struct icl_conn *_ic;
106         void *_prv;
107 };