diff options
| author | Michael Brown | 2008-08-11 04:12:38 +0200 |
|---|---|---|
| committer | Michael Brown | 2008-08-11 04:43:12 +0200 |
| commit | 5d4839b577e6b6836bd4828ab3ab5d7d2f5ae779 (patch) | |
| tree | 523176f4313e45eb6bc3ff12de5e282505eb8be6 /src/include/gpxe/iscsi.h | |
| parent | [libc] Add missing __attribute__ (( format ( printf ) )) to ssnprintf() (diff) | |
| download | ipxe-5d4839b577e6b6836bd4828ab3ab5d7d2f5ae779.tar.gz ipxe-5d4839b577e6b6836bd4828ab3ab5d7d2f5ae779.tar.xz ipxe-5d4839b577e6b6836bd4828ab3ab5d7d2f5ae779.zip | |
[iSCSI] Add support for mutual CHAP
Allow initiator to verify target authentication using CHAP.
Diffstat (limited to 'src/include/gpxe/iscsi.h')
| -rw-r--r-- | src/include/gpxe/iscsi.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/include/gpxe/iscsi.h b/src/include/gpxe/iscsi.h index 5c446757b..fd96fdfe0 100644 --- a/src/include/gpxe/iscsi.h +++ b/src/include/gpxe/iscsi.h @@ -522,12 +522,25 @@ struct iscsi_session { */ int retry_count; - /** Username (if any) */ - char *username; - /** Password (if any) */ - char *password; - /** CHAP challenge/response */ - struct chap_challenge chap; + /** Initiator username (if any) */ + char *initiator_username; + /** Initiator password (if any) */ + char *initiator_password; + /** Target username (if any) */ + char *target_username; + /** Target password (if any) */ + char *target_password; + /** Target has authenticated acceptably */ + int target_auth_ok; + /** CHAP challenge (for target auth only) + * + * This is a block of random data; the first byte is used as + * the CHAP identifier (CHAP_I) and the remainder as the CHAP + * challenge (CHAP_C). + */ + unsigned char chap_challenge[17]; + /** CHAP response (used for both initiator and target auth) */ + struct chap_response chap; /** Target session identifying handle * @@ -642,8 +655,11 @@ struct iscsi_session { /** iSCSI session needs to send the CHAP response */ #define ISCSI_STATUS_STRINGS_CHAP_RESPONSE 0x0400 +/** iSCSI session needs to send the mutual CHAP challenge */ +#define ISCSI_STATUS_STRINGS_CHAP_CHALLENGE 0x0800 + /** iSCSI session needs to send the operational negotiation strings */ -#define ISCSI_STATUS_STRINGS_OPERATIONAL 0x0800 +#define ISCSI_STATUS_STRINGS_OPERATIONAL 0x1000 /** Mask for all iSCSI "needs to send" flags */ #define ISCSI_STATUS_STRINGS_MASK 0xff00 |
