diff options
author | Michael Brown | 2006-11-28 01:29:02 +0100 |
---|---|---|
committer | Michael Brown | 2006-11-28 01:29:02 +0100 |
commit | 3f0b4d9ed8e419bfd0803e12004a1185be3c042a (patch) | |
tree | 5dcf1e12ca93b30c50a16b3cff2472ef500a8262 /src/tests | |
parent | Marked memcmp/strcmp as "pure" functions, to allow gcc to optimise (diff) | |
download | ipxe-3f0b4d9ed8e419bfd0803e12004a1185be3c042a.tar.gz ipxe-3f0b4d9ed8e419bfd0803e12004a1185be3c042a.tar.xz ipxe-3f0b4d9ed8e419bfd0803e12004a1185be3c042a.zip |
Updated to use asynchronous operation model for iSCSI requests
Added CHAP authentication
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/dhcptest.c | 5 | ||||
-rw-r--r-- | src/tests/iscsiboot.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/tests/dhcptest.c b/src/tests/dhcptest.c index 0a7ef074..be219b20 100644 --- a/src/tests/dhcptest.c +++ b/src/tests/dhcptest.c @@ -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 ) { diff --git a/src/tests/iscsiboot.c b/src/tests/iscsiboot.c index 489dcc46..59837564 100644 --- a/src/tests/iscsiboot.c +++ b/src/tests/iscsiboot.c @@ -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 ) { |