Skip to content

Commit

Permalink
examples/gcoap_dtls: add IPv4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikVE committed Mar 25, 2022
1 parent a475c3c commit 88741d2
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions examples/gcoap_dtls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,36 @@ RIOTBASE ?= $(CURDIR)/../..
USEMODULE += netdev_default

# use GNRC by default
LWIP ?= 0
LWIP_IPV4 ?= 0
LWIP_IPV6 ?= 0

ifeq (0,$(LWIP))
ifeq (,$(filter 1, $(LWIP_IPV4) $(LWIP_IPV6)))
USEMODULE += auto_init_gnrc_netif
# Specify the mandatory networking modules
USEMODULE += gnrc_ipv6_default
# Additional networking modules that can be dropped if not needed
USEMODULE += gnrc_icmpv6_echo
else
USEMODULE += lwip_ipv6
USEMODULE += lwip_netdev

ifneq (0,$(LWIP_IPV4))
USEMODULE += ipv4_addr

USEMODULE += lwip_arp
USEMODULE += lwip_ipv4
USEMODULE += lwip_dhcp_auto
CFLAGS += -DETHARP_SUPPORT_STATIC_ENTRIES=1

# not included when using IPv4-only, but required by CoAP
USEMODULE += random
endif

ifneq (0,$(LWIP_IPV6))
USEMODULE += ipv6_addr

USEMODULE += lwip_ipv6
USEMODULE += lwip_ipv6_autoconfig
endif
endif

USEMODULE += gcoap
Expand Down

0 comments on commit 88741d2

Please sign in to comment.