Bluetooth: hci_uart: Provide generic H:4 receive framework
[linux/fpc-iii.git] / include / target / iscsi / iscsi_transport.h
blobe6bb166f12c212aac238d0d951594cce65851145
1 #include <linux/module.h>
2 #include <linux/list.h>
3 #include "iscsi_target_core.h"
5 struct iscsit_transport {
6 #define ISCSIT_TRANSPORT_NAME 16
7 char name[ISCSIT_TRANSPORT_NAME];
8 int transport_type;
9 int priv_size;
10 struct module *owner;
11 struct list_head t_node;
12 int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *);
13 int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *);
14 void (*iscsit_free_np)(struct iscsi_np *);
15 void (*iscsit_wait_conn)(struct iscsi_conn *);
16 void (*iscsit_free_conn)(struct iscsi_conn *);
17 int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *);
18 int (*iscsit_put_login_tx)(struct iscsi_conn *, struct iscsi_login *, u32);
19 int (*iscsit_immediate_queue)(struct iscsi_conn *, struct iscsi_cmd *, int);
20 int (*iscsit_response_queue)(struct iscsi_conn *, struct iscsi_cmd *, int);
21 int (*iscsit_get_dataout)(struct iscsi_conn *, struct iscsi_cmd *, bool);
22 int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *);
23 int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *);
24 void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *);
25 enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *);
28 static inline void *iscsit_priv_cmd(struct iscsi_cmd *cmd)
30 return (void *)(cmd + 1);
34 * From iscsi_target_transport.c
37 extern int iscsit_register_transport(struct iscsit_transport *);
38 extern void iscsit_unregister_transport(struct iscsit_transport *);
39 extern struct iscsit_transport *iscsit_get_transport(int);
40 extern void iscsit_put_transport(struct iscsit_transport *);
43 * From iscsi_target.c
45 extern int iscsit_setup_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *,
46 unsigned char *);
47 extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *);
48 extern int iscsit_process_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *,
49 struct iscsi_scsi_req *);
50 extern int iscsit_check_dataout_hdr(struct iscsi_conn *, unsigned char *,
51 struct iscsi_cmd **);
52 extern int iscsit_check_dataout_payload(struct iscsi_cmd *, struct iscsi_data *,
53 bool);
54 extern int iscsit_setup_nop_out(struct iscsi_conn *, struct iscsi_cmd *,
55 struct iscsi_nopout *);
56 extern int iscsit_process_nop_out(struct iscsi_conn *, struct iscsi_cmd *,
57 struct iscsi_nopout *);
58 extern int iscsit_handle_logout_cmd(struct iscsi_conn *, struct iscsi_cmd *,
59 unsigned char *);
60 extern int iscsit_handle_task_mgt_cmd(struct iscsi_conn *, struct iscsi_cmd *,
61 unsigned char *);
62 extern int iscsit_setup_text_cmd(struct iscsi_conn *, struct iscsi_cmd *,
63 struct iscsi_text *);
64 extern int iscsit_process_text_cmd(struct iscsi_conn *, struct iscsi_cmd *,
65 struct iscsi_text *);
66 extern void iscsit_build_rsp_pdu(struct iscsi_cmd *, struct iscsi_conn *,
67 bool, struct iscsi_scsi_rsp *);
68 extern void iscsit_build_nopin_rsp(struct iscsi_cmd *, struct iscsi_conn *,
69 struct iscsi_nopin *, bool);
70 extern void iscsit_build_task_mgt_rsp(struct iscsi_cmd *, struct iscsi_conn *,
71 struct iscsi_tm_rsp *);
72 extern int iscsit_build_text_rsp(struct iscsi_cmd *, struct iscsi_conn *,
73 struct iscsi_text_rsp *,
74 enum iscsit_transport_type);
75 extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *,
76 struct iscsi_reject *);
77 extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *,
78 struct iscsi_logout_rsp *);
79 extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *);
81 * From iscsi_target_device.c
83 extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *);
85 * From iscsi_target_erl0.c
87 extern void iscsit_cause_connection_reinstatement(struct iscsi_conn *, int);
89 * From iscsi_target_erl1.c
91 extern void iscsit_stop_dataout_timer(struct iscsi_cmd *);
94 * From iscsi_target_tmr.c
96 extern int iscsit_tmr_post_handler(struct iscsi_cmd *, struct iscsi_conn *);
99 * From iscsi_target_util.c
101 extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, int);
102 extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *,
103 unsigned char *, __be32);
104 extern void iscsit_release_cmd(struct iscsi_cmd *);