~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/iscsi_boot_sysfs.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Export the iSCSI boot info to userland via sysfs.
  4  *
  5  * Copyright (C) 2010 Red Hat, Inc.  All rights reserved.
  6  * Copyright (C) 2010 Mike Christie
  7  */
  8 #ifndef _ISCSI_BOOT_SYSFS_
  9 #define _ISCSI_BOOT_SYSFS_
 10 
 11 /*
 12  * The text attributes names for each of the kobjects.
 13 */
 14 enum iscsi_boot_eth_properties_enum {
 15         ISCSI_BOOT_ETH_INDEX,
 16         ISCSI_BOOT_ETH_FLAGS,
 17         ISCSI_BOOT_ETH_IP_ADDR,
 18         ISCSI_BOOT_ETH_PREFIX_LEN,
 19         ISCSI_BOOT_ETH_SUBNET_MASK,
 20         ISCSI_BOOT_ETH_ORIGIN,
 21         ISCSI_BOOT_ETH_GATEWAY,
 22         ISCSI_BOOT_ETH_PRIMARY_DNS,
 23         ISCSI_BOOT_ETH_SECONDARY_DNS,
 24         ISCSI_BOOT_ETH_DHCP,
 25         ISCSI_BOOT_ETH_VLAN,
 26         ISCSI_BOOT_ETH_MAC,
 27         /* eth_pci_bdf - this is replaced by link to the device itself. */
 28         ISCSI_BOOT_ETH_HOSTNAME,
 29         ISCSI_BOOT_ETH_END_MARKER,
 30 };
 31 
 32 enum iscsi_boot_tgt_properties_enum {
 33         ISCSI_BOOT_TGT_INDEX,
 34         ISCSI_BOOT_TGT_FLAGS,
 35         ISCSI_BOOT_TGT_IP_ADDR,
 36         ISCSI_BOOT_TGT_PORT,
 37         ISCSI_BOOT_TGT_LUN,
 38         ISCSI_BOOT_TGT_CHAP_TYPE,
 39         ISCSI_BOOT_TGT_NIC_ASSOC,
 40         ISCSI_BOOT_TGT_NAME,
 41         ISCSI_BOOT_TGT_CHAP_NAME,
 42         ISCSI_BOOT_TGT_CHAP_SECRET,
 43         ISCSI_BOOT_TGT_REV_CHAP_NAME,
 44         ISCSI_BOOT_TGT_REV_CHAP_SECRET,
 45         ISCSI_BOOT_TGT_END_MARKER,
 46 };
 47 
 48 enum iscsi_boot_initiator_properties_enum {
 49         ISCSI_BOOT_INI_INDEX,
 50         ISCSI_BOOT_INI_FLAGS,
 51         ISCSI_BOOT_INI_ISNS_SERVER,
 52         ISCSI_BOOT_INI_SLP_SERVER,
 53         ISCSI_BOOT_INI_PRI_RADIUS_SERVER,
 54         ISCSI_BOOT_INI_SEC_RADIUS_SERVER,
 55         ISCSI_BOOT_INI_INITIATOR_NAME,
 56         ISCSI_BOOT_INI_END_MARKER,
 57 };
 58 
 59 enum iscsi_boot_acpitbl_properties_enum {
 60         ISCSI_BOOT_ACPITBL_SIGNATURE,
 61         ISCSI_BOOT_ACPITBL_OEM_ID,
 62         ISCSI_BOOT_ACPITBL_OEM_TABLE_ID,
 63 };
 64 
 65 struct attribute_group;
 66 
 67 struct iscsi_boot_kobj {
 68         struct kobject kobj;
 69         struct attribute_group *attr_group;
 70         struct list_head list;
 71 
 72         /*
 73          * Pointer to store driver specific info. If set this will
 74          * be freed for the LLD when the kobj release function is called.
 75          */
 76         void *data;
 77         /*
 78          * Driver specific show function.
 79          *
 80          * The enum of the type. This can be any value of the above
 81          * properties.
 82          */
 83         ssize_t (*show) (void *data, int type, char *buf);
 84 
 85         /*
 86          * Drivers specific visibility function.
 87          * The function should return if they the attr should be readable
 88          * writable or should not be shown.
 89          *
 90          * The enum of the type. This can be any value of the above
 91          * properties.
 92          */
 93         umode_t (*is_visible) (void *data, int type);
 94 
 95         /*
 96          * Driver specific release function.
 97          *
 98          * The function should free the data passed in.
 99          */
100         void (*release) (void *data);
101 };
102 
103 struct iscsi_boot_kset {
104         struct list_head kobj_list;
105         struct kset *kset;
106 };
107 
108 struct iscsi_boot_kobj *
109 iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index,
110                             void *data,
111                             ssize_t (*show) (void *data, int type, char *buf),
112                             umode_t (*is_visible) (void *data, int type),
113                             void (*release) (void *data));
114 
115 struct iscsi_boot_kobj *
116 iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index,
117                            void *data,
118                            ssize_t (*show) (void *data, int type, char *buf),
119                            umode_t (*is_visible) (void *data, int type),
120                            void (*release) (void *data));
121 struct iscsi_boot_kobj *
122 iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index,
123                          void *data,
124                          ssize_t (*show) (void *data, int type, char *buf),
125                          umode_t (*is_visible) (void *data, int type),
126                          void (*release) (void *data));
127 
128 struct iscsi_boot_kobj *
129 iscsi_boot_create_acpitbl(struct iscsi_boot_kset *boot_kset, int index,
130                           void *data,
131                           ssize_t (*show)(void *data, int type, char *buf),
132                           umode_t (*is_visible)(void *data, int type),
133                           void (*release)(void *data));
134 
135 struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name);
136 struct iscsi_boot_kset *iscsi_boot_create_host_kset(unsigned int hostno);
137 void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset);
138 
139 #endif
140 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php