summaryrefslogtreecommitdiffstats
path: root/src/tests/ftptest.c
diff options
context:
space:
mode:
authorMichael Brown2006-12-05 20:07:47 +0100
committerMichael Brown2006-12-05 20:07:47 +0100
commit89bcb57201d4175b08344eaf0ee4268abd7e8092 (patch)
tree372ad6b3dbccb1ab08893e7ba999b58672882d0d /src/tests/ftptest.c
parentThe VPD engine is broken and can't actually handle placing VPD (diff)
downloadipxe-89bcb57201d4175b08344eaf0ee4268abd7e8092.tar.gz
ipxe-89bcb57201d4175b08344eaf0ee4268abd7e8092.tar.xz
ipxe-89bcb57201d4175b08344eaf0ee4268abd7e8092.zip
Update ftp.c to work with Nikhil's TCP stack.
Remove the now-totally-obsolete sockaddr_in field from tcp.h.
Diffstat (limited to 'src/tests/ftptest.c')
-rw-r--r--src/tests/ftptest.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tests/ftptest.c b/src/tests/ftptest.c
index f8208de7..6b0002fb 100644
--- a/src/tests/ftptest.c
+++ b/src/tests/ftptest.c
@@ -22,15 +22,14 @@ static void test_ftp_callback ( char *data, size_t len ) {
}
}
-void test_ftp ( struct in_addr server, const char *filename ) {
+void test_ftp ( struct sockaddr_tcpip *server, const char *filename ) {
struct ftp_request ftp;
int rc;
- printf ( "FTP fetching %s:%s\n", inet_ntoa ( server ), filename );
+ printf ( "FTP fetching %s\n", filename );
memset ( &ftp, 0, sizeof ( ftp ) );
- ftp.tcp.sin.sin_addr.s_addr = server.s_addr;
- ftp.tcp.sin.sin_port = htons ( FTP_PORT );
+ memcpy ( &ftp.tcp.peer, server, sizeof ( ftp.tcp.peer ) );
ftp.filename = filename;
ftp.callback = test_ftp_callback;