We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb6d5ad commit f76ec4fCopy full SHA for f76ec4f
libraries/DNSServer/src/DNSServer.cpp
@@ -2,6 +2,12 @@
2
#include <lwip/def.h>
3
#include <Arduino.h>
4
5
+// #define DEBUG_ESP_DNS
6
+#ifdef DEBUG_ESP_PORT
7
+#define DEBUG_OUTPUT DEBUG_ESP_PORT
8
+#else
9
+#define DEBUG_OUTPUT Serial
10
+#endif
11
12
DNSServer::DNSServer()
13
{
@@ -184,6 +190,11 @@ void DNSServer::replyWithIP()
184
190
_udp.write((unsigned char*) &answerIPv4, 2 );
185
191
_udp.write(_resolvedIP, sizeof(_resolvedIP)); // The IP address to return
186
192
_udp.endPacket();
193
+
194
+ #ifdef DEBUG_ESP_DNS
195
+ DEBUG_OUTPUT.printf("DNS responds: %s for %s\n",
196
+ IPAddress(_resolvedIP).toString().c_str(), getDomainNameWithoutWwwPrefix().c_str() );
197
+ #endif
187
198
}
188
199
189
200
void DNSServer::replyWithCustomCode()
0 commit comments