summaryrefslogtreecommitdiffstats
path: root/sys/cam/ctl/ctl_ioctl.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/ctl/ctl_ioctl.h')
-rw-r--r--sys/cam/ctl/ctl_ioctl.h42
1 files changed, 41 insertions, 1 deletions
diff --git a/sys/cam/ctl/ctl_ioctl.h b/sys/cam/ctl/ctl_ioctl.h
index 1144b75..06ff936 100644
--- a/sys/cam/ctl/ctl_ioctl.h
+++ b/sys/cam/ctl/ctl_ioctl.h
@@ -595,6 +595,45 @@ struct ctl_lun_list {
};
/*
+ * Port request interface:
+ *
+ * driver: This is required, and is NUL-terminated a string
+ * that is the name of the frontend, like "iscsi" .
+ *
+ * reqtype: The type of request, CTL_REQ_CREATE to create a
+ * port, CTL_REQ_REMOVE to delete a port.
+ *
+ * num_be_args: This is the number of frontend-specific arguments
+ * in the be_args array.
+ *
+ * be_args: This is an array of frontend-specific arguments.
+ * See above for a description of the fields in this
+ * structure.
+ *
+ * status: Status of the request.
+ *
+ * error_str: If the status is CTL_LUN_ERROR, this will
+ * contain a string describing the error.
+ *
+ * kern_be_args: For kernel use only.
+ */
+typedef enum {
+ CTL_REQ_CREATE,
+ CTL_REQ_REMOVE,
+ CTL_REQ_MODIFY,
+} ctl_req_type;
+
+struct ctl_req {
+ char driver[CTL_DRIVER_NAME_LEN];
+ ctl_req_type reqtype;
+ int num_args;
+ struct ctl_be_arg *args;
+ ctl_lun_status status;
+ char error_str[CTL_ERROR_STR_LEN];
+ struct ctl_be_arg *kern_args;
+};
+
+/*
* iSCSI status
*
* OK: Request completed successfully.
@@ -789,7 +828,8 @@ struct ctl_iscsi {
#define CTL_ERROR_INJECT_DELETE _IOW(CTL_MINOR, 0x23, struct ctl_error_desc)
#define CTL_SET_PORT_WWNS _IOW(CTL_MINOR, 0x24, struct ctl_port_entry)
#define CTL_ISCSI _IOWR(CTL_MINOR, 0x25, struct ctl_iscsi)
-#define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x26, struct ctl_lun_list)
+#define CTL_PORT_REQ _IOWR(CTL_MINOR, 0x26, struct ctl_req)
+#define CTL_PORT_LIST _IOWR(CTL_MINOR, 0x27, struct ctl_lun_list)
#endif /* _CTL_IOCTL_H_ */
OpenPOWER on IntegriCloud