DHCP Client for WIZ820io(W5200)

Dependencies:   EthernetNetIf mbed

MyEthernetNetIf.h

Committer:
va009039
Date:
2012-04-10
Revision:
0:db4242c89949

File content as of revision 0:db4242c89949:

// 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