Add unidirectional chap support so we can authenticate to the target.

Make the login phase more "intelligent" so we can iterate over login
pdus until we have reached full feature phase

Add a new helper functions to parse a iscsi url and break it down
into elements in a structure

Update iscsi-inq to allow CHAP authentication
This commit is contained in:
Ronnie Sahlberg
2010-12-22 22:23:55 +11:00
parent d53b882682
commit 40abe849b0
5 changed files with 703 additions and 123 deletions

View File

@@ -21,6 +21,8 @@ struct sockaddr;
struct iscsi_url {
const char *portal;
const char *target;
const char *user;
const char *passwd;
int lun;
};
@@ -134,6 +136,12 @@ enum iscsi_header_digest {
int iscsi_set_header_digest(struct iscsi_context *iscsi,
enum iscsi_header_digest header_digest);
/*
* Specify the username and password to use for chap authentication
*/
int iscsi_set_initiator_username_pwd(struct iscsi_context *iscsi,
const char *user,
const char *passwd);
/*
* check if the context is logged in or not