summaryrefslogtreecommitdiffstats
path: root/src/tests/hellotest.c
diff options
context:
space:
mode:
authorMichael Brown2006-08-07 20:49:10 +0200
committerMichael Brown2006-08-07 20:49:10 +0200
commit010288577f8b98ee87a37aade9dc521c618fc8ef (patch)
tree25383cbc9b1870d761ffc3dab84aa89c71ee6572 /src/tests/hellotest.c
parentFix routing when a gateway exists. This should probably be split into (diff)
downloadipxe-010288577f8b98ee87a37aade9dc521c618fc8ef.tar.gz
ipxe-010288577f8b98ee87a37aade9dc521c618fc8ef.tar.xz
ipxe-010288577f8b98ee87a37aade9dc521c618fc8ef.zip
Add very, very quick and dirty hello world test
Diffstat (limited to 'src/tests/hellotest.c')
-rw-r--r--src/tests/hellotest.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tests/hellotest.c b/src/tests/hellotest.c
index e38856ee8..4565f13a5 100644
--- a/src/tests/hellotest.c
+++ b/src/tests/hellotest.c
@@ -22,15 +22,17 @@ static void test_hello_callback ( char *data, size_t len ) {
}
}
-void test_hello ( struct sockaddr_in *server, const char *message ) {
+void test_hello ( struct sockaddr_tcpip *server, const char *message ) {
+ /* Quick and dirty hack */
+ struct sockaddr_in *sin = ( struct sockaddr_in * ) server;
struct hello_request hello;
int rc;
printf ( "Saying \"%s\" to %s:%d\n", message,
- inet_ntoa ( server->sin_addr ), ntohs ( server->sin_port ) );
+ inet_ntoa ( sin->sin_addr ), ntohs ( sin->sin_port ) );
memset ( &hello, 0, sizeof ( hello ) );
- hello.tcp.sin = *server;
+ memcpy ( &hello.tcp.peer, server, sizeof ( hello.tcp.peer ) );
hello.message = message;
hello.callback = test_hello_callback;