summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_auth.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-08-04 09:09:27 +0200
committerIngo Molnar <mingo@elte.hu>2011-08-04 09:09:27 +0200
commitd7619fe39d9769b4d4545cc511c891deea18ae08 (patch)
tree0a902533414001075b2245825e145cc2e35ce985 /drivers/target/iscsi/iscsi_target_auth.h
parent9ea71503a8ed9184d2d0b8ccc4d269d05f7940ae (diff)
parented8f37370d83e695c0a4fa5d5fc7a83ecb947526 (diff)
Merge branch 'linus' into core/urgent
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_auth.h')
-rw-r--r--drivers/target/iscsi/iscsi_target_auth.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_auth.h b/drivers/target/iscsi/iscsi_target_auth.h
new file mode 100644
index 00000000000..2f463c09626
--- /dev/null
+++ b/drivers/target/iscsi/iscsi_target_auth.h
@@ -0,0 +1,31 @@
+#ifndef _ISCSI_CHAP_H_
+#define _ISCSI_CHAP_H_
+
+#define CHAP_DIGEST_MD5 5
+#define CHAP_DIGEST_SHA 6
+
+#define CHAP_CHALLENGE_LENGTH 16
+#define CHAP_CHALLENGE_STR_LEN 4096
+#define MAX_RESPONSE_LENGTH 64 /* sufficient for MD5 */
+#define MAX_CHAP_N_SIZE 512
+
+#define MD5_SIGNATURE_SIZE 16 /* 16 bytes in a MD5 message digest */
+
+#define CHAP_STAGE_CLIENT_A 1
+#define CHAP_STAGE_SERVER_AIC 2
+#define CHAP_STAGE_CLIENT_NR 3
+#define CHAP_STAGE_CLIENT_NRIC 4
+#define CHAP_STAGE_SERVER_NR 5
+
+extern u32 chap_main_loop(struct iscsi_conn *, struct iscsi_node_auth *, char *, char *,
+ int *, int *);
+
+struct iscsi_chap {
+ unsigned char digest_type;
+ unsigned char id;
+ unsigned char challenge[CHAP_CHALLENGE_LENGTH];
+ unsigned int authenticate_target;
+ unsigned int chap_state;
+} ____cacheline_aligned;
+
+#endif /*** _ISCSI_CHAP_H_ ***/