Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of WIZnetInterface by
DNSClient.h
00001 // DNSClient.h 2013/4/5 00002 #pragma once 00003 00004 #include "UDPSocket.h" 00005 00006 class DNSClient { 00007 public: 00008 DNSClient(const char* hostname = NULL); 00009 DNSClient(Endpoint* pHost); 00010 virtual ~DNSClient(); 00011 bool lookup(const char* hostname = NULL, uint32_t dnsServer = 0); 00012 uint32_t ip; 00013 protected: 00014 void poll(); 00015 void callback(); 00016 int response(uint8_t buf[], int size); 00017 int query(uint8_t buf[], int size, const char* hostname); 00018 void resolve(const char* hostname); 00019 uint8_t m_id[2]; 00020 Timer m_interval; 00021 int m_retry; 00022 private: 00023 enum MyNetDnsState 00024 { 00025 MYNETDNS_START, 00026 MYNETDNS_PROCESSING, //Req has not completed 00027 MYNETDNS_NOTFOUND, 00028 MYNETDNS_ERROR, 00029 MYNETDNS_OK 00030 }; 00031 MyNetDnsState m_state; 00032 UDPSocket *m_udp; 00033 const char* m_hostname; 00034 uint32_t m_dnsServer; 00035 }; 00036
Generated on Tue Jul 12 2022 17:13:34 by
1.7.2
