URL PARSER

Add a function to parse a common iscsi://... URL so we dont have to re
implement the same code in every application
This commit is contained in:
Ronnie Sahlberg
2010-12-22 18:40:46 +11:00
parent 3ef5a375dc
commit cf0ddbd0d9
3 changed files with 103 additions and 39 deletions

View File

@@ -18,6 +18,15 @@
struct iscsi_context;
struct sockaddr;
struct iscsi_url {
const char *portal;
const char *target;
int lun;
};
struct iscsi_url *iscsi_parse_full_url(struct iscsi_context *iscsi, const char *url);
void iscsi_destroy_url(struct iscsi_url *iscsi_url);
const char *iscsi_get_error(struct iscsi_context *iscsi);