blob: 4cf2c0f2ba2f981699499cce77726d20aeee9dc9 [file] [log] [blame]
Nicholas Bellingere48354c2011-07-23 06:43:04 +00001#ifndef ISCSI_TARGET_H
2#define ISCSI_TARGET_H
3
4extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *);
5extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int);
6extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *);
7extern struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *);
8extern void iscsit_del_tiqn(struct iscsi_tiqn *);
9extern int iscsit_access_np(struct iscsi_np *, struct iscsi_portal_group *);
Nicholas Bellingera91eb7d2013-08-15 12:49:02 -070010extern void iscsit_login_kref_put(struct kref *);
11extern int iscsit_deaccess_np(struct iscsi_np *, struct iscsi_portal_group *,
12 struct iscsi_tpg_np *);
Andy Grover13a3cf02015-08-24 10:26:06 -070013extern bool iscsit_check_np_match(struct sockaddr_storage *,
Nicholas Bellinger05b96892013-02-18 20:59:27 -080014 struct iscsi_np *, int);
Andy Grover13a3cf02015-08-24 10:26:06 -070015extern struct iscsi_np *iscsit_add_np(struct sockaddr_storage *,
Andy Grover76c28f12015-08-24 10:26:03 -070016 int);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000017extern int iscsit_reset_np_thread(struct iscsi_np *, struct iscsi_tpg_np *,
Nicholas Bellingera91eb7d2013-08-15 12:49:02 -070018 struct iscsi_portal_group *, bool);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000019extern int iscsit_del_np(struct iscsi_np *);
Nicholas Bellingerba159912013-07-03 03:48:24 -070020extern int iscsit_reject_cmd(struct iscsi_cmd *cmd, u8, unsigned char *);
Nicholas Bellinger3e1c81a2013-03-06 22:18:24 -080021extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000022extern int iscsit_logout_closesession(struct iscsi_cmd *, struct iscsi_conn *);
23extern int iscsit_logout_closeconnection(struct iscsi_cmd *, struct iscsi_conn *);
24extern int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *, struct iscsi_conn *);
25extern int iscsit_send_async_msg(struct iscsi_conn *, u16, u8, u8);
Nicholas Bellinger3e1c81a2013-03-06 22:18:24 -080026extern int iscsit_build_r2ts_for_cmd(struct iscsi_conn *, struct iscsi_cmd *, bool recovery);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000027extern void iscsit_thread_get_cpumask(struct iscsi_conn *);
28extern int iscsi_target_tx_thread(void *);
29extern int iscsi_target_rx_thread(void *);
30extern int iscsit_close_connection(struct iscsi_conn *);
31extern int iscsit_close_session(struct iscsi_session *);
32extern void iscsit_fail_session(struct iscsi_session *);
33extern int iscsit_free_session(struct iscsi_session *);
34extern void iscsit_stop_session(struct iscsi_session *, int, int);
35extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int);
36
37extern struct iscsit_global *iscsit_global;
Christoph Hellwig9ac89282015-04-08 20:01:35 +020038extern const struct target_core_fabric_ops iscsi_ops;
Nicholas Bellingere48354c2011-07-23 06:43:04 +000039
40extern struct kmem_cache *lio_dr_cache;
41extern struct kmem_cache *lio_ooo_cache;
Nicholas Bellingere48354c2011-07-23 06:43:04 +000042extern struct kmem_cache *lio_qr_cache;
43extern struct kmem_cache *lio_r2t_cache;
44
Christoph Hellwigfceb5bc2012-09-26 08:00:36 -040045extern struct idr sess_idr;
46extern struct mutex auth_id_lock;
47extern spinlock_t sess_idr_lock;
48
49
Nicholas Bellingere48354c2011-07-23 06:43:04 +000050#endif /*** ISCSI_TARGET_H ***/