Enable the DNS resolution in examples by default #21116
Open
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
The example applications
gnrc_networking
andpaho-mqtt
are quite useful for testing and/or demonstrating RIOT's networking capabilities. For convenience the use of hostnames instead of IP addresses is preferable. So far, DNS resolution has been disabled by default. IMO it would be much nicer - particularly for newbies, if DNS resolution would work out of the box.The downside: approx. 3k more ROM and about 160 Bytes more RAM usage (on ARM-Cortex). So, I expect this PR to fail on some constrained platforms. However, I think for an example application this is still bearable.
Testing procedure
Test with native
dist/tools/tapsetup/tapsetup -c 1 -u eth0
).make -C example/paho-mqtt clean all term
.con test.mosquitto.org
Test on 6lowpan hardware
BOARD=nrf52840dk make -C example/paho-mqtt clean all flash term
.con test.mosquitto.org
Issues/PRs references
Another PR which configures a DNS resolver on the 6lbr example by default is about to come.