Updated to use asynchronous operation model for iSCSI requests

Added CHAP authentication
This commit is contained in:
Michael Brown
2006-11-28 00:29:02 +00:00
parent 82342e0b8f
commit 3f0b4d9ed8
5 changed files with 484 additions and 94 deletions

View File

@@ -16,6 +16,8 @@ static int test_dhcp_aoe_boot ( struct net_device *netdev,
static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) {
char *initiator_iqn = "iqn.1900-01.localdomain.localhost:initiator";
char *username = "joe";
char *password = "secret";
char *target_iqn;
union {
struct sockaddr_in sin;
@@ -33,7 +35,8 @@ static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) {
}
inet_aton ( iscsiname, &target.sin.sin_addr );
return test_iscsiboot ( initiator_iqn, &target.st, target_iqn, netdev );
return test_iscsiboot ( initiator_iqn, &target.st, target_iqn,
username, password, netdev );
}
static int test_dhcp_hello ( char *helloname ) {

View File

@@ -13,6 +13,8 @@ static struct iscsi_device test_iscsidev;
int test_iscsiboot ( const char *initiator_iqn,
struct sockaddr_tcpip *target,
const char *target_iqn,
const char *username,
const char *password,
struct net_device *netdev ) {
struct int13_drive drive;
int rc;
@@ -22,6 +24,8 @@ int test_iscsiboot ( const char *initiator_iqn,
sizeof ( test_iscsidev.iscsi.tcp.peer ) );
test_iscsidev.iscsi.initiator = initiator_iqn;
test_iscsidev.iscsi.target = target_iqn;
test_iscsidev.iscsi.username = username;
test_iscsidev.iscsi.password = password;
printf ( "Initialising %s\n", target_iqn );
if ( ( rc = init_iscsidev ( &test_iscsidev ) ) != 0 ) {