This is WIZnet Ethernet Interface using Hardware TCP/IP chip, W5500, W5200 and W5100. One of them can be selected by enabling it in wiznet.h.

Dependents:   bigthingRecfinal

Fork of WIZnet_Library by WIZnet

Committer:
jbkim
Date:
Thu May 08 03:57:58 2014 +0000
Revision:
0:b72d22e10709
1st commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jbkim 0:b72d22e10709 1 // DNSClient.h 2013/4/5
jbkim 0:b72d22e10709 2 #pragma once
jbkim 0:b72d22e10709 3
jbkim 0:b72d22e10709 4 #include "UDPSocket.h"
jbkim 0:b72d22e10709 5
jbkim 0:b72d22e10709 6 class DNSClient {
jbkim 0:b72d22e10709 7 public:
jbkim 0:b72d22e10709 8 DNSClient(const char* hostname = NULL);
jbkim 0:b72d22e10709 9 DNSClient(Endpoint* pHost);
jbkim 0:b72d22e10709 10 virtual ~DNSClient();
jbkim 0:b72d22e10709 11 bool lookup(const char* hostname = NULL);
jbkim 0:b72d22e10709 12 uint32_t ip;
jbkim 0:b72d22e10709 13 protected:
jbkim 0:b72d22e10709 14 void poll();
jbkim 0:b72d22e10709 15 void callback();
jbkim 0:b72d22e10709 16 int response(uint8_t buf[], int size);
jbkim 0:b72d22e10709 17 int query(uint8_t buf[], int size, const char* hostname);
jbkim 0:b72d22e10709 18 void resolve(const char* hostname);
jbkim 0:b72d22e10709 19 uint8_t m_id[2];
jbkim 0:b72d22e10709 20 Timer m_interval;
jbkim 0:b72d22e10709 21 int m_retry;
jbkim 0:b72d22e10709 22 const char* m_hostname;
jbkim 0:b72d22e10709 23 private:
jbkim 0:b72d22e10709 24 enum MyNetDnsState
jbkim 0:b72d22e10709 25 {
jbkim 0:b72d22e10709 26 MYNETDNS_START,
jbkim 0:b72d22e10709 27 MYNETDNS_PROCESSING, //Req has not completed
jbkim 0:b72d22e10709 28 MYNETDNS_NOTFOUND,
jbkim 0:b72d22e10709 29 MYNETDNS_ERROR,
jbkim 0:b72d22e10709 30 MYNETDNS_OK
jbkim 0:b72d22e10709 31 };
jbkim 0:b72d22e10709 32 MyNetDnsState m_state;
jbkim 0:b72d22e10709 33 UDPSocket *m_udp;
jbkim 0:b72d22e10709 34 };
jbkim 0:b72d22e10709 35