blob: 59fd3cabe89d0a2726b879074daf5f158abdde39 [file] [log] [blame]
Nicholas Bellingere48354c2011-07-23 06:43:04 +00001#ifndef ISCSI_TARGET_TPG_H
2#define ISCSI_TARGET_TPG_H
3
Bart Van Assche8dcf07b2016-11-14 15:47:14 -08004#include <linux/types.h>
5
6struct iscsi_np;
7struct iscsi_session;
8struct iscsi_tiqn;
9struct iscsi_tpg_np;
10struct se_node_acl;
11struct sockaddr_storage;
12
Nicholas Bellingere48354c2011-07-23 06:43:04 +000013extern struct iscsi_portal_group *iscsit_alloc_portal_group(struct iscsi_tiqn *, u16);
14extern int iscsit_load_discovery_tpg(void);
15extern void iscsit_release_discovery_tpg(void);
16extern struct iscsi_portal_group *iscsit_get_tpg_from_np(struct iscsi_tiqn *,
Nicholas Bellingerd381a802013-08-15 13:40:17 -070017 struct iscsi_np *, struct iscsi_tpg_np **);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000018extern int iscsit_get_tpg(struct iscsi_portal_group *);
19extern void iscsit_put_tpg(struct iscsi_portal_group *);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000020extern void iscsit_tpg_dump_params(struct iscsi_portal_group *);
21extern int iscsit_tpg_add_portal_group(struct iscsi_tiqn *, struct iscsi_portal_group *);
22extern int iscsit_tpg_del_portal_group(struct iscsi_tiqn *, struct iscsi_portal_group *,
23 int);
24extern int iscsit_tpg_enable_portal_group(struct iscsi_portal_group *);
25extern int iscsit_tpg_disable_portal_group(struct iscsi_portal_group *, int);
26extern struct iscsi_node_acl *iscsit_tpg_add_initiator_node_acl(
27 struct iscsi_portal_group *, const char *, u32);
28extern void iscsit_tpg_del_initiator_node_acl(struct iscsi_portal_group *,
29 struct se_node_acl *);
30extern struct iscsi_node_attrib *iscsit_tpg_get_node_attrib(struct iscsi_session *);
31extern void iscsit_tpg_del_external_nps(struct iscsi_tpg_np *);
32extern struct iscsi_tpg_np *iscsit_tpg_locate_child_np(struct iscsi_tpg_np *, int);
33extern struct iscsi_tpg_np *iscsit_tpg_add_network_portal(struct iscsi_portal_group *,
Andy Grover13a3cf02015-08-24 10:26:06 -070034 struct sockaddr_storage *, struct iscsi_tpg_np *,
Nicholas Bellingere48354c2011-07-23 06:43:04 +000035 int);
36extern int iscsit_tpg_del_network_portal(struct iscsi_portal_group *,
37 struct iscsi_tpg_np *);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000038extern int iscsit_ta_authentication(struct iscsi_portal_group *, u32);
39extern int iscsit_ta_login_timeout(struct iscsi_portal_group *, u32);
40extern int iscsit_ta_netif_timeout(struct iscsi_portal_group *, u32);
41extern int iscsit_ta_generate_node_acls(struct iscsi_portal_group *, u32);
42extern int iscsit_ta_default_cmdsn_depth(struct iscsi_portal_group *, u32);
43extern int iscsit_ta_cache_dynamic_acls(struct iscsi_portal_group *, u32);
44extern int iscsit_ta_demo_mode_write_protect(struct iscsi_portal_group *, u32);
45extern int iscsit_ta_prod_mode_write_protect(struct iscsi_portal_group *, u32);
Thomas Glanzmann4c54b6c2013-10-07 23:12:11 +020046extern int iscsit_ta_demo_mode_discovery(struct iscsi_portal_group *, u32);
Nicholas Bellingerd1fa7a12013-11-20 11:57:18 -080047extern int iscsit_ta_default_erl(struct iscsi_portal_group *, u32);
Sagi Grimberg80851762014-02-19 17:50:20 +020048extern int iscsit_ta_t10_pi(struct iscsi_portal_group *, u32);
Nicholas Bellinger901c04a2015-03-29 19:36:16 -070049extern int iscsit_ta_fabric_prot_type(struct iscsi_portal_group *, u32);
David Disseldorpa6415cd2015-08-01 00:10:12 -070050extern int iscsit_ta_tpg_enabled_sendtargets(struct iscsi_portal_group *, u32);
Nicholas Bellinger138d3512017-07-07 14:45:49 -070051extern int iscsit_ta_login_keys_workaround(struct iscsi_portal_group *, u32);
Nicholas Bellingere48354c2011-07-23 06:43:04 +000052
53#endif /* ISCSI_TARGET_TPG_H */