summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMichael Brown2007-01-12 20:18:13 +0100
committerMichael Brown2007-01-12 20:18:13 +0100
commit497c3a5aad062cd8d896656b04b7386b0b6b7ee6 (patch)
treeecaad20a027a3984bf834edc11c5763dfbed5997 /src/tests
parentWhitespace fix (diff)
downloadipxe-497c3a5aad062cd8d896656b04b7386b0b6b7ee6.tar.gz
ipxe-497c3a5aad062cd8d896656b04b7386b0b6b7ee6.tar.xz
ipxe-497c3a5aad062cd8d896656b04b7386b0b6b7ee6.zip
Fixed HTTP
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/httptest.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/tests/httptest.c b/src/tests/httptest.c
deleted file mode 100644
index 7e08f079..00000000
--- a/src/tests/httptest.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <stdint.h>
-#include <string.h>
-#include <byteswap.h>
-#include <console.h>
-#include <vsprintf.h>
-#include <gpxe/async.h>
-#include <gpxe/http.h>
-#include <gpxe/ip.h>
-#include <gpxe/uaccess.h>
-#include "pxe.h"
-
-static void test_http_callback ( struct http_request *http, char *data, size_t len ) {
- userptr_t pxe_buffer = real_to_user ( 0, 0x7c00 );
- unsigned long offset = http->file_recv;
- http->file_recv += len;
- copy_to_user ( pxe_buffer, offset, data, len );
-}
-
-void test_http ( struct net_device *netdev, struct sockaddr_tcpip *server, const char *filename ) {
- struct http_request http;
- int rc;
-
- memset ( &http, 0, sizeof ( http ) );
- memcpy ( &http.server, server, sizeof ( http.server ) );
- http.filename = filename;
- http.callback = test_http_callback;
-
- rc = async_wait ( get_http ( &http ) );
- if ( rc ) {
- printf ( "HTTP fetch failed\n" );
- }
-
- printf ( "Attempting PXE boot\n" );
- pxe_netdev = netdev;
- rc = pxe_boot();
- printf ( "PXE NBP returned with status %04x\n", rc);
-}