summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMichael Brown2006-07-19 19:49:31 +0200
committerMichael Brown2006-07-19 19:49:31 +0200
commit6d9d48537e9609eb22fd36a6078d3c2d4d6b60a1 (patch)
tree0c6d276e8f8b6b5354cd0dd1047d203b926fe53b /src/tests
parentProof of concept: transmit a single DHCPDISCOVER and dump out any (diff)
downloadipxe-6d9d48537e9609eb22fd36a6078d3c2d4d6b60a1.tar.gz
ipxe-6d9d48537e9609eb22fd36a6078d3c2d4d6b60a1.tar.xz
ipxe-6d9d48537e9609eb22fd36a6078d3c2d4d6b60a1.zip
Added some debug messages and DHCP test code
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/dhcptest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/dhcptest.c b/src/tests/dhcptest.c
new file mode 100644
index 000000000..d35e02c2e
--- /dev/null
+++ b/src/tests/dhcptest.c
@@ -0,0 +1,10 @@
+#include <string.h>
+#include <gpxe/dhcp.h>
+
+int test_dhcp ( struct net_device *netdev ) {
+ struct dhcp_session dhcp;
+
+ memset ( &dhcp, 0, sizeof ( dhcp ) );
+ dhcp.netdev = netdev;
+ return async_wait ( start_dhcp ( &dhcp ) );
+}