^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef ISCSI_TARGET_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define ISCSI_TARGET_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <linux/spinlock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) struct iscsi_cmd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) struct iscsi_conn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) struct iscsi_np;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct iscsi_portal_group;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) struct iscsi_session;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct iscsi_tpg_np;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct kref;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) struct sockaddr_storage;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) extern struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) extern void iscsit_del_tiqn(struct iscsi_tiqn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern int iscsit_access_np(struct iscsi_np *, struct iscsi_portal_group *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) extern void iscsit_login_kref_put(struct kref *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) extern int iscsit_deaccess_np(struct iscsi_np *, struct iscsi_portal_group *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) struct iscsi_tpg_np *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) extern bool iscsit_check_np_match(struct sockaddr_storage *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct iscsi_np *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) extern struct iscsi_np *iscsit_add_np(struct sockaddr_storage *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) extern int iscsit_reset_np_thread(struct iscsi_np *, struct iscsi_tpg_np *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct iscsi_portal_group *, bool);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern int iscsit_del_np(struct iscsi_np *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) extern int iscsit_reject_cmd(struct iscsi_cmd *cmd, u8, unsigned char *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern void iscsit_set_unsolicited_dataout(struct iscsi_cmd *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern int iscsit_logout_closesession(struct iscsi_cmd *, struct iscsi_conn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern int iscsit_logout_closeconnection(struct iscsi_cmd *, struct iscsi_conn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) extern int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *, struct iscsi_conn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) extern int iscsit_send_async_msg(struct iscsi_conn *, u16, u8, u8);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) extern int iscsit_build_r2ts_for_cmd(struct iscsi_conn *, struct iscsi_cmd *, bool recovery);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) extern void iscsit_thread_get_cpumask(struct iscsi_conn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) extern int iscsi_target_tx_thread(void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) extern int iscsi_target_rx_thread(void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) extern int iscsit_close_connection(struct iscsi_conn *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) extern int iscsit_close_session(struct iscsi_session *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) extern void iscsit_fail_session(struct iscsi_session *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) extern void iscsit_stop_session(struct iscsi_session *, int, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) extern struct iscsit_global *iscsit_global;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) extern const struct target_core_fabric_ops iscsi_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) extern struct kmem_cache *lio_dr_cache;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) extern struct kmem_cache *lio_ooo_cache;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) extern struct kmem_cache *lio_qr_cache;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) extern struct kmem_cache *lio_r2t_cache;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) extern struct ida sess_ida;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) extern struct mutex auth_id_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #endif /*** ISCSI_TARGET_H ***/