Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
f76ec4f5
Unverified
Commit
f76ec4f5
authored
Oct 02, 2020
by
Shawn A
Committed by
GitHub
Oct 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds debugging to dnsserver (#1046)
parent
fb6d5ad2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
libraries/DNSServer/src/DNSServer.cpp
libraries/DNSServer/src/DNSServer.cpp
+11
-0
No files found.
libraries/DNSServer/src/DNSServer.cpp
View file @
f76ec4f5
...
...
@@ -2,6 +2,12 @@
#include <lwip/def.h>
#include <Arduino.h>
// #define DEBUG_ESP_DNS
#ifdef DEBUG_ESP_PORT
#define DEBUG_OUTPUT DEBUG_ESP_PORT
#else
#define DEBUG_OUTPUT Serial
#endif
DNSServer
::
DNSServer
()
{
...
...
@@ -184,6 +190,11 @@ void DNSServer::replyWithIP()
_udp
.
write
((
unsigned
char
*
)
&
answerIPv4
,
2
);
_udp
.
write
(
_resolvedIP
,
sizeof
(
_resolvedIP
));
// The IP address to return
_udp
.
endPacket
();
#ifdef DEBUG_ESP_DNS
DEBUG_OUTPUT
.
printf
(
"DNS responds: %s for %s
\n
"
,
IPAddress
(
_resolvedIP
).
toString
().
c_str
(),
getDomainNameWithoutWwwPrefix
().
c_str
()
);
#endif
}
void
DNSServer
::
replyWithCustomCode
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment