DHCP Client for WIZ820io(W5200)

Dependencies:   EthernetNetIf mbed

Revision:
0:db4242c89949
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MyEthernetNetIf.h	Tue Apr 10 03:38:22 2012 +0000
@@ -0,0 +1,24 @@
+// MyEthernetNetIf.h 2012/4/10
+#ifndef MYETHERNETNETIF_H
+#define MYETHERNETNETIF_H
+#include "w5100.h"
+#include "EthernetNetIf.h"
+#include "MyUDPSocket.h"
+
+class MyEthernetNetIf {
+    void hardware_setup();
+public:
+    MyEthernetNetIf(IpAddr ip, IpAddr netmask, IpAddr gateway, IpAddr dns);
+    MyEthernetNetIf();
+    IpAddr getDns() { return m_dns; }
+    EthernetErr setup(int timeout_ms = 15000);
+    IpAddr getIp() {return m_ip; } ;
+    IpAddr getDNS() {return m_dns; };
+private:
+    IpAddr m_ip;
+    IpAddr m_netmask;
+    IpAddr m_gateway;
+    IpAddr m_dns;
+    bool m_useDhcp;
+};
+#endif // MYETHERNETNETIF_H