2 * Copyright (c) 2003 Silicon Graphics International Corp.
3 * Copyright (c) 2011 Spectra Logic Corporation
4 * Copyright (c) 2014-2017 Alexander Motin <mav@FreeBSD.org>
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions, and the following disclaimer,
12 * without modification.
13 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
14 * substantially similar to the "NO WARRANTY" disclaimer below
15 * ("Disclaimer") and any redistribution must be conditioned upon
16 * including a substantially similar Disclaimer requirement for further
17 * binary redistribution.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGES.
32 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_ioctl.h#4 $
36 * CAM Target Layer ioctl interface.
38 * Author: Ken Merry <ken@FreeBSD.org>
44 #ifdef ICL_KERNEL_PROXY
45 #include <sys/socket.h>
48 #include <sys/ioccom.h>
50 #define CTL_DEFAULT_DEV "/dev/cam/ctl"
52 * Maximum number of targets we support.
54 #define CTL_MAX_TARGETS 1
57 * Maximum target ID we support.
59 #define CTL_MAX_TARGID 15
62 * Maximum number of initiators per port.
64 #define CTL_MAX_INIT_PER_PORT 2048
66 /* Hopefully this won't conflict with new misc devices that pop up */
69 /* Legacy statistics accumulated for every port for every LU. */
70 //#define CTL_LEGACY_STATS 1
75 CTL_DELAY_TYPE_ONESHOT
80 CTL_DELAY_LOC_DATAMOVE,
85 CTL_DELAY_STATUS_NONE,
87 CTL_DELAY_STATUS_INVALID_LUN,
88 CTL_DELAY_STATUS_INVALID_TYPE,
89 CTL_DELAY_STATUS_INVALID_LOC,
90 CTL_DELAY_STATUS_NOT_IMPLEMENTED
93 struct ctl_io_delay_info {
95 ctl_delay_type delay_type;
96 ctl_delay_location delay_loc;
98 ctl_delay_status status;
106 #define CTL_STATS_NUM_TYPES 3
110 CTL_SS_NEED_MORE_SPACE,
115 CTL_STATS_FLAG_NONE = 0x00,
116 CTL_STATS_FLAG_TIME_VALID = 0x01
119 #ifdef CTL_LEGACY_STATS
121 CTL_LUN_STATS_NO_BLOCKSIZE = 0x01
122 } ctl_lun_stats_flags;
124 struct ctl_lun_io_port_stats {
126 uint64_t bytes[CTL_STATS_NUM_TYPES];
127 uint64_t operations[CTL_STATS_NUM_TYPES];
128 struct bintime time[CTL_STATS_NUM_TYPES];
129 uint64_t num_dmas[CTL_STATS_NUM_TYPES];
130 struct bintime dma_time[CTL_STATS_NUM_TYPES];
133 struct ctl_lun_io_stats {
137 ctl_lun_stats_flags flags;
138 struct ctl_lun_io_port_stats *ports;
142 int alloc_len; /* passed to kernel */
143 struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */
144 int fill_len; /* passed to userland */
145 int num_luns; /* passed to userland */
146 ctl_stats_status status; /* passed to userland */
147 ctl_stats_flags flags; /* passed to userland */
148 struct timespec timestamp; /* passed to userland */
150 #endif /* CTL_LEGACY_STATS */
152 struct ctl_io_stats {
154 uint64_t bytes[CTL_STATS_NUM_TYPES];
155 uint64_t operations[CTL_STATS_NUM_TYPES];
156 uint64_t dmas[CTL_STATS_NUM_TYPES];
157 struct bintime time[CTL_STATS_NUM_TYPES];
158 struct bintime dma_time[CTL_STATS_NUM_TYPES];
161 struct ctl_get_io_stats {
162 struct ctl_io_stats *stats; /* passed to/from kernel */
163 size_t alloc_len; /* passed to kernel */
164 size_t fill_len; /* passed to userland */
165 int first_item; /* passed to kernel */
166 int num_items; /* passed to userland */
167 ctl_stats_status status; /* passed to userland */
168 ctl_stats_flags flags; /* passed to userland */
169 struct timespec timestamp; /* passed to userland */
173 * The types of errors that can be injected:
175 * NONE: No error specified.
176 * ABORTED: SSD_KEY_ABORTED_COMMAND, 0x45, 0x00
177 * MEDIUM_ERR: Medium error, different asc/ascq depending on read/write.
178 * UA: Unit attention.
179 * CUSTOM: User specifies the sense data.
180 * TYPE: Mask to use with error types.
182 * Flags that affect injection behavior:
183 * CONTINUOUS: This error will stay around until explicitly cleared.
184 * DESCRIPTOR: Use descriptor sense instead of fixed sense.
187 CTL_LUN_INJ_NONE = 0x000,
188 CTL_LUN_INJ_ABORTED = 0x001,
189 CTL_LUN_INJ_MEDIUM_ERR = 0x002,
190 CTL_LUN_INJ_UA = 0x003,
191 CTL_LUN_INJ_CUSTOM = 0x004,
192 CTL_LUN_INJ_TYPE = 0x0ff,
193 CTL_LUN_INJ_CONTINUOUS = 0x100,
194 CTL_LUN_INJ_DESCRIPTOR = 0x200
198 * Flags to specify what type of command the given error pattern will
199 * execute on. The first group of types can be ORed together.
201 * READ: Any read command.
202 * WRITE: Any write command.
203 * READWRITE: Any read or write command.
204 * READCAP: Any read capacity command.
205 * TUR: Test Unit Ready.
207 * MASK: Mask for basic command patterns.
211 * CMD: The CDB to act on is specified in struct ctl_error_desc_cmd.
212 * RANGE: For read/write commands, act when the LBA is in the
216 CTL_LUN_PAT_NONE = 0x000,
217 CTL_LUN_PAT_READ = 0x001,
218 CTL_LUN_PAT_WRITE = 0x002,
219 CTL_LUN_PAT_READWRITE = CTL_LUN_PAT_READ | CTL_LUN_PAT_WRITE,
220 CTL_LUN_PAT_READCAP = 0x004,
221 CTL_LUN_PAT_TUR = 0x008,
222 CTL_LUN_PAT_ANY = 0x0ff,
223 CTL_LUN_PAT_MASK = 0x0ff,
224 CTL_LUN_PAT_CMD = 0x100,
225 CTL_LUN_PAT_RANGE = 0x200
226 } ctl_lun_error_pattern;
229 * This structure allows the user to specify a particular CDB pattern to
232 * cdb_pattern: Fill in the relevant bytes to look for in the CDB.
233 * cdb_valid_bytes: Bitmask specifying valid bytes in the cdb_pattern.
234 * flags: Specify any command flags (see ctl_io_flags) that
237 struct ctl_error_desc_cmd {
238 uint8_t cdb_pattern[CTL_MAX_CDBLEN];
239 uint32_t cdb_valid_bytes;
244 * Error injection descriptor.
246 * lun_id LUN to act on.
247 * lun_error: The type of error to inject. See above for descriptions.
248 * error_pattern: What kind of command to act on. See above.
249 * cmd_desc: For CTL_LUN_PAT_CMD only.
250 * lba_range: For CTL_LUN_PAT_RANGE only.
251 * custom_sense: Specify sense. For CTL_LUN_INJ_CUSTOM only.
252 * serial: Serial number returned by the kernel. Use for deletion.
253 * links: Kernel use only.
255 struct ctl_error_desc {
256 uint32_t lun_id; /* To kernel */
257 ctl_lun_error lun_error; /* To kernel */
258 ctl_lun_error_pattern error_pattern; /* To kernel */
259 struct ctl_error_desc_cmd cmd_desc; /* To kernel */
260 struct ctl_lba_len lba_range; /* To kernel */
261 struct scsi_sense_data custom_sense; /* To kernel */
262 uint64_t serial; /* From kernel */
263 STAILQ_ENTRY(ctl_error_desc) links; /* Kernel use only */
267 CTL_OOA_FLAG_NONE = 0x00,
268 CTL_OOA_FLAG_ALL_LUNS = 0x01
273 CTL_OOA_NEED_MORE_SPACE,
275 } ctl_get_ooa_status;
278 CTL_OOACMD_FLAG_NONE = 0x00,
279 CTL_OOACMD_FLAG_DMA = 0x01,
280 CTL_OOACMD_FLAG_BLOCKED = 0x02,
281 CTL_OOACMD_FLAG_ABORT = 0x04,
282 CTL_OOACMD_FLAG_RTR = 0x08,
283 CTL_OOACMD_FLAG_DMA_QUEUED = 0x10
286 struct ctl_ooa_entry {
287 ctl_ooa_cmd_flags cmd_flags;
288 uint8_t cdb[CTL_MAX_CDBLEN];
292 struct bintime start_bt;
296 ctl_ooa_flags flags; /* passed to kernel */
297 uint64_t lun_num; /* passed to kernel */
298 uint32_t alloc_len; /* passed to kernel */
299 uint32_t alloc_num; /* passed to kernel */
300 struct ctl_ooa_entry *entries; /* filled in kernel */
301 uint32_t fill_len; /* passed to userland */
302 uint32_t fill_num; /* passed to userland */
303 uint32_t dropped_num; /* passed to userland */
304 struct bintime cur_bt; /* passed to userland */
305 ctl_get_ooa_status status; /* passed to userland */
315 #define CTL_ERROR_STR_LEN 160
317 #define CTL_BEARG_RD 0x01
318 #define CTL_BEARG_WR 0x02
319 #define CTL_BEARG_RW (CTL_BEARG_RD|CTL_BEARG_WR)
320 #define CTL_BEARG_ASCII 0x04
325 * namelen: Length of the name field, including the terminating NUL.
327 * name: Name of the parameter. This must be NUL-terminated.
329 * flags: Flags for the parameter, see above for values.
331 * vallen: Length of the value in bytes, including the terminating NUL.
333 * value: Value to be set/fetched. This must be NUL-terminated.
335 * kname: For kernel use only.
337 * kvalue: For kernel use only.
340 unsigned int namelen;
357 * The ID_REQ flag is used to say that the caller has requested a
358 * particular LUN ID in the req_lun_id field. If we cannot allocate that
359 * LUN ID, the ctl_add_lun() call will fail.
361 * The STOPPED flag tells us that the LUN should default to the powered
362 * off state. It will return 0x04,0x02 until it is powered up. ("Logical
363 * unit not ready, initializing command required.")
365 * The NO_MEDIA flag tells us that the LUN has no media inserted.
367 * The PRIMARY flag tells us that this LUN is registered as a Primary LUN
368 * which is accessible via the Master shelf controller in an HA. This flag
369 * being set indicates a Primary LUN. This flag being reset represents a
370 * Secondary LUN controlled by the Secondary controller in an HA
371 * configuration. Flag is applicable at this time to T_DIRECT types.
373 * The SERIAL_NUM flag tells us that the serial_num field is filled in and
374 * valid for use in SCSI INQUIRY VPD page 0x80.
376 * The DEVID flag tells us that the device_id field is filled in and
377 * valid for use in SCSI INQUIRY VPD page 0x83.
379 * The DEV_TYPE flag tells us that the device_type field is filled in.
381 * The EJECTED flag tells us that the removable LUN has tray open.
383 * The UNMAP flag tells us that this LUN supports UNMAP.
385 * The OFFLINE flag tells us that this LUN can not access backing store.
388 CTL_LUN_FLAG_ID_REQ = 0x01,
389 CTL_LUN_FLAG_STOPPED = 0x02,
390 CTL_LUN_FLAG_NO_MEDIA = 0x04,
391 CTL_LUN_FLAG_PRIMARY = 0x08,
392 CTL_LUN_FLAG_SERIAL_NUM = 0x10,
393 CTL_LUN_FLAG_DEVID = 0x20,
394 CTL_LUN_FLAG_DEV_TYPE = 0x40,
395 CTL_LUN_FLAG_UNMAP = 0x80,
396 CTL_LUN_FLAG_EJECTED = 0x100,
397 CTL_LUN_FLAG_READONLY = 0x200
398 } ctl_backend_lun_flags;
401 * LUN creation parameters:
403 * flags: Various LUN flags, see above.
405 * device_type: The SCSI device type. e.g. 0 for Direct Access,
406 * 3 for Processor, etc. Only certain backends may
407 * support setting this field. The CTL_LUN_FLAG_DEV_TYPE
408 * flag should be set in the flags field if the device
411 * lun_size_bytes: The size of the LUN in bytes. For some backends
412 * this is relevant (e.g. ramdisk), for others, it may
413 * be ignored in favor of using the properties of the
414 * backing store. If specified, this should be a
415 * multiple of the blocksize.
417 * The actual size of the LUN is returned in this
420 * blocksize_bytes: The LUN blocksize in bytes. For some backends this
421 * is relevant, for others it may be ignored in
422 * favor of using the properties of the backing store.
424 * The actual blocksize of the LUN is returned in this
427 * req_lun_id: The requested LUN ID. The CTL_LUN_FLAG_ID_REQ flag
428 * should be set if this is set. The request will be
429 * granted if the LUN number is available, otherwise
430 * the LUN addition request will fail.
432 * The allocated LUN number is returned in this field.
434 * serial_num: This is the value returned in SCSI INQUIRY VPD page
435 * 0x80. If it is specified, the CTL_LUN_FLAG_SERIAL_NUM
436 * flag should be set.
438 * The serial number value used is returned in this
441 * device_id: This is the value returned in the T10 vendor ID
442 * based DESIGNATOR field in the SCSI INQUIRY VPD page
443 * 0x83 data. If it is specified, the CTL_LUN_FLAG_DEVID
444 * flag should be set.
446 * The device id value used is returned in this field.
448 struct ctl_lun_create_params {
449 ctl_backend_lun_flags flags;
451 uint64_t lun_size_bytes;
452 uint32_t blocksize_bytes;
454 uint8_t serial_num[CTL_SN_LEN];
455 uint8_t device_id[CTL_DEVID_LEN];
459 * LUN removal parameters:
461 * lun_id: The number of the LUN to delete. This must be set.
462 * The LUN must be backed by the given backend.
464 struct ctl_lun_rm_params {
469 * LUN modification parameters:
471 * lun_id: The number of the LUN to modify. This must be set.
472 * The LUN must be backed by the given backend.
474 * lun_size_bytes: The size of the LUN in bytes. If zero, update
475 * the size using the backing file size, if possible.
477 struct ctl_lun_modify_params {
479 uint64_t lun_size_bytes;
483 * Union of request type data. Fill in the appropriate union member for
486 union ctl_lunreq_data {
487 struct ctl_lun_create_params create;
488 struct ctl_lun_rm_params rm;
489 struct ctl_lun_modify_params modify;
493 * LUN request interface:
495 * backend: This is required, and is NUL-terminated a string
496 * that is the name of the backend, like "ramdisk" or
499 * reqtype: The type of request, CTL_LUNREQ_CREATE to create a
500 * LUN, CTL_LUNREQ_RM to delete a LUN.
502 * reqdata: Request type-specific information. See the
503 * description of individual the union members above
504 * for more information.
506 * num_be_args: This is the number of backend-specific arguments
507 * in the be_args array.
509 * be_args: This is an array of backend-specific arguments.
510 * See above for a description of the fields in this
513 * status: Status of the LUN request.
515 * error_str: If the status is CTL_LUN_ERROR, this will
516 * contain a string describing the error.
518 * kern_be_args: For kernel use only.
521 #define CTL_BE_NAME_LEN 32
522 char backend[CTL_BE_NAME_LEN];
523 ctl_lunreq_type reqtype;
524 union ctl_lunreq_data reqdata;
526 struct ctl_be_arg *be_args;
527 ctl_lun_status status;
528 char error_str[CTL_ERROR_STR_LEN];
529 struct ctl_be_arg *kern_be_args;
537 * OK: Request completed successfully.
539 * NEED_MORE_SPACE: The allocated length of the entries field is too
540 * small for the available data.
542 * ERROR: An error occurred, look at the error string for a
543 * description of the error.
548 CTL_LUN_LIST_NEED_MORE_SPACE,
550 } ctl_lun_list_status;
555 * backend_name: This is a NUL-terminated string. If the string
556 * length is 0, then all LUNs on all backends will
557 * be enumerated. Otherwise this is the name of the
558 * backend to be enumerated, like "ramdisk" or "block".
560 * alloc_len: The length of the data buffer allocated for entries.
561 * In order to properly size the buffer, make one call
562 * with alloc_len set to 0, and then use the returned
563 * dropped_len as the buffer length to allocate and
564 * pass in on a subsequent call.
566 * lun_xml: XML-formatted information on the requested LUNs.
568 * fill_len: The amount of data filled in the storage for entries.
570 * status: The status of the request. See above for the
571 * description of the values of this field.
573 * error_str: If the status indicates an error, this string will
574 * be filled in to describe the error.
576 struct ctl_lun_list {
577 char backend[CTL_BE_NAME_LEN]; /* passed to kernel*/
578 uint32_t alloc_len; /* passed to kernel */
579 char *lun_xml; /* filled in kernel */
580 uint32_t fill_len; /* passed to userland */
581 ctl_lun_list_status status; /* passed to userland */
582 char error_str[CTL_ERROR_STR_LEN];
583 /* passed to userland */
587 * Port request interface:
589 * driver: This is required, and is NUL-terminated a string
590 * that is the name of the frontend, like "iscsi" .
592 * reqtype: The type of request, CTL_REQ_CREATE to create a
593 * port, CTL_REQ_REMOVE to delete a port.
595 * num_be_args: This is the number of frontend-specific arguments
596 * in the be_args array.
598 * be_args: This is an array of frontend-specific arguments.
599 * See above for a description of the fields in this
602 * status: Status of the request.
604 * error_str: If the status is CTL_LUN_ERROR, this will
605 * contain a string describing the error.
607 * kern_be_args: For kernel use only.
616 char driver[CTL_DRIVER_NAME_LEN];
617 ctl_req_type reqtype;
619 struct ctl_be_arg *args;
620 ctl_lun_status status;
621 char error_str[CTL_ERROR_STR_LEN];
622 struct ctl_be_arg *kern_args;
628 * OK: Request completed successfully.
630 * ERROR: An error occurred, look at the error string for a
631 * description of the error.
633 * CTL_ISCSI_LIST_NEED_MORE_SPACE:
634 * User has to pass larger buffer for CTL_ISCSI_LIST ioctl.
639 CTL_ISCSI_LIST_NEED_MORE_SPACE,
640 CTL_ISCSI_SESSION_NOT_FOUND
649 #if defined(ICL_KERNEL_PROXY) || 1
651 * We actually need those in all cases, but leave the ICL_KERNEL_PROXY,
652 * to remember to remove them along with rest of proxy code, eventually.
662 CTL_ISCSI_DIGEST_NONE,
663 CTL_ISCSI_DIGEST_CRC32C
666 #define CTL_ISCSI_NAME_LEN 224 /* 223 bytes, by RFC 3720, + '\0' */
667 #define CTL_ISCSI_ADDR_LEN 47 /* INET6_ADDRSTRLEN + '\0' */
668 #define CTL_ISCSI_ALIAS_LEN 128 /* Arbitrary. */
669 #define CTL_ISCSI_OFFLOAD_LEN 8 /* Arbitrary. */
671 struct ctl_iscsi_handoff_params {
672 char initiator_name[CTL_ISCSI_NAME_LEN];
673 char initiator_addr[CTL_ISCSI_ADDR_LEN];
674 char initiator_alias[CTL_ISCSI_ALIAS_LEN];
675 uint8_t initiator_isid[6];
676 char target_name[CTL_ISCSI_NAME_LEN];
678 int portal_group_tag;
681 * Connection parameters negotiated by ctld(8).
683 ctl_iscsi_digest header_digest;
684 ctl_iscsi_digest data_digest;
687 int max_recv_data_segment_length;
688 int max_burst_length;
689 int first_burst_length;
690 uint32_t immediate_data;
691 char offload[CTL_ISCSI_OFFLOAD_LEN];
692 #ifdef ICL_KERNEL_PROXY
697 int max_send_data_segment_length;
700 struct ctl_iscsi_list_params {
701 uint32_t alloc_len; /* passed to kernel */
702 char *conn_xml; /* filled in kernel */
703 uint32_t fill_len; /* passed to userland */
707 struct ctl_iscsi_logout_params {
708 int connection_id; /* passed to kernel */
709 char initiator_name[CTL_ISCSI_NAME_LEN];
710 /* passed to kernel */
711 char initiator_addr[CTL_ISCSI_ADDR_LEN];
712 /* passed to kernel */
713 int all; /* passed to kernel */
717 struct ctl_iscsi_terminate_params {
718 int connection_id; /* passed to kernel */
719 char initiator_name[CTL_ISCSI_NAME_LEN];
720 /* passed to kernel */
721 char initiator_addr[CTL_ISCSI_NAME_LEN];
722 /* passed to kernel */
723 int all; /* passed to kernel */
727 struct ctl_iscsi_limits_params {
728 /* passed to kernel */
729 char offload[CTL_ISCSI_OFFLOAD_LEN];
731 /* passed to userland */
733 int max_recv_data_segment_length;
734 int max_send_data_segment_length;
735 int max_burst_length;
736 int first_burst_length;
739 #ifdef ICL_KERNEL_PROXY
740 struct ctl_iscsi_listen_params {
745 struct sockaddr *addr;
751 struct ctl_iscsi_accept_params {
754 struct sockaddr *initiator_addr;
755 socklen_t initiator_addrlen;
759 struct ctl_iscsi_send_params {
764 size_t data_segment_len;
769 struct ctl_iscsi_receive_params {
774 size_t data_segment_len;
779 #endif /* ICL_KERNEL_PROXY */
781 union ctl_iscsi_data {
782 struct ctl_iscsi_handoff_params handoff;
783 struct ctl_iscsi_list_params list;
784 struct ctl_iscsi_logout_params logout;
785 struct ctl_iscsi_terminate_params terminate;
786 struct ctl_iscsi_limits_params limits;
787 #ifdef ICL_KERNEL_PROXY
788 struct ctl_iscsi_listen_params listen;
789 struct ctl_iscsi_accept_params accept;
790 struct ctl_iscsi_send_params send;
791 struct ctl_iscsi_receive_params receive;
798 * status: The status of the request. See above for the
799 * description of the values of this field.
801 * error_str: If the status indicates an error, this string will
802 * be filled in to describe the error.
805 ctl_iscsi_type type; /* passed to kernel */
806 union ctl_iscsi_data data; /* passed to kernel */
807 ctl_iscsi_status status; /* passed to userland */
808 char error_str[CTL_ERROR_STR_LEN];
809 /* passed to userland */
818 #define CTL_IO _IOWR(CTL_MINOR, 0x00, union ctl_io)
819 #define CTL_ENABLE_PORT _IOW(CTL_MINOR, 0x04, struct ctl_port_entry)
820 #define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry)
821 #define CTL_DELAY_IO _IOWR(CTL_MINOR, 0x10, struct ctl_io_delay_info)
822 #define CTL_GETSTATS _IOWR(CTL_MINOR, 0x15, struct ctl_stats)
823 #define CTL_ERROR_INJECT _IOWR(CTL_MINOR, 0x16, struct ctl_error_desc)
824 #define CTL_GET_OOA _IOWR(CTL_MINOR, 0x18, struct ctl_ooa)
825 #define CTL_DUMP_STRUCTS _IO(CTL_MINOR, 0x19)
826 #define CTL_LUN_REQ _IOWR(CTL_MINOR, 0x21, struct ctl_lun_req)
827 #define CTL_LUN_LIST _IOWR(CTL_MINOR, 0x22, struct ctl_lun_list)
828 #define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc)
829 #define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry)
830 #define CTL_ISCSI _IOWR(CTL_MINOR, 0x25, struct ctl_iscsi)
831 #define CTL_PORT_REQ _IOWR(CTL_MINOR, 0x26, struct ctl_req)
832 #define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x27, struct ctl_lun_list)
833 #define CTL_LUN_MAP _IOW(CTL_MINOR, 0x28, struct ctl_lun_map)
834 #define CTL_GET_LUN_STATS _IOWR(CTL_MINOR, 0x29, struct ctl_get_io_stats)
835 #define CTL_GET_PORT_STATS _IOWR(CTL_MINOR, 0x2a, struct ctl_get_io_stats)
837 #endif /* _CTL_IOCTL_H_ */