linux/drivers/target/iscsi/iscsi_target_configfs.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
 * This file contains the configfs implementation for iSCSI Target mode
 * from the LIO-Target Project.
 *
 * (c) Copyright 2007-2013 Datera, Inc.
 *
 * Author: Nicholas A. Bellinger <[email protected]>
 *
 ****************************************************************************/

#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>


/* Start items for lio_target_portal_cit */

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[] =;

/* Stop items for lio_target_portal_cit */

/* Start items for lio_target_np_cit */

#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)
{}

/* End items for lio_target_np_cit */

/* Start items for lio_target_nacl_attrib_cit */

#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[] =;

/* End items for lio_target_nacl_attrib_cit */

/* Start items for lio_target_nacl_auth_cit */

#define __DEF_NACL_AUTH_STR(prefix, name, flags)

#define DEF_NACL_AUTH_STR(name, flags)

/*
 * One-way authentication userid
 */
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[] =;

/* End items for lio_target_nacl_auth_cit */

/* Start items for lio_target_nacl_param_cit */

#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[] =;

/* End items for lio_target_nacl_param_cit */

/* Start items for lio_target_acl_cit */

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)
{}

/* End items for lio_target_acl_cit */

/* Start items for lio_target_tpg_attrib_cit */

#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[] =;

/* End items for lio_target_tpg_attrib_cit */

/* Start items for lio_target_tpg_auth_cit */

#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[] =;

/* End items for lio_target_tpg_auth_cit */

/* Start items for lio_target_tpg_param_cit */

#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[] =;

/* End items for lio_target_tpg_param_cit */

/* Start items for lio_target_tpg_cit */

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[] =;

/* End items for lio_target_tpg_cit */

/* Start items for lio_target_tiqn_cit */

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)
{}

/* End items for lio_target_tiqn_cit */

/* Start LIO-Target TIQN struct contig_item lio_target_cit */

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)
{}

/* End LIO-Target TIQN struct contig_lio_target_cit */

/* Start lio_target_discovery_auth_cit */

#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[] =;

/* End lio_target_discovery_auth_cit */

/* Start functions for target_core_fabric_ops */

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)
{}

/*
 * This function calls iscsit_inc_session_usage_count() on the
 * struct iscsit_session in question.
 */
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 =;