target_core_fabric_configfs.h 4.7 KB

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