linux/include/target/target_core_fabric_configfs.h
<<
>>
Prefs
   1/*
   2 * Used for tfc_wwn_cit attributes
   3 */
   4
   5#include <target/configfs_macros.h>
   6
   7CONFIGFS_EATTR_STRUCT(target_fabric_nacl_attrib, se_node_acl);
   8#define TF_NACL_ATTRIB_ATTR(_fabric, _name, _mode)                      \
   9static struct target_fabric_nacl_attrib_attribute _fabric##_nacl_attrib_##_name = \
  10        __CONFIGFS_EATTR(_name, _mode,                                  \
  11        _fabric##_nacl_attrib_show_##_name,                             \
  12        _fabric##_nacl_attrib_store_##_name);
  13
  14CONFIGFS_EATTR_STRUCT(target_fabric_nacl_auth, se_node_acl);
  15#define TF_NACL_AUTH_ATTR(_fabric, _name, _mode)                        \
  16static struct target_fabric_nacl_auth_attribute _fabric##_nacl_auth_##_name = \
  17        __CONFIGFS_EATTR(_name, _mode,                                  \
  18        _fabric##_nacl_auth_show_##_name,                               \
  19        _fabric##_nacl_auth_store_##_name);
  20
  21#define TF_NACL_AUTH_ATTR_RO(_fabric, _name)                            \
  22static struct target_fabric_nacl_auth_attribute _fabric##_nacl_auth_##_name = \
  23        __CONFIGFS_EATTR_RO(_name,                                      \
  24        _fabric##_nacl_auth_show_##_name);
  25
  26CONFIGFS_EATTR_STRUCT(target_fabric_nacl_param, se_node_acl);
  27#define TF_NACL_PARAM_ATTR(_fabric, _name, _mode)                       \
  28static struct target_fabric_nacl_param_attribute _fabric##_nacl_param_##_name = \
  29        __CONFIGFS_EATTR(_name, _mode,                                  \
  30        _fabric##_nacl_param_show_##_name,                              \
  31        _fabric##_nacl_param_store_##_name);
  32
  33#define TF_NACL_PARAM_ATTR_RO(_fabric, _name)                           \
  34static struct target_fabric_nacl_param_attribute _fabric##_nacl_param_##_name = \
  35        __CONFIGFS_EATTR_RO(_name,                                      \
  36        _fabric##_nacl_param_show_##_name);
  37
  38
  39CONFIGFS_EATTR_STRUCT(target_fabric_nacl_base, se_node_acl);
  40#define TF_NACL_BASE_ATTR(_fabric, _name, _mode)                        \
  41static struct target_fabric_nacl_base_attribute _fabric##_nacl_##_name = \
  42        __CONFIGFS_EATTR(_name, _mode,                                  \
  43        _fabric##_nacl_show_##_name,                                    \
  44        _fabric##_nacl_store_##_name);
  45
  46#define TF_NACL_BASE_ATTR_RO(_fabric, _name)                            \
  47static struct target_fabric_nacl_base_attribute _fabric##_nacl_##_name = \
  48        __CONFIGFS_EATTR_RO(_name,                                      \
  49        _fabric##_nacl_show_##_name);
  50
  51CONFIGFS_EATTR_STRUCT(target_fabric_np_base, se_tpg_np);
  52#define TF_NP_BASE_ATTR(_fabric, _name, _mode)                          \
  53static struct target_fabric_np_base_attribute _fabric##_np_##_name =    \
  54        __CONFIGFS_EATTR(_name, _mode,                                  \
  55        _fabric##_np_show_##_name,                                      \
  56        _fabric##_np_store_##_name);
  57
  58CONFIGFS_EATTR_STRUCT(target_fabric_tpg_attrib, se_portal_group);
  59#define TF_TPG_ATTRIB_ATTR(_fabric, _name, _mode)                       \
  60static struct target_fabric_tpg_attrib_attribute _fabric##_tpg_attrib_##_name = \
  61        __CONFIGFS_EATTR(_name, _mode,                                  \
  62        _fabric##_tpg_attrib_show_##_name,                              \
  63        _fabric##_tpg_attrib_store_##_name);
  64
  65CONFIGFS_EATTR_STRUCT(target_fabric_tpg_auth, se_portal_group);
  66#define TF_TPG_AUTH_ATTR(_fabric, _name, _mode)                         \
  67static struct target_fabric_tpg_auth_attribute _fabric##_tpg_auth_##_name = \
  68        __CONFIGFS_EATTR(_name, _mode,                                  \
  69        _fabric##_tpg_auth_show_##_name,                                \
  70        _fabric##_tpg_auth_store_##_name);
  71
  72#define TF_TPG_AUTH_ATTR_RO(_fabric, _name)                             \
  73static struct target_fabric_tpg_auth_attribute _fabric##_tpg_auth_##_name = \
  74        __CONFIGFS_EATTR_RO(_name,                                      \
  75        _fabric##_tpg_auth_show_##_name);
  76
  77CONFIGFS_EATTR_STRUCT(target_fabric_tpg_param, se_portal_group);
  78#define TF_TPG_PARAM_ATTR(_fabric, _name, _mode)                        \
  79static struct target_fabric_tpg_param_attribute _fabric##_tpg_param_##_name = \
  80        __CONFIGFS_EATTR(_name, _mode,                                  \
  81        _fabric##_tpg_param_show_##_name,                               \
  82        _fabric##_tpg_param_store_##_name);
  83
  84
  85CONFIGFS_EATTR_STRUCT(target_fabric_tpg, se_portal_group);
  86#define TF_TPG_BASE_ATTR(_fabric, _name, _mode)                         \
  87static struct target_fabric_tpg_attribute _fabric##_tpg_##_name =       \
  88        __CONFIGFS_EATTR(_name, _mode,                                  \
  89        _fabric##_tpg_show_##_name,                                     \
  90        _fabric##_tpg_store_##_name);
  91
  92
  93CONFIGFS_EATTR_STRUCT(target_fabric_wwn, target_fabric_configfs);
  94#define TF_WWN_ATTR(_fabric, _name, _mode)                              \
  95static struct target_fabric_wwn_attribute _fabric##_wwn_##_name =       \
  96        __CONFIGFS_EATTR(_name, _mode,                                  \
  97        _fabric##_wwn_show_attr_##_name,                                \
  98        _fabric##_wwn_store_attr_##_name);
  99
 100#define TF_WWN_ATTR_RO(_fabric, _name)                                  \
 101static struct target_fabric_wwn_attribute _fabric##_wwn_##_name =       \
 102        __CONFIGFS_EATTR_RO(_name,                                      \
 103        _fabric##_wwn_show_attr_##_name);
 104
 105CONFIGFS_EATTR_STRUCT(target_fabric_discovery, target_fabric_configfs);
 106#define TF_DISC_ATTR(_fabric, _name, _mode)                             \
 107static struct target_fabric_discovery_attribute _fabric##_disc_##_name = \
 108        __CONFIGFS_EATTR(_name, _mode,                                  \
 109        _fabric##_disc_show_##_name,                                    \
 110        _fabric##_disc_store_##_name);
 111
 112#define TF_DISC_ATTR_RO(_fabric, _name)                                 \
 113static struct target_fabric_discovery_attribute _fabric##_disc_##_name = \
 114        __CONFIGFS_EATTR_RO(_name,                                      \
 115        _fabric##_disc_show_##_name);
 116
 117extern int target_fabric_setup_cits(struct target_fabric_configfs *);
 118