#include <linux/configfs.h>
#include <linux/ctype.h>
#include <linux/export.h>
#include <linux/inet.h>
#include <linux/module.h>
#include <net/ipv6.h>
#include <target/target_core_base.h>
#include <target/target_core_fabric.h>
#include <target/iscsi/iscsi_transport.h>
#include <target/iscsi/iscsi_target_core.h>
#include "iscsi_target_parameters.h"
#include "iscsi_target_device.h"
#include "iscsi_target_erl0.h"
#include "iscsi_target_nodeattrib.h"
#include "iscsi_target_tpg.h"
#include "iscsi_target_util.h"
#include "iscsi_target.h"
#include <target/iscsi/iscsi_target_stat.h>
static inline struct iscsi_tpg_np *to_iscsi_tpg_np(struct config_item *item)
{ … }
static ssize_t lio_target_np_driver_show(struct config_item *item, char *page,
enum iscsit_transport_type type)
{ … }
static ssize_t lio_target_np_driver_store(struct config_item *item,
const char *page, size_t count, enum iscsit_transport_type type,
const char *mod_name)
{ … }
static ssize_t lio_target_np_iser_show(struct config_item *item, char *page)
{ … }
static ssize_t lio_target_np_iser_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static ssize_t lio_target_np_cxgbit_show(struct config_item *item, char *page)
{ … }
static ssize_t lio_target_np_cxgbit_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static struct configfs_attribute *lio_target_portal_attrs[] = …;
#define MAX_PORTAL_LEN …
static struct se_tpg_np *lio_target_call_addnptotpg(
struct se_portal_group *se_tpg,
struct config_group *group,
const char *name)
{ … }
static void lio_target_call_delnpfromtpg(
struct se_tpg_np *se_tpg_np)
{ … }
#define ISCSI_NACL_ATTR(name) …
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
ISCSI_NACL_ATTR(…);
static ssize_t iscsi_nacl_attrib_authentication_show(struct config_item *item,
char *page)
{ … }
static ssize_t iscsi_nacl_attrib_authentication_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static struct configfs_attribute *lio_target_nacl_attrib_attrs[] = …;
#define __DEF_NACL_AUTH_STR(prefix, name, flags) …
#define DEF_NACL_AUTH_STR(name, flags) …
DEF_NACL_AUTH_STR(…);
DEF_NACL_AUTH_STR(…);
DEF_NACL_AUTH_STR(…);
DEF_NACL_AUTH_STR(…);
#define __DEF_NACL_AUTH_INT(prefix, name) …
#define DEF_NACL_AUTH_INT(name) …
DEF_NACL_AUTH_INT(…);
static struct configfs_attribute *lio_target_nacl_auth_attrs[] = …;
#define ISCSI_NACL_PARAM(name) …
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
ISCSI_NACL_PARAM(…);
static struct configfs_attribute *lio_target_nacl_param_attrs[] = …;
static ssize_t lio_target_nacl_info_show(struct config_item *item, char *page)
{ … }
static ssize_t lio_target_nacl_cmdsn_depth_show(struct config_item *item,
char *page)
{ … }
static ssize_t lio_target_nacl_cmdsn_depth_store(struct config_item *item,
const char *page, size_t count)
{ … }
static ssize_t lio_target_nacl_tag_show(struct config_item *item, char *page)
{ … }
static ssize_t lio_target_nacl_tag_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR_RO(…);
CONFIGFS_ATTR(…);
CONFIGFS_ATTR(…);
static struct configfs_attribute *lio_target_initiator_attrs[] = …;
static int lio_target_init_nodeacl(struct se_node_acl *se_nacl,
const char *name)
{ … }
#define DEF_TPG_ATTRIB(name) …
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
DEF_TPG_ATTRIB(…);
static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = …;
#define __DEF_TPG_AUTH_STR(prefix, name, flags) …
#define DEF_TPG_AUTH_STR(name, flags) …
DEF_TPG_AUTH_STR(userid, NAF_USERID_SET);
DEF_TPG_AUTH_STR(password, NAF_PASSWORD_SET);
DEF_TPG_AUTH_STR(userid_mutual, NAF_USERID_IN_SET);
DEF_TPG_AUTH_STR(password_mutual, NAF_PASSWORD_IN_SET);
#define __DEF_TPG_AUTH_INT(prefix, name) …
#define DEF_TPG_AUTH_INT(name) …
DEF_TPG_AUTH_INT(authenticate_target);
static struct configfs_attribute *lio_target_tpg_auth_attrs[] = …;
#define DEF_TPG_PARAM(name) …
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
DEF_TPG_PARAM(…);
static struct configfs_attribute *lio_target_tpg_param_attrs[] = …;
static ssize_t lio_target_tpg_dynamic_sessions_show(struct config_item *item,
char *page)
{ … }
CONFIGFS_ATTR_RO(…);
static struct configfs_attribute *lio_target_tpg_attrs[] = …;
static struct se_portal_group *lio_target_tiqn_addtpg(struct se_wwn *wwn,
const char *name)
{ … }
static int lio_target_tiqn_enabletpg(struct se_portal_group *se_tpg,
bool enable)
{ … }
static void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg)
{ … }
static ssize_t lio_target_wwn_lio_version_show(struct config_item *item,
char *page)
{ … }
CONFIGFS_ATTR_RO(…);
static ssize_t lio_target_wwn_cpus_allowed_list_show(
struct config_item *item, char *page)
{ … }
static ssize_t lio_target_wwn_cpus_allowed_list_store(
struct config_item *item, const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static struct configfs_attribute *lio_target_wwn_attrs[] = …;
static struct se_wwn *lio_target_call_coreaddtiqn(
struct target_fabric_configfs *tf,
struct config_group *group,
const char *name)
{ … }
static void lio_target_add_wwn_groups(struct se_wwn *wwn)
{ … }
static void lio_target_call_coredeltiqn(
struct se_wwn *wwn)
{ … }
#define DEF_DISC_AUTH_STR(name, flags) …
DEF_DISC_AUTH_STR(…);
DEF_DISC_AUTH_STR(…);
DEF_DISC_AUTH_STR(…);
DEF_DISC_AUTH_STR(…);
#define DEF_DISC_AUTH_INT(name) …
DEF_DISC_AUTH_INT(…);
static ssize_t iscsi_disc_enforce_discovery_auth_show(struct config_item *item,
char *page)
{ … }
static ssize_t iscsi_disc_enforce_discovery_auth_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static struct configfs_attribute *lio_target_discovery_auth_attrs[] = …;
static int iscsi_get_cmd_state(struct se_cmd *se_cmd)
{ … }
static u32 lio_sess_get_index(struct se_session *se_sess)
{ … }
static u32 lio_sess_get_initiator_sid(
struct se_session *se_sess,
unsigned char *buf,
u32 size)
{ … }
static int lio_queue_data_in(struct se_cmd *se_cmd)
{ … }
static int lio_write_pending(struct se_cmd *se_cmd)
{ … }
static int lio_queue_status(struct se_cmd *se_cmd)
{ … }
static void lio_queue_tm_rsp(struct se_cmd *se_cmd)
{ … }
static void lio_aborted_task(struct se_cmd *se_cmd)
{ … }
static char *lio_tpg_get_endpoint_wwn(struct se_portal_group *se_tpg)
{ … }
static u16 lio_tpg_get_tag(struct se_portal_group *se_tpg)
{ … }
static u32 lio_tpg_get_default_depth(struct se_portal_group *se_tpg)
{ … }
static int lio_tpg_check_demo_mode(struct se_portal_group *se_tpg)
{ … }
static int lio_tpg_check_demo_mode_cache(struct se_portal_group *se_tpg)
{ … }
static int lio_tpg_check_demo_mode_write_protect(
struct se_portal_group *se_tpg)
{ … }
static int lio_tpg_check_prod_mode_write_protect(
struct se_portal_group *se_tpg)
{ … }
static int lio_tpg_check_prot_fabric_only(
struct se_portal_group *se_tpg)
{ … }
static void lio_tpg_close_session(struct se_session *se_sess)
{ … }
static u32 lio_tpg_get_inst_index(struct se_portal_group *se_tpg)
{ … }
static void lio_set_default_node_attributes(struct se_node_acl *se_acl)
{ … }
static int lio_check_stop_free(struct se_cmd *se_cmd)
{ … }
static void lio_release_cmd(struct se_cmd *se_cmd)
{ … }
const struct target_core_fabric_ops iscsi_ops = …;