summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2012-03-06 03:31:29 -0600
committerMike Christie <michaelc@cs.wisc.edu>2012-03-06 05:09:25 -0600
commitd94720a7f3f5c53d702a727ab8845ac9df6fd22b (patch)
tree01ec458d39297b84b6eccc4e9c6cc39faef16a6a /include
parentd0cfc05a1845b4d785e8c09c5c73044598dad965 (diff)
downloadopen-iscsi-d94720a7f3f5c53d702a727ab8845ac9df6fd22b.tar.gz
iscsi tools: Add support to display a host's CHAP list and delete
Drivers like qla4xxx store the CHAP info in a table that is managed at the host level. This patch allows you to see and delete the CHAP entries on the host. Patch from: Nilesh Javali <nilesh.javali@qlogic.com> [lots of bug fixes by Mike Christie] Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Diffstat (limited to 'include')
-rw-r--r--include/iscsi_err.h2
-rw-r--r--include/iscsi_if.h32
2 files changed, 33 insertions, 1 deletions
diff --git a/include/iscsi_err.h b/include/iscsi_err.h
index e038f1c..aabea4e 100644
--- a/include/iscsi_err.h
+++ b/include/iscsi_err.h
@@ -60,6 +60,8 @@ enum {
ISCSI_ERR_ISNS_REG_FAILED = 26,
/* operation not supported */
ISCSI_ERR_OP_NOT_SUPP = 27,
+ /* device or resource in use */
+ ISCSI_ERR_BUSY = 28,
/* Always last. Indicates end of error code space */
ISCSI_MAX_ERR_VAL,
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 26182aa..ce9ba15 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -66,8 +66,10 @@ enum iscsi_uevent_e {
ISCSI_UEVENT_PATH_UPDATE = UEVENT_BASE + 20,
ISCSI_UEVENT_SET_IFACE_PARAMS = UEVENT_BASE + 21,
ISCSI_UEVENT_PING = UEVENT_BASE + 22,
+ ISCSI_UEVENT_GET_CHAP = UEVENT_BASE + 23,
+ ISCSI_UEVENT_DELETE_CHAP = UEVENT_BASE + 24,
- ISCSI_UEVENT_MAX = ISCSI_UEVENT_PING,
+ ISCSI_UEVENT_MAX = ISCSI_UEVENT_DELETE_CHAP,
/* up events */
ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1,
@@ -205,6 +207,18 @@ struct iscsi_uevent {
uint32_t pid; /* unique ping id associated
with each ping request */
} iscsi_ping;
+ struct msg_get_chap {
+ uint32_t host_no;
+ uint32_t num_entries; /* number of CHAP entries
+ * on request, number of
+ * valid CHAP entries on
+ * response */
+ uint16_t chap_tbl_idx;
+ } get_chap;
+ struct msg_delete_chap {
+ uint32_t host_no;
+ uint16_t chap_tbl_idx;
+ } delete_chap;
} u;
union {
/* messages k -> u */
@@ -583,4 +597,20 @@ struct iscsi_stats {
__attribute__ ((aligned (sizeof(uint64_t))));
};
+enum chap_type_e {
+ CHAP_TYPE_OUT,
+ CHAP_TYPE_IN,
+};
+
+#define ISCSI_CHAP_AUTH_NAME_MAX_LEN 256
+#define ISCSI_CHAP_AUTH_SECRET_MAX_LEN 256
+
+struct iscsi_chap_rec {
+ uint16_t chap_tbl_idx;
+ enum chap_type_e chap_type;
+ char username[ISCSI_CHAP_AUTH_NAME_MAX_LEN];
+ uint8_t password[ISCSI_CHAP_AUTH_SECRET_MAX_LEN];
+ uint8_t password_length;
+};
+
#endif