This is Library using WIZnet Hardware TCP/IP chip, W5500 and WIZnet TCP/IP Offload Engine, W7500.
Dependents: HTTP_SDcard_file_server_WIZwiki-W7500 SSD1306_smart_watch TCPEchoServer-WIZwiki-W7500 httpServer-WIZwiki-W7500 ... more
Fork of WIZnetInterface by
This is WIZnet Ethernet Interface using Hardware TCP/IP chip, W5500 and TCP/IP Offload Engine, W7500.
[Users » embeddist » Code » WIZnetInterface](https://developer.mbed.org/users/embeddist/code/WIZnetInterface/) -> WIZnetInterface Lib will be released on [Team WIZnet](https://developer.mbed.org/teams/WIZnet/)
- WIZwiki_W7500 : /platforms/WIZwiki-W7500/
- WIZwiki_W7500P : /platforms/WIZwiki-W7500P/
- WIZwiki_W7500ECO : /platforms/WIZwiki-W7500ECO/
- W5500 Ethernet Shield : /components/W5500-Ethernet-Kit-for-IoT/
This library is an Ethernet Interface library port-based on [EthernetInterface](https://developer.mbed.org/users/mbed_official/code/EthernetInterface/docs/tip/).
For more detail, visit http://embeddist.blogspot.kr/2015/06/wiznetinterface-for-armmbed.html
Socket/DNSClient.h@20:bda61525ac71, 2015-07-22 (annotated)
- Committer:
- kaizen
- Date:
- Wed Jul 22 02:11:37 2015 +0000
- Revision:
- 20:bda61525ac71
- Parent:
- 0:6f28332c466f
Added init() function. This function is necessary when you want to HTTPServer library which release by mbed.; ; init() function is same with init(uint8_t *mac) function.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Soohwan Kim |
0:6f28332c466f | 1 | // DNSClient.h 2013/4/5 |
Soohwan Kim |
0:6f28332c466f | 2 | #pragma once |
Soohwan Kim |
0:6f28332c466f | 3 | |
Soohwan Kim |
0:6f28332c466f | 4 | #include "UDPSocket.h" |
Soohwan Kim |
0:6f28332c466f | 5 | |
Soohwan Kim |
0:6f28332c466f | 6 | class DNSClient { |
Soohwan Kim |
0:6f28332c466f | 7 | public: |
Soohwan Kim |
0:6f28332c466f | 8 | DNSClient(const char* hostname = NULL); |
Soohwan Kim |
0:6f28332c466f | 9 | DNSClient(Endpoint* pHost); |
Soohwan Kim |
0:6f28332c466f | 10 | virtual ~DNSClient(); |
Soohwan Kim |
0:6f28332c466f | 11 | bool lookup(const char* hostname = NULL); |
Soohwan Kim |
0:6f28332c466f | 12 | uint32_t ip; |
Soohwan Kim |
0:6f28332c466f | 13 | protected: |
Soohwan Kim |
0:6f28332c466f | 14 | void poll(); |
Soohwan Kim |
0:6f28332c466f | 15 | void callback(); |
Soohwan Kim |
0:6f28332c466f | 16 | int response(uint8_t buf[], int size); |
Soohwan Kim |
0:6f28332c466f | 17 | int query(uint8_t buf[], int size, const char* hostname); |
Soohwan Kim |
0:6f28332c466f | 18 | void resolve(const char* hostname); |
Soohwan Kim |
0:6f28332c466f | 19 | uint8_t m_id[2]; |
Soohwan Kim |
0:6f28332c466f | 20 | Timer m_interval; |
Soohwan Kim |
0:6f28332c466f | 21 | int m_retry; |
Soohwan Kim |
0:6f28332c466f | 22 | const char* m_hostname; |
Soohwan Kim |
0:6f28332c466f | 23 | private: |
Soohwan Kim |
0:6f28332c466f | 24 | enum MyNetDnsState |
Soohwan Kim |
0:6f28332c466f | 25 | { |
Soohwan Kim |
0:6f28332c466f | 26 | MYNETDNS_START, |
Soohwan Kim |
0:6f28332c466f | 27 | MYNETDNS_PROCESSING, //Req has not completed |
Soohwan Kim |
0:6f28332c466f | 28 | MYNETDNS_NOTFOUND, |
Soohwan Kim |
0:6f28332c466f | 29 | MYNETDNS_ERROR, |
Soohwan Kim |
0:6f28332c466f | 30 | MYNETDNS_OK |
Soohwan Kim |
0:6f28332c466f | 31 | }; |
Soohwan Kim |
0:6f28332c466f | 32 | MyNetDnsState m_state; |
Soohwan Kim |
0:6f28332c466f | 33 | UDPSocket *m_udp; |
Soohwan Kim |
0:6f28332c466f | 34 | }; |
Soohwan Kim |
0:6f28332c466f | 35 |