summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
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