From 4696a773deab8c71a30e1637b06b202fc0773c3b Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Mon, 31 Aug 2020 15:20:08 +0200 Subject: [PATCH] examples / tests: pull in sock API not implementation --- Makefile.dep | 2 +- examples/asymcute_mqttsn/Makefile | 1 - examples/dtls-echo/Makefile | 2 +- examples/dtls-sock/Makefile | 9 ++++++--- examples/dtls-wolfssl/Makefile | 2 +- examples/emcute_mqttsn/Makefile | 3 +-- examples/nanocoap_server/Makefile | 3 +-- examples/paho-mqtt/Makefile | 9 +++++---- examples/posix_select/Makefile | 3 +-- examples/posix_sockets/Makefile | 3 +-- examples/suit_update/Makefile | 3 +-- examples/wakaama/Makefile | 2 +- tests/emcute/Makefile | 2 +- tests/gnrc_ipv6_nib_dns/Makefile | 2 +- tests/gnrc_sock_async_event/Makefile | 5 ++--- tests/gnrc_sock_dns/Makefile | 1 - tests/gnrc_sock_ip/Makefile | 2 +- tests/gnrc_sock_neterr/Makefile | 2 +- tests/gnrc_sock_udp/Makefile | 2 +- tests/lwip/Makefile | 10 ++++++---- tests/lwip_sock_ip/Makefile | 2 +- tests/lwip_sock_tcp/Makefile | 2 +- tests/lwip_sock_udp/Makefile | 2 +- tests/nanocoap_cli/Makefile | 3 +-- tests/pkg_libcoap/Makefile | 2 +- tests/pkg_microcoap/Makefile | 6 ++---- tests/pkg_tinydtls_sock_async/Makefile | 6 +++--- tests/riotboot_flashwrite/Makefile | 3 +-- tests/sntp/Makefile | 1 - 29 files changed, 44 insertions(+), 51 deletions(-) diff --git a/Makefile.dep b/Makefile.dep index ab10c78330..edb1e2b1eb 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -903,7 +903,7 @@ endif ifneq (,$(filter gcoap,$(USEMODULE))) USEMODULE += nanocoap - USEMODULE += gnrc_sock_async + USEMODULE += sock_async USEMODULE += sock_async_event USEMODULE += sock_util USEMODULE += event_callback diff --git a/examples/asymcute_mqttsn/Makefile b/examples/asymcute_mqttsn/Makefile index bb2fffa8a1..39c14ec26f 100644 --- a/examples/asymcute_mqttsn/Makefile +++ b/examples/asymcute_mqttsn/Makefile @@ -12,7 +12,6 @@ RIOTBASE ?= $(CURDIR)/../.. USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP -USEMODULE += gnrc_sock_udp USEMODULE += gnrc_ipv6_default # Include MQTT-SN USEMODULE += asymcute diff --git a/examples/dtls-echo/Makefile b/examples/dtls-echo/Makefile index d2c4b3adac..476f26e9b1 100644 --- a/examples/dtls-echo/Makefile +++ b/examples/dtls-echo/Makefile @@ -13,7 +13,7 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Add also the shell, some shell commands USEMODULE += shell diff --git a/examples/dtls-sock/Makefile b/examples/dtls-sock/Makefile index ea8f815a70..8861948702 100644 --- a/examples/dtls-sock/Makefile +++ b/examples/dtls-sock/Makefile @@ -16,10 +16,13 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_sock_udp -# Use tinydtls for sock_dtls -USEMODULE += tinydtls_sock_dtls +# Specify DTLS implementation +USEPKG += tinydtls + +# Pull in sock APIs +USEMODULE += sock_dtls +USEMODULE += sock_udp # tinydtls needs crypto secure PRNG USEMODULE += prng_sha1prng diff --git a/examples/dtls-wolfssl/Makefile b/examples/dtls-wolfssl/Makefile index ed68d71694..e9ff184f20 100644 --- a/examples/dtls-wolfssl/Makefile +++ b/examples/dtls-wolfssl/Makefile @@ -13,7 +13,7 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Add also the shell, some shell commands USEMODULE += shell diff --git a/examples/emcute_mqttsn/Makefile b/examples/emcute_mqttsn/Makefile index 50f922c485..11d2690138 100644 --- a/examples/emcute_mqttsn/Makefile +++ b/examples/emcute_mqttsn/Makefile @@ -11,8 +11,7 @@ RIOTBASE ?= $(CURDIR)/../.. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif -# Specify the mandatory networking modules for IPv6 and UDP -USEMODULE += gnrc_sock_udp +# Specify the mandatory networking modules for IPv6 USEMODULE += gnrc_ipv6_default # Include MQTT-SN USEMODULE += emcute diff --git a/examples/nanocoap_server/Makefile b/examples/nanocoap_server/Makefile index b77fd6b4a9..e26387eed4 100644 --- a/examples/nanocoap_server/Makefile +++ b/examples/nanocoap_server/Makefile @@ -13,8 +13,7 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_udp -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Additional networking modules that can be dropped if not needed USEMODULE += gnrc_icmpv6_echo diff --git a/examples/paho-mqtt/Makefile b/examples/paho-mqtt/Makefile index 31907c9777..8dbbed5443 100644 --- a/examples/paho-mqtt/Makefile +++ b/examples/paho-mqtt/Makefile @@ -31,7 +31,6 @@ ifneq (0, $(LWIP_IPV4)) USEMODULE += lwip_arp USEMODULE += lwip_ipv4 USEMODULE += lwip_dhcp_auto - USEMODULE += lwip_sock_udp CFLAGS += -DETHARP_SUPPORT_STATIC_ENTRIES=1 LWIP_IPV6 ?= 0 else @@ -44,11 +43,13 @@ ifneq (0, $(LWIP_IPV6)) endif USEMODULE += lwip_netdev -USEMODULE += lwip lwip_sock_ip -USEMODULE += lwip_tcp lwip_sock_tcp -USEMODULE += lwip_sock_async +USEMODULE += lwip USEMODULE += sock_async_event +USEMODULE += sock_ip +USEMODULE += sock_udp +USEMODULE += sock_tcp + #### include $(RIOTBASE)/Makefile.include diff --git a/examples/posix_select/Makefile b/examples/posix_select/Makefile index 485ce451a8..1d8ba60379 100644 --- a/examples/posix_select/Makefile +++ b/examples/posix_select/Makefile @@ -14,8 +14,7 @@ USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for socket communication via UDP USEMODULE += gnrc_ipv6_default # Add stack-specific implementations of sock modules -USEMODULE += gnrc_sock_async -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Add POSIX modules USEMODULE += posix_select USEMODULE += posix_sockets diff --git a/examples/posix_sockets/Makefile b/examples/posix_sockets/Makefile index 32df2c6c63..b5cfaa243b 100644 --- a/examples/posix_sockets/Makefile +++ b/examples/posix_sockets/Makefile @@ -13,8 +13,7 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for socket communication via UDP USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_udp -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEMODULE += posix_sockets USEMODULE += posix_time USEMODULE += posix_inet diff --git a/examples/suit_update/Makefile b/examples/suit_update/Makefile index 64dda9e0c4..bceb0dec0f 100644 --- a/examples/suit_update/Makefile +++ b/examples/suit_update/Makefile @@ -25,8 +25,7 @@ endif USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_router_default -USEMODULE += gnrc_udp -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Additional networking modules that can be dropped if not needed USEMODULE += gnrc_icmpv6_echo diff --git a/examples/wakaama/Makefile b/examples/wakaama/Makefile index f5111cc0bd..f9e5adac52 100644 --- a/examples/wakaama/Makefile +++ b/examples/wakaama/Makefile @@ -15,7 +15,7 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules USEMODULE += gnrc_ipv6_router_default -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Additional networking modules that can be dropped if not needed USEMODULE += gnrc_icmpv6_echo # Add also the shell, some shell commands diff --git a/tests/emcute/Makefile b/tests/emcute/Makefile index 83c420b8b6..e0ff06b97a 100644 --- a/tests/emcute/Makefile +++ b/tests/emcute/Makefile @@ -16,7 +16,7 @@ else endif USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEMODULE += gnrc_netif_single # Only one interface used and it makes # shell commands easier USEMODULE += emcute diff --git a/tests/gnrc_ipv6_nib_dns/Makefile b/tests/gnrc_ipv6_nib_dns/Makefile index fa9b92b14b..e06cd03456 100644 --- a/tests/gnrc_ipv6_nib_dns/Makefile +++ b/tests/gnrc_ipv6_nib_dns/Makefile @@ -5,7 +5,7 @@ RIOTBASE ?= $(CURDIR)/../.. export TAP ?= tap0 USEMODULE += sock_dns -USEMODULE += gnrc_sock_udp + USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_ipv6_nib_dns # use Ethernet as link-layer protocol diff --git a/tests/gnrc_sock_async_event/Makefile b/tests/gnrc_sock_async_event/Makefile index 9727702f3f..91f788e5f3 100644 --- a/tests/gnrc_sock_async_event/Makefile +++ b/tests/gnrc_sock_async_event/Makefile @@ -3,10 +3,9 @@ include ../Makefile.tests_common USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_ipv6_hdr USEMODULE += gnrc_pktdump -USEMODULE += gnrc_sock_async -USEMODULE += gnrc_sock_ip -USEMODULE += gnrc_sock_udp USEMODULE += sock_async_event +USEMODULE += sock_ip +USEMODULE += sock_udp USEMODULE += od USEMODULE += xtimer diff --git a/tests/gnrc_sock_dns/Makefile b/tests/gnrc_sock_dns/Makefile index 2cabf4bb5a..bbc06517e5 100644 --- a/tests/gnrc_sock_dns/Makefile +++ b/tests/gnrc_sock_dns/Makefile @@ -5,7 +5,6 @@ RIOTBASE ?= $(CURDIR)/../.. export TAP ?= tap0 USEMODULE += sock_dns -USEMODULE += gnrc_sock_udp USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_ipv6_nib_dns USEMODULE += gnrc_netif_single # Only one interface used and it makes diff --git a/tests/gnrc_sock_ip/Makefile b/tests/gnrc_sock_ip/Makefile index 54f72d9453..bcbd4b6f2b 100644 --- a/tests/gnrc_sock_ip/Makefile +++ b/tests/gnrc_sock_ip/Makefile @@ -1,6 +1,6 @@ include ../Makefile.tests_common -USEMODULE += gnrc_sock_ip +USEMODULE += sock_ip USEMODULE += gnrc_ipv6 USEMODULE += ps diff --git a/tests/gnrc_sock_neterr/Makefile b/tests/gnrc_sock_neterr/Makefile index 04c518e298..df661bf892 100644 --- a/tests/gnrc_sock_neterr/Makefile +++ b/tests/gnrc_sock_neterr/Makefile @@ -3,7 +3,7 @@ include ../Makefile.tests_common USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_neterr -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEMODULE += od USEMODULE += xtimer diff --git a/tests/gnrc_sock_udp/Makefile b/tests/gnrc_sock_udp/Makefile index 1f857c780c..9e75a62229 100644 --- a/tests/gnrc_sock_udp/Makefile +++ b/tests/gnrc_sock_udp/Makefile @@ -1,7 +1,7 @@ include ../Makefile.tests_common USEMODULE += gnrc_sock_check_reuse -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEMODULE += gnrc_ipv6 USEMODULE += ps diff --git a/tests/lwip/Makefile b/tests/lwip/Makefile index 3ca1fe2d5e..c7b2472561 100644 --- a/tests/lwip/Makefile +++ b/tests/lwip/Makefile @@ -21,11 +21,13 @@ ifneq (0, $(LWIP_IPV6)) endif # including lwip_ipv6_mld would currently break this test on at86rf2xx radios -USEMODULE += lwip lwip_sock_ip lwip_netdev -USEMODULE += lwip_udp lwip_sock_udp -USEMODULE += lwip_tcp lwip_sock_tcp -USEMODULE += lwip_sock_async +USEMODULE += lwip lwip_netdev +USEMODULE += lwip_udp +USEMODULE += lwip_tcp USEMODULE += sock_async_event +USEMODULE += sock_ip +USEMODULE += sock_tcp +USEMODULE += sock_udp USEMODULE += sock_util USEMODULE += shell USEMODULE += shell_commands diff --git a/tests/lwip_sock_ip/Makefile b/tests/lwip_sock_ip/Makefile index 4a7410dc46..caed6075a9 100644 --- a/tests/lwip_sock_ip/Makefile +++ b/tests/lwip_sock_ip/Makefile @@ -20,10 +20,10 @@ endif USEMODULE += inet_csum USEMODULE += l2util USEMODULE += lwip_netdev -USEMODULE += lwip_sock_ip USEMODULE += netdev_eth USEMODULE += netdev_test USEMODULE += ps +USEMODULE += sock_ip DISABLE_MODULE += auto_init_lwip diff --git a/tests/lwip_sock_tcp/Makefile b/tests/lwip_sock_tcp/Makefile index 77f741bc08..b228a9897d 100644 --- a/tests/lwip_sock_tcp/Makefile +++ b/tests/lwip_sock_tcp/Makefile @@ -19,10 +19,10 @@ endif USEMODULE += inet_csum USEMODULE += lwip_netdev -USEMODULE += lwip_sock_tcp USEMODULE += netdev_eth USEMODULE += netdev_test USEMODULE += ps +USEMODULE += sock_tcp DISABLE_MODULE += auto_init_lwip diff --git a/tests/lwip_sock_udp/Makefile b/tests/lwip_sock_udp/Makefile index eb256cc9d6..399ad0b533 100644 --- a/tests/lwip_sock_udp/Makefile +++ b/tests/lwip_sock_udp/Makefile @@ -20,10 +20,10 @@ endif USEMODULE += inet_csum USEMODULE += l2util USEMODULE += lwip_netdev -USEMODULE += lwip_sock_udp USEMODULE += netdev_eth USEMODULE += netdev_test USEMODULE += ps +USEMODULE += sock_udp DISABLE_MODULE += auto_init_lwip diff --git a/tests/nanocoap_cli/Makefile b/tests/nanocoap_cli/Makefile index 5af784922e..8923a4ad25 100644 --- a/tests/nanocoap_cli/Makefile +++ b/tests/nanocoap_cli/Makefile @@ -6,8 +6,7 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_udp -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEMODULE += nanocoap_sock diff --git a/tests/pkg_libcoap/Makefile b/tests/pkg_libcoap/Makefile index 811ad79f71..c177e6888e 100644 --- a/tests/pkg_libcoap/Makefile +++ b/tests/pkg_libcoap/Makefile @@ -1,7 +1,7 @@ include ../Makefile.tests_common USEMODULE += gnrc_ipv6 -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEPKG += libcoap include $(RIOTBASE)/Makefile.include diff --git a/tests/pkg_microcoap/Makefile b/tests/pkg_microcoap/Makefile index 251f8b501a..cf68a0f7f6 100644 --- a/tests/pkg_microcoap/Makefile +++ b/tests/pkg_microcoap/Makefile @@ -4,14 +4,12 @@ include ../Makefile.tests_common # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif -# Specify the mandatory networking modules for IPv6 and UDP +# Specify the mandatory networking modules for IPv6 USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_udp # Additional networking modules that can be dropped if not needed USEMODULE += gnrc_icmpv6_echo -# -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp USEPKG += microcoap diff --git a/tests/pkg_tinydtls_sock_async/Makefile b/tests/pkg_tinydtls_sock_async/Makefile index fb057a9a9b..2cd7a7294f 100644 --- a/tests/pkg_tinydtls_sock_async/Makefile +++ b/tests/pkg_tinydtls_sock_async/Makefile @@ -9,14 +9,14 @@ USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_default -USEMODULE += gnrc_sock_async -USEMODULE += gnrc_sock_udp USEMODULE += sock_async_event +USEMODULE += sock_dtls +USEMODULE += sock_udp USEMODULE += event_thread_medium USEMODULE += event_timeout # Use tinydtls for sock_dtls -USEMODULE += tinydtls_sock_dtls +USEPKG += tinydtls # tinydtls needs crypto secure PRNG USEMODULE += prng_sha1prng diff --git a/tests/riotboot_flashwrite/Makefile b/tests/riotboot_flashwrite/Makefile index 03ca3a6ca2..d6dfebf079 100644 --- a/tests/riotboot_flashwrite/Makefile +++ b/tests/riotboot_flashwrite/Makefile @@ -9,8 +9,7 @@ USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_ipv6_router_default -USEMODULE += gnrc_udp -USEMODULE += gnrc_sock_udp +USEMODULE += sock_udp # Additional networking modules that can be dropped if not needed USEMODULE += gnrc_icmpv6_echo diff --git a/tests/sntp/Makefile b/tests/sntp/Makefile index 968c2ee6b6..a133698536 100644 --- a/tests/sntp/Makefile +++ b/tests/sntp/Makefile @@ -1,7 +1,6 @@ include ../Makefile.tests_common USEMODULE += sntp -USEMODULE += gnrc_sock_udp USEMODULE += gnrc_ipv6_default USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_netdev_default