2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 2003 Silicon Graphics International Corp.
5 * Copyright (c) 2011 Spectra Logic Corporation
6 * Copyright (c) 2014-2017 Alexander Motin <mav@FreeBSD.org>
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions, and the following disclaimer,
14 * without modification.
15 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
16 * substantially similar to the "NO WARRANTY" disclaimer below
17 * ("Disclaimer") and any redistribution must be conditioned upon
18 * including a substantially similar Disclaimer requirement for further
19 * binary redistribution.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGES.
34 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_ioctl.h#4 $
38 * CAM Target Layer ioctl interface.
40 * Author: Ken Merry <ken@FreeBSD.org>
46 #ifdef ICL_KERNEL_PROXY
47 #include <sys/socket.h>
50 #include <sys/ioccom.h>
52 #define CTL_DEFAULT_DEV "/dev/cam/ctl"
54 * Maximum number of targets we support.
56 #define CTL_MAX_TARGETS 1
59 * Maximum target ID we support.
61 #define CTL_MAX_TARGID 15
64 * Maximum number of initiators per port.
66 #define CTL_MAX_INIT_PER_PORT 2048
68 /* Hopefully this won't conflict with new misc devices that pop up */
71 /* Legacy statistics accumulated for every port for every LU. */
72 //#define CTL_LEGACY_STATS 1
77 CTL_DELAY_TYPE_ONESHOT
82 CTL_DELAY_LOC_DATAMOVE,
87 CTL_DELAY_STATUS_NONE,
89 CTL_DELAY_STATUS_INVALID_LUN,
90 CTL_DELAY_STATUS_INVALID_TYPE,
91 CTL_DELAY_STATUS_INVALID_LOC,
92 CTL_DELAY_STATUS_NOT_IMPLEMENTED
95 struct ctl_io_delay_info {
97 ctl_delay_type delay_type;
98 ctl_delay_location delay_loc;
100 ctl_delay_status status;
108 #define CTL_STATS_NUM_TYPES 3
112 CTL_SS_NEED_MORE_SPACE,
117 CTL_STATS_FLAG_NONE = 0x00,
118 CTL_STATS_FLAG_TIME_VALID = 0x01
121 #ifdef CTL_LEGACY_STATS
123 CTL_LUN_STATS_NO_BLOCKSIZE = 0x01
124 } ctl_lun_stats_flags;
126 struct ctl_lun_io_port_stats {
128 uint64_t bytes[CTL_STATS_NUM_TYPES];
129 uint64_t operations[CTL_STATS_NUM_TYPES];
130 struct bintime time[CTL_STATS_NUM_TYPES];
131 uint64_t num_dmas[CTL_STATS_NUM_TYPES];
132 struct bintime dma_time[CTL_STATS_NUM_TYPES];
135 struct ctl_lun_io_stats {
139 ctl_lun_stats_flags flags;
140 struct ctl_lun_io_port_stats *ports;
144 int alloc_len; /* passed to kernel */
145 struct ctl_lun_io_stats *lun_stats; /* passed to/from kernel */
146 int fill_len; /* passed to userland */
147 int num_luns; /* passed to userland */
148 ctl_stats_status status; /* passed to userland */
149 ctl_stats_flags flags; /* passed to userland */
150 struct timespec timestamp; /* passed to userland */
152 #endif /* CTL_LEGACY_STATS */
154 struct ctl_io_stats {
156 uint64_t bytes[CTL_STATS_NUM_TYPES];
157 uint64_t operations[CTL_STATS_NUM_TYPES];
158 uint64_t dmas[CTL_STATS_NUM_TYPES];
159 struct bintime time[CTL_STATS_NUM_TYPES];
160 struct bintime dma_time[CTL_STATS_NUM_TYPES];
163 struct ctl_get_io_stats {
164 struct ctl_io_stats *stats; /* passed to/from kernel */
165 size_t alloc_len; /* passed to kernel */
166 size_t fill_len; /* passed to userland */
167 int first_item; /* passed to kernel */
168 int num_items; /* passed to userland */
169 ctl_stats_status status; /* passed to userland */
170 ctl_stats_flags flags; /* passed to userland */
171 struct timespec timestamp; /* passed to userland */
175 * The types of errors that can be injected:
177 * NONE: No error specified.
178 * ABORTED: SSD_KEY_ABORTED_COMMAND, 0x45, 0x00
179 * MEDIUM_ERR: Medium error, different asc/ascq depending on read/write.
180 * UA: Unit attention.
181 * CUSTOM: User specifies the sense data.
182 * TYPE: Mask to use with error types.
184 * Flags that affect injection behavior:
185 * CONTINUOUS: This error will stay around until explicitly cleared.
186 * DESCRIPTOR: Use descriptor sense instead of fixed sense.
189 CTL_LUN_INJ_NONE = 0x000,
190 CTL_LUN_INJ_ABORTED = 0x001,
191 CTL_LUN_INJ_MEDIUM_ERR = 0x002,
192 CTL_LUN_INJ_UA = 0x003,
193 CTL_LUN_INJ_CUSTOM = 0x004,
194 CTL_LUN_INJ_TYPE = 0x0ff,
195 CTL_LUN_INJ_CONTINUOUS = 0x100,
196 CTL_LUN_INJ_DESCRIPTOR = 0x200
200 * Flags to specify what type of command the given error pattern will
201 * execute on. The first group of types can be ORed together.
203 * READ: Any read command.
204 * WRITE: Any write command.
205 * READWRITE: Any read or write command.
206 * READCAP: Any read capacity command.
207 * TUR: Test Unit Ready.
209 * MASK: Mask for basic command patterns.
213 * CMD: The CDB to act on is specified in struct ctl_error_desc_cmd.
214 * RANGE: For read/write commands, act when the LBA is in the
218 CTL_LUN_PAT_NONE = 0x000,
219 CTL_LUN_PAT_READ = 0x001,
220 CTL_LUN_PAT_WRITE = 0x002,
221 CTL_LUN_PAT_READWRITE = CTL_LUN_PAT_READ | CTL_LUN_PAT_WRITE,
222 CTL_LUN_PAT_READCAP = 0x004,
223 CTL_LUN_PAT_TUR = 0x008,
224 CTL_LUN_PAT_ANY = 0x0ff,
225 CTL_LUN_PAT_MASK = 0x0ff,
226 CTL_LUN_PAT_CMD = 0x100,
227 CTL_LUN_PAT_RANGE = 0x200
228 } ctl_lun_error_pattern;
231 * This structure allows the user to specify a particular CDB pattern to
234 * cdb_pattern: Fill in the relevant bytes to look for in the CDB.
235 * cdb_valid_bytes: Bitmask specifying valid bytes in the cdb_pattern.
236 * flags: Specify any command flags (see ctl_io_flags) that
239 struct ctl_error_desc_cmd {
240 uint8_t cdb_pattern[CTL_MAX_CDBLEN];
241 uint32_t cdb_valid_bytes;
246 * Error injection descriptor.
248 * lun_id LUN to act on.
249 * lun_error: The type of error to inject. See above for descriptions.
250 * error_pattern: What kind of command to act on. See above.
251 * cmd_desc: For CTL_LUN_PAT_CMD only.
252 * lba_range: For CTL_LUN_PAT_RANGE only.
253 * custom_sense: Specify sense. For CTL_LUN_INJ_CUSTOM only.
254 * serial: Serial number returned by the kernel. Use for deletion.
255 * links: Kernel use only.
257 struct ctl_error_desc {
258 uint32_t lun_id; /* To kernel */
259 ctl_lun_error lun_error; /* To kernel */
260 ctl_lun_error_pattern error_pattern; /* To kernel */
261 struct ctl_error_desc_cmd cmd_desc; /* To kernel */
262 struct ctl_lba_len lba_range; /* To kernel */
263 struct scsi_sense_data custom_sense; /* To kernel */
264 uint64_t serial; /* From kernel */
265 STAILQ_ENTRY(ctl_error_desc) links; /* Kernel use only */
269 CTL_OOA_FLAG_NONE = 0x00,
270 CTL_OOA_FLAG_ALL_LUNS = 0x01
275 CTL_OOA_NEED_MORE_SPACE,
277 } ctl_get_ooa_status;
280 CTL_OOACMD_FLAG_NONE = 0x00,
281 CTL_OOACMD_FLAG_DMA = 0x01,
282 CTL_OOACMD_FLAG_BLOCKED = 0x02,
283 CTL_OOACMD_FLAG_ABORT = 0x04,
284 CTL_OOACMD_FLAG_RTR = 0x08,
285 CTL_OOACMD_FLAG_DMA_QUEUED = 0x10
288 struct ctl_ooa_entry {
289 ctl_ooa_cmd_flags cmd_flags;
290 uint8_t cdb[CTL_MAX_CDBLEN];
294 struct bintime start_bt;
298 ctl_ooa_flags flags; /* passed to kernel */
299 uint64_t lun_num; /* passed to kernel */
300 uint32_t alloc_len; /* passed to kernel */
301 uint32_t alloc_num; /* passed to kernel */
302 struct ctl_ooa_entry *entries; /* filled in kernel */
303 uint32_t fill_len; /* passed to userland */
304 uint32_t fill_num; /* passed to userland */
305 uint32_t dropped_num; /* passed to userland */
306 struct bintime cur_bt; /* passed to userland */
307 ctl_get_ooa_status status; /* passed to userland */
317 #define CTL_ERROR_STR_LEN 160
319 #define CTL_BEARG_RD 0x01
320 #define CTL_BEARG_WR 0x02
321 #define CTL_BEARG_RW (CTL_BEARG_RD|CTL_BEARG_WR)
322 #define CTL_BEARG_ASCII 0x04
327 * namelen: Length of the name field, including the terminating NUL.
329 * name: Name of the parameter. This must be NUL-terminated.
331 * flags: Flags for the parameter, see above for values.
333 * vallen: Length of the value in bytes, including the terminating NUL.
335 * value: Value to be set/fetched. This must be NUL-terminated.
337 * kname: For kernel use only.
339 * kvalue: For kernel use only.
342 unsigned int namelen;
359 * The ID_REQ flag is used to say that the caller has requested a
360 * particular LUN ID in the req_lun_id field. If we cannot allocate that
361 * LUN ID, the ctl_add_lun() call will fail.
363 * The STOPPED flag tells us that the LUN should default to the powered
364 * off state. It will return 0x04,0x02 until it is powered up. ("Logical
365 * unit not ready, initializing command required.")
367 * The NO_MEDIA flag tells us that the LUN has no media inserted.
369 * The PRIMARY flag tells us that this LUN is registered as a Primary LUN
370 * which is accessible via the Master shelf controller in an HA. This flag
371 * being set indicates a Primary LUN. This flag being reset represents a
372 * Secondary LUN controlled by the Secondary controller in an HA
373 * configuration. Flag is applicable at this time to T_DIRECT types.
375 * The SERIAL_NUM flag tells us that the serial_num field is filled in and
376 * valid for use in SCSI INQUIRY VPD page 0x80.
378 * The DEVID flag tells us that the device_id field is filled in and
379 * valid for use in SCSI INQUIRY VPD page 0x83.
381 * The DEV_TYPE flag tells us that the device_type field is filled in.
383 * The EJECTED flag tells us that the removable LUN has tray open.
385 * The UNMAP flag tells us that this LUN supports UNMAP.
387 * The OFFLINE flag tells us that this LUN can not access backing store.
390 CTL_LUN_FLAG_ID_REQ = 0x01,
391 CTL_LUN_FLAG_STOPPED = 0x02,
392 CTL_LUN_FLAG_NO_MEDIA = 0x04,
393 CTL_LUN_FLAG_PRIMARY = 0x08,
394 CTL_LUN_FLAG_SERIAL_NUM = 0x10,
395 CTL_LUN_FLAG_DEVID = 0x20,
396 CTL_LUN_FLAG_DEV_TYPE = 0x40,
397 CTL_LUN_FLAG_UNMAP = 0x80,
398 CTL_LUN_FLAG_EJECTED = 0x100,
399 CTL_LUN_FLAG_READONLY = 0x200
400 } ctl_backend_lun_flags;
403 * LUN creation parameters:
405 * flags: Various LUN flags, see above.
407 * device_type: The SCSI device type. e.g. 0 for Direct Access,
408 * 3 for Processor, etc. Only certain backends may
409 * support setting this field. The CTL_LUN_FLAG_DEV_TYPE
410 * flag should be set in the flags field if the device
413 * lun_size_bytes: The size of the LUN in bytes. For some backends
414 * this is relevant (e.g. ramdisk), for others, it may
415 * be ignored in favor of using the properties of the
416 * backing store. If specified, this should be a
417 * multiple of the blocksize.
419 * The actual size of the LUN is returned in this
422 * blocksize_bytes: The LUN blocksize in bytes. For some backends this
423 * is relevant, for others it may be ignored in
424 * favor of using the properties of the backing store.
426 * The actual blocksize of the LUN is returned in this
429 * req_lun_id: The requested LUN ID. The CTL_LUN_FLAG_ID_REQ flag
430 * should be set if this is set. The request will be
431 * granted if the LUN number is available, otherwise
432 * the LUN addition request will fail.
434 * The allocated LUN number is returned in this field.
436 * serial_num: This is the value returned in SCSI INQUIRY VPD page
437 * 0x80. If it is specified, the CTL_LUN_FLAG_SERIAL_NUM
438 * flag should be set.
440 * The serial number value used is returned in this
443 * device_id: This is the value returned in the T10 vendor ID
444 * based DESIGNATOR field in the SCSI INQUIRY VPD page
445 * 0x83 data. If it is specified, the CTL_LUN_FLAG_DEVID
446 * flag should be set.
448 * The device id value used is returned in this field.
450 struct ctl_lun_create_params {
451 ctl_backend_lun_flags flags;
453 uint64_t lun_size_bytes;
454 uint32_t blocksize_bytes;
456 uint8_t serial_num[CTL_SN_LEN];
457 uint8_t device_id[CTL_DEVID_LEN];
461 * LUN removal parameters:
463 * lun_id: The number of the LUN to delete. This must be set.
464 * The LUN must be backed by the given backend.
466 struct ctl_lun_rm_params {
471 * LUN modification parameters:
473 * lun_id: The number of the LUN to modify. This must be set.
474 * The LUN must be backed by the given backend.
476 * lun_size_bytes: The size of the LUN in bytes. If zero, update
477 * the size using the backing file size, if possible.
479 struct ctl_lun_modify_params {
481 uint64_t lun_size_bytes;
485 * Union of request type data. Fill in the appropriate union member for
488 union ctl_lunreq_data {
489 struct ctl_lun_create_params create;
490 struct ctl_lun_rm_params rm;
491 struct ctl_lun_modify_params modify;
495 * LUN request interface:
497 * backend: This is required, and is NUL-terminated a string
498 * that is the name of the backend, like "ramdisk" or
501 * reqtype: The type of request, CTL_LUNREQ_CREATE to create a
502 * LUN, CTL_LUNREQ_RM to delete a LUN.
504 * reqdata: Request type-specific information. See the
505 * description of individual the union members above
506 * for more information.
508 * num_be_args: This is the number of backend-specific arguments
509 * in the be_args array.
511 * be_args: This is an array of backend-specific arguments.
512 * See above for a description of the fields in this
515 * status: Status of the LUN request.
517 * error_str: If the status is CTL_LUN_ERROR, this will
518 * contain a string describing the error.
520 * kern_be_args: For kernel use only.
523 #define CTL_BE_NAME_LEN 32
524 char backend[CTL_BE_NAME_LEN];
525 ctl_lunreq_type reqtype;
526 union ctl_lunreq_data reqdata;
528 struct ctl_be_arg *be_args;
529 ctl_lun_status status;
530 char error_str[CTL_ERROR_STR_LEN];
531 struct ctl_be_arg *kern_be_args;
539 * OK: Request completed successfully.
541 * NEED_MORE_SPACE: The allocated length of the entries field is too
542 * small for the available data.
544 * ERROR: An error occurred, look at the error string for a
545 * description of the error.
550 CTL_LUN_LIST_NEED_MORE_SPACE,
552 } ctl_lun_list_status;
557 * backend_name: This is a NUL-terminated string. If the string
558 * length is 0, then all LUNs on all backends will
559 * be enumerated. Otherwise this is the name of the
560 * backend to be enumerated, like "ramdisk" or "block".
562 * alloc_len: The length of the data buffer allocated for entries.
563 * In order to properly size the buffer, make one call
564 * with alloc_len set to 0, and then use the returned
565 * dropped_len as the buffer length to allocate and
566 * pass in on a subsequent call.
568 * lun_xml: XML-formatted information on the requested LUNs.
570 * fill_len: The amount of data filled in the storage for entries.
572 * status: The status of the request. See above for the
573 * description of the values of this field.
575 * error_str: If the status indicates an error, this string will
576 * be filled in to describe the error.
578 struct ctl_lun_list {
579 char backend[CTL_BE_NAME_LEN]; /* passed to kernel*/
580 uint32_t alloc_len; /* passed to kernel */
581 char *lun_xml; /* filled in kernel */
582 uint32_t fill_len; /* passed to userland */
583 ctl_lun_list_status status; /* passed to userland */
584 char error_str[CTL_ERROR_STR_LEN];
585 /* passed to userland */
589 * Port request interface:
591 * driver: This is required, and is NUL-terminated a string
592 * that is the name of the frontend, like "iscsi" .
594 * reqtype: The type of request, CTL_REQ_CREATE to create a
595 * port, CTL_REQ_REMOVE to delete a port.
597 * num_be_args: This is the number of frontend-specific arguments
598 * in the be_args array.
600 * be_args: This is an array of frontend-specific arguments.
601 * See above for a description of the fields in this
604 * status: Status of the request.
606 * error_str: If the status is CTL_LUN_ERROR, this will
607 * contain a string describing the error.
609 * kern_be_args: For kernel use only.
618 char driver[CTL_DRIVER_NAME_LEN];
619 ctl_req_type reqtype;
621 struct ctl_be_arg *args;
622 ctl_lun_status status;
623 char error_str[CTL_ERROR_STR_LEN];
624 struct ctl_be_arg *kern_args;
630 * OK: Request completed successfully.
632 * ERROR: An error occurred, look at the error string for a
633 * description of the error.
635 * CTL_ISCSI_LIST_NEED_MORE_SPACE:
636 * User has to pass larger buffer for CTL_ISCSI_LIST ioctl.
641 CTL_ISCSI_LIST_NEED_MORE_SPACE,
642 CTL_ISCSI_SESSION_NOT_FOUND
651 #if defined(ICL_KERNEL_PROXY) || 1
653 * We actually need those in all cases, but leave the ICL_KERNEL_PROXY,
654 * to remember to remove them along with rest of proxy code, eventually.
664 CTL_ISCSI_DIGEST_NONE,
665 CTL_ISCSI_DIGEST_CRC32C
668 #define CTL_ISCSI_NAME_LEN 224 /* 223 bytes, by RFC 3720, + '\0' */
669 #define CTL_ISCSI_ADDR_LEN 47 /* INET6_ADDRSTRLEN + '\0' */
670 #define CTL_ISCSI_ALIAS_LEN 128 /* Arbitrary. */
671 #define CTL_ISCSI_OFFLOAD_LEN 8 /* Arbitrary. */
673 struct ctl_iscsi_handoff_params {
674 char initiator_name[CTL_ISCSI_NAME_LEN];
675 char initiator_addr[CTL_ISCSI_ADDR_LEN];
676 char initiator_alias[CTL_ISCSI_ALIAS_LEN];
677 uint8_t initiator_isid[6];
678 char target_name[CTL_ISCSI_NAME_LEN];
680 int portal_group_tag;
683 * Connection parameters negotiated by ctld(8).
685 ctl_iscsi_digest header_digest;
686 ctl_iscsi_digest data_digest;
689 int max_recv_data_segment_length;
690 int max_burst_length;
691 int first_burst_length;
692 uint32_t immediate_data;
693 char offload[CTL_ISCSI_OFFLOAD_LEN];
694 #ifdef ICL_KERNEL_PROXY
699 int max_send_data_segment_length;
702 struct ctl_iscsi_list_params {
703 uint32_t alloc_len; /* passed to kernel */
704 char *conn_xml; /* filled in kernel */
705 uint32_t fill_len; /* passed to userland */
709 struct ctl_iscsi_logout_params {
710 int connection_id; /* passed to kernel */
711 char initiator_name[CTL_ISCSI_NAME_LEN];
712 /* passed to kernel */
713 char initiator_addr[CTL_ISCSI_ADDR_LEN];
714 /* passed to kernel */
715 int all; /* passed to kernel */
719 struct ctl_iscsi_terminate_params {
720 int connection_id; /* passed to kernel */
721 char initiator_name[CTL_ISCSI_NAME_LEN];
722 /* passed to kernel */
723 char initiator_addr[CTL_ISCSI_NAME_LEN];
724 /* passed to kernel */
725 int all; /* passed to kernel */
729 struct ctl_iscsi_limits_params {
730 /* passed to kernel */
731 char offload[CTL_ISCSI_OFFLOAD_LEN];
733 /* passed to userland */
735 int max_recv_data_segment_length;
736 int max_send_data_segment_length;
737 int max_burst_length;
738 int first_burst_length;
741 #ifdef ICL_KERNEL_PROXY
742 struct ctl_iscsi_listen_params {
747 struct sockaddr *addr;
753 struct ctl_iscsi_accept_params {
756 struct sockaddr *initiator_addr;
757 socklen_t initiator_addrlen;
761 struct ctl_iscsi_send_params {
766 size_t data_segment_len;
771 struct ctl_iscsi_receive_params {
776 size_t data_segment_len;
781 #endif /* ICL_KERNEL_PROXY */
783 union ctl_iscsi_data {
784 struct ctl_iscsi_handoff_params handoff;
785 struct ctl_iscsi_list_params list;
786 struct ctl_iscsi_logout_params logout;
787 struct ctl_iscsi_terminate_params terminate;
788 struct ctl_iscsi_limits_params limits;
789 #ifdef ICL_KERNEL_PROXY
790 struct ctl_iscsi_listen_params listen;
791 struct ctl_iscsi_accept_params accept;
792 struct ctl_iscsi_send_params send;
793 struct ctl_iscsi_receive_params receive;
800 * status: The status of the request. See above for the
801 * description of the values of this field.
803 * error_str: If the status indicates an error, this string will
804 * be filled in to describe the error.
807 ctl_iscsi_type type; /* passed to kernel */
808 union ctl_iscsi_data data; /* passed to kernel */
809 ctl_iscsi_status status; /* passed to userland */
810 char error_str[CTL_ERROR_STR_LEN];
811 /* passed to userland */
820 #define CTL_IO _IOWR(CTL_MINOR, 0x00, union ctl_io)
821 #define CTL_ENABLE_PORT _IOW(CTL_MINOR, 0x04, struct ctl_port_entry)
822 #define CTL_DISABLE_PORT _IOW(CTL_MINOR, 0x05, struct ctl_port_entry)
823 #define CTL_DELAY_IO _IOWR(CTL_MINOR, 0x10, struct ctl_io_delay_info)
824 #define CTL_GETSTATS _IOWR(CTL_MINOR, 0x15, struct ctl_stats)
825 #define CTL_ERROR_INJECT _IOWR(CTL_MINOR, 0x16, struct ctl_error_desc)
826 #define CTL_GET_OOA _IOWR(CTL_MINOR, 0x18, struct ctl_ooa)
827 #define CTL_DUMP_STRUCTS _IO(CTL_MINOR, 0x19)
828 #define CTL_LUN_REQ _IOWR(CTL_MINOR, 0x21, struct ctl_lun_req)
829 #define CTL_LUN_LIST _IOWR(CTL_MINOR, 0x22, struct ctl_lun_list)
830 #define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc)
831 #define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry)
832 #define CTL_ISCSI _IOWR(CTL_MINOR, 0x25, struct ctl_iscsi)
833 #define CTL_PORT_REQ _IOWR(CTL_MINOR, 0x26, struct ctl_req)
834 #define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x27, struct ctl_lun_list)
835 #define CTL_LUN_MAP _IOW(CTL_MINOR, 0x28, struct ctl_lun_map)
836 #define CTL_GET_LUN_STATS _IOWR(CTL_MINOR, 0x29, struct ctl_get_io_stats)
837 #define CTL_GET_PORT_STATS _IOWR(CTL_MINOR, 0x2a, struct ctl_get_io_stats)
839 #endif /* _CTL_IOCTL_H_ */