mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
a28f4383da
19024: pkg/paho-mqtt: add support for DNS r=aabadie a=benpicco <!-- The RIOT community cares a lot about code quality. Therefore, before describing what your contribution is about, we would like you to make sure that your modifications are compliant with the RIOT coding conventions, see https://github.com/RIOT-OS/RIOT/blob/master/CODING_CONVENTIONS.md. --> ### Contribution description This is pretty straightforward, we only need to hook up `dns_query()`. Since paho supports both IPv4 and IPv6 we use `AF_UNSPEC` in the query. This can however give us a A record if we only have IPv6 enabled, so translate the request based on what IP address module is enabled in `dns_query()`. ### Testing procedure connecting by name works ``` > con test.mosquitto.org 1883 mqtt_example: Connecting to MQTT Broker from test.mosquitto.org 1883 mqtt_example: Trying to connect to test.mosquitto.org , port: 1883 user: clientId: password: mqtt_example: Connection successfully ``` connecting by IP still works ``` > con 2001:41d0:1:925e::1 1883 mqtt_example: Connecting to MQTT Broker from 2001:41d0:1:925e::1 1883 mqtt_example: Trying to connect to 2001:41d0:1:925e::1 , port: 1883 user: clientId: password: mqtt_example: Connection successfully ``` <!-- Details steps to test your contribution: - which test/example to compile for which board and is there a 'test' command - how to know that it was not working/available in master - the expected success test output --> ### Issues/PRs references <!-- Examples: Fixes #1234. See also #5678. Depends on PR #9876. Please use keywords (e.g., fixes, resolve) with the links to the issues you resolved, this way they will be automatically closed when your pull request is merged. See https://help.github.com/articles/closing-issues-using-keywords/. --> Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de> |
||
---|---|---|
.. | ||
arduino_hello-world | ||
asymcute_mqttsn | ||
benchmark_udp | ||
bindist | ||
blinky | ||
ccn-lite-relay | ||
cord_ep | ||
cord_epsim | ||
cord_lc | ||
default | ||
dtls-echo | ||
dtls-sock | ||
dtls-wolfssl | ||
emcute_mqttsn | ||
filesystem | ||
gcoap | ||
gcoap_block_server | ||
gcoap_dtls | ||
gcoap_fileserver | ||
gnrc_border_router | ||
gnrc_lorawan | ||
gnrc_minimal | ||
gnrc_networking | ||
gnrc_networking_mac | ||
gnrc_networking_subnets | ||
hello-world | ||
ipc_pingpong | ||
javascript | ||
lorawan | ||
lua_basic | ||
lua_REPL | ||
micropython | ||
nanocoap_server | ||
ndn-ping | ||
nimble_gatt | ||
nimble_heart_rate_sensor | ||
nimble_scanner | ||
openthread | ||
paho-mqtt | ||
posix_select | ||
posix_sockets | ||
riot_and_cpp | ||
rust-gcoap | ||
rust-hello-world | ||
saul | ||
senml_saul | ||
skald_eddystone | ||
skald_ibeacon | ||
sniffer | ||
spectrum-scanner | ||
suit_update | ||
telnet_server | ||
thread_duel | ||
timer_periodic_wakeup | ||
twr_aloha | ||
usbus_minimal | ||
wakaama | ||
wasm | ||
.gitignore |