URL encoded Targetnames
Assume target names are URL encoded with '%' as the special character. Any sequence of '%' followed by two bytes in the target name will be replaced with the byte that the second two bytes represent in hexadecimal. Example iqn.ronnie.test%3A1234 will be translated to iqn.ronnie.test:1234
This commit is contained in:
@@ -84,10 +84,10 @@ EXTERN int iscsi_set_timeout(struct iscsi_context *iscsi, int timeout);
|
||||
EXTERN int iscsi_set_tcp_keepalive(struct iscsi_context *iscsi, int idle, int count, int interval);
|
||||
|
||||
struct iscsi_url {
|
||||
char portal[MAX_STRING_SIZE+1];
|
||||
char target[MAX_STRING_SIZE+1];
|
||||
char user[MAX_STRING_SIZE+1];
|
||||
char passwd[MAX_STRING_SIZE+1];
|
||||
char portal[MAX_STRING_SIZE + 1];
|
||||
char target[MAX_STRING_SIZE + 1];
|
||||
char user[MAX_STRING_SIZE + 1];
|
||||
char passwd[MAX_STRING_SIZE + 1];
|
||||
int lun;
|
||||
struct iscsi_context *iscsi;
|
||||
};
|
||||
@@ -125,6 +125,10 @@ iscsi_set_initial_r2t(struct iscsi_context *iscsi, enum iscsi_initial_r2t initia
|
||||
* iSCSI URL format :
|
||||
* iscsi://[<username>[%<password>]@]<host>[:<port>]/<target-iqn>/<lun>
|
||||
*
|
||||
* Target names are url encoded with '%' as a special character.
|
||||
* Example:
|
||||
* "iqn.ronnie.test%3A1234" will be translated to "iqn.ronnie.test:1234"
|
||||
*
|
||||
* Function will return a pointer to an iscsi url structure if successful,
|
||||
* or it will return NULL and set iscsi_get_error() accrodingly if there was a problem
|
||||
* with the URL.
|
||||
|
||||
Reference in New Issue
Block a user