target_core_fabric_configfs.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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_param, se_portal_group);
  54. #define TF_TPG_PARAM_ATTR(_fabric, _name, _mode) \
  55. static struct target_fabric_tpg_param_attribute _fabric##_tpg_param_##_name = \
  56. __CONFIGFS_EATTR(_name, _mode, \
  57. _fabric##_tpg_param_show_##_name, \
  58. _fabric##_tpg_param_store_##_name);
  59. CONFIGFS_EATTR_STRUCT(target_fabric_tpg, se_portal_group);
  60. #define TF_TPG_BASE_ATTR(_fabric, _name, _mode) \
  61. static struct target_fabric_tpg_attribute _fabric##_tpg_##_name = \
  62. __CONFIGFS_EATTR(_name, _mode, \
  63. _fabric##_tpg_show_##_name, \
  64. _fabric##_tpg_store_##_name);
  65. CONFIGFS_EATTR_STRUCT(target_fabric_wwn, target_fabric_configfs);
  66. #define TF_WWN_ATTR(_fabric, _name, _mode) \
  67. static struct target_fabric_wwn_attribute _fabric##_wwn_##_name = \
  68. __CONFIGFS_EATTR(_name, _mode, \
  69. _fabric##_wwn_show_attr_##_name, \
  70. _fabric##_wwn_store_attr_##_name);
  71. #define TF_WWN_ATTR_RO(_fabric, _name) \
  72. static struct target_fabric_wwn_attribute _fabric##_wwn_##_name = \
  73. __CONFIGFS_EATTR_RO(_name, \
  74. _fabric##_wwn_show_attr_##_name);
  75. CONFIGFS_EATTR_STRUCT(target_fabric_discovery, target_fabric_configfs);
  76. #define TF_DISC_ATTR(_fabric, _name, _mode) \
  77. static struct target_fabric_discovery_attribute _fabric##_disc_##_name = \
  78. __CONFIGFS_EATTR(_name, _mode, \
  79. _fabric##_disc_show_##_name, \
  80. _fabric##_disc_store_##_name);
  81. #define TF_DISC_ATTR_RO(_fabric, _name) \
  82. static struct target_fabric_discovery_attribute _fabric##_disc_##_name = \
  83. __CONFIGFS_EATTR_RO(_name, \
  84. _fabric##_disc_show_##_name);
  85. extern int target_fabric_setup_cits(struct target_fabric_configfs *);