diff options
Diffstat (limited to 'include/scsi/iscsi_if.h')
-rw-r--r-- | include/scsi/iscsi_if.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index ddb04568a509..e93831e87878 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -59,6 +59,7 @@ enum iscsi_uevent_e { | |||
59 | ISCSI_UEVENT_TRANSPORT_EP_CONNECT_THROUGH_HOST = UEVENT_BASE + 19, | 59 | ISCSI_UEVENT_TRANSPORT_EP_CONNECT_THROUGH_HOST = UEVENT_BASE + 19, |
60 | 60 | ||
61 | ISCSI_UEVENT_PATH_UPDATE = UEVENT_BASE + 20, | 61 | ISCSI_UEVENT_PATH_UPDATE = UEVENT_BASE + 20, |
62 | ISCSI_UEVENT_SET_IFACE_PARAMS = UEVENT_BASE + 21, | ||
62 | 63 | ||
63 | /* up events */ | 64 | /* up events */ |
64 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, | 65 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, |
@@ -172,6 +173,10 @@ struct iscsi_uevent { | |||
172 | struct msg_set_path { | 173 | struct msg_set_path { |
173 | uint32_t host_no; | 174 | uint32_t host_no; |
174 | } set_path; | 175 | } set_path; |
176 | struct msg_set_iface_params { | ||
177 | uint32_t host_no; | ||
178 | uint32_t count; | ||
179 | } set_iface_params; | ||
175 | } u; | 180 | } u; |
176 | union { | 181 | union { |
177 | /* messages k -> u */ | 182 | /* messages k -> u */ |
@@ -214,6 +219,21 @@ struct iscsi_uevent { | |||
214 | } r; | 219 | } r; |
215 | } __attribute__ ((aligned (sizeof(uint64_t)))); | 220 | } __attribute__ ((aligned (sizeof(uint64_t)))); |
216 | 221 | ||
222 | enum iscsi_param_type { | ||
223 | ISCSI_PARAM, /* iscsi_param (session, conn, target, LU) */ | ||
224 | ISCSI_HOST_PARAM, /* iscsi_host_param */ | ||
225 | ISCSI_NET_PARAM, /* iscsi_net_param */ | ||
226 | }; | ||
227 | |||
228 | struct iscsi_iface_param_info { | ||
229 | uint32_t iface_num; /* iface number, 0 - n */ | ||
230 | uint32_t len; /* Actual length of the param */ | ||
231 | uint16_t param; /* iscsi param value */ | ||
232 | uint8_t iface_type; /* IPv4 or IPv6 */ | ||
233 | uint8_t param_type; /* iscsi_param_type */ | ||
234 | uint8_t value[0]; /* length sized value follows */ | ||
235 | } __packed; | ||
236 | |||
217 | /* | 237 | /* |
218 | * To keep the struct iscsi_uevent size the same for userspace code | 238 | * To keep the struct iscsi_uevent size the same for userspace code |
219 | * compatibility, the main structure for ISCSI_UEVENT_PATH_UPDATE and | 239 | * compatibility, the main structure for ISCSI_UEVENT_PATH_UPDATE and |
@@ -237,6 +257,49 @@ struct iscsi_path { | |||
237 | uint16_t pmtu; | 257 | uint16_t pmtu; |
238 | } __attribute__ ((aligned (sizeof(uint64_t)))); | 258 | } __attribute__ ((aligned (sizeof(uint64_t)))); |
239 | 259 | ||
260 | /* iscsi iface enabled/disabled setting */ | ||
261 | #define ISCSI_IFACE_DISABLE 0x01 | ||
262 | #define ISCSI_IFACE_ENABLE 0x02 | ||
263 | |||
264 | /* ipv4 bootproto */ | ||
265 | #define ISCSI_BOOTPROTO_STATIC 0x01 | ||
266 | #define ISCSI_BOOTPROTO_DHCP 0x02 | ||
267 | |||
268 | /* ipv6 addr autoconfig type */ | ||
269 | #define ISCSI_IPV6_AUTOCFG_DISABLE 0x01 | ||
270 | #define ISCSI_IPV6_AUTOCFG_ND_ENABLE 0x02 | ||
271 | #define ISCSI_IPV6_AUTOCFG_DHCPV6_ENABLE 0x03 | ||
272 | |||
273 | /* ipv6 link local addr type */ | ||
274 | #define ISCSI_IPV6_LINKLOCAL_AUTOCFG_ENABLE 0x01 | ||
275 | #define ISCSI_IPV6_LINKLOCAL_AUTOCFG_DISABLE 0x02 | ||
276 | |||
277 | /* ipv6 router addr type */ | ||
278 | #define ISCSI_IPV6_ROUTER_AUTOCFG_ENABLE 0x01 | ||
279 | #define ISCSI_IPV6_ROUTER_AUTOCFG_DISABLE 0x02 | ||
280 | |||
281 | #define ISCSI_IFACE_TYPE_IPV4 0x01 | ||
282 | #define ISCSI_IFACE_TYPE_IPV6 0x02 | ||
283 | |||
284 | /* iSCSI network params */ | ||
285 | enum iscsi_net_param { | ||
286 | ISCSI_NET_PARAM_IPV4_ADDR = 1, | ||
287 | ISCSI_NET_PARAM_IPV4_SUBNET = 2, | ||
288 | ISCSI_NET_PARAM_IPV4_GW = 3, | ||
289 | ISCSI_NET_PARAM_IPV4_BOOTPROTO = 4, | ||
290 | ISCSI_NET_PARAM_MAC = 5, | ||
291 | ISCSI_NET_PARAM_IPV6_LINKLOCAL = 6, | ||
292 | ISCSI_NET_PARAM_IPV6_ADDR = 7, | ||
293 | ISCSI_NET_PARAM_IPV6_ROUTER = 8, | ||
294 | ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG = 9, | ||
295 | ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG = 10, | ||
296 | ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG = 11, | ||
297 | ISCSI_NET_PARAM_IFACE_ENABLE = 12, | ||
298 | ISCSI_NET_PARAM_VLAN_ID = 13, | ||
299 | ISCSI_NET_IFACE_TYPE = 14, | ||
300 | ISCSI_NET_IFACE_NAME = 15, | ||
301 | }; | ||
302 | |||
240 | /* | 303 | /* |
241 | * Common error codes | 304 | * Common error codes |
242 | */ | 305 | */ |