1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 10:12:45 +01:00

Merge pull request #16966 from yarrick/net_v6

sys/net: Add ipv4/ipv6 pseudomodules

to ease code unification
This commit is contained in:
Karl Fessel 2021-10-20 11:58:26 +02:00 committed by GitHub
commit c9f4d11c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 9 deletions

View File

@ -75,6 +75,8 @@ PSEUDOMODULES += heap_cmd
PSEUDOMODULES += i2c_scan
PSEUDOMODULES += ieee802154_security
PSEUDOMODULES += ieee802154_submac
PSEUDOMODULES += ipv4
PSEUDOMODULES += ipv6
PSEUDOMODULES += l2filter_blacklist
PSEUDOMODULES += l2filter_whitelist
PSEUDOMODULES += libstdcpp

View File

@ -27,7 +27,12 @@ ifneq (,$(filter lwip_ipv6_autoconfig lwip_ipv6_mld,$(USEMODULE)))
USEMODULE += lwip_ipv6
endif
ifneq (,$(filter lwip_ipv4,$(USEMODULE)))
USEMODULE += ipv4
endif
ifneq (,$(filter lwip_ipv6,$(USEMODULE)))
USEMODULE += ipv6
USEMODULE += random
endif

View File

@ -33,9 +33,6 @@ ifneq (,$(filter lwip_netif_init_devs,$(USEMODULE)))
DIRS += $(RIOTBASE)/pkg/lwip/init_devs
endif
ifneq (,$(filter lwip_sock,$(USEMODULE)))
ifneq (,$(filter lwip_ipv6,$(USEMODULE)))
CFLAGS += -DSOCK_HAS_IPV6
endif
DIRS += $(RIOTBASE)/pkg/lwip/contrib/sock
endif
ifneq (,$(filter lwip_sock_async,$(USEMODULE)))

View File

@ -30,6 +30,7 @@ ifneq (,$(filter openwsn_riotos,$(USEMODULE)))
endif
ifneq (,$(filter openwsn_ipv6,$(USEMODULE)))
USEMODULE += ipv6
DEFAULT_MODULE += openwsn_icmpv6_echo
endif

View File

@ -50,7 +50,6 @@ ifneq (,$(filter openwsn_cjoin,$(USEMODULE)))
endif
ifneq (,$(filter openwsn_sock%,$(USEMODULE)))
CFLAGS += -DSOCK_HAS_IPV6
ifneq (,$(filter openwsn_sock_async,$(USEMODULE)))
CFLAGS += -DSOCK_HAS_ASYNC
endif

View File

@ -8,9 +8,6 @@ endif
ifneq (,$(filter gnrc_sock,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/gnrc/sock/include
ifneq (,$(filter gnrc_ipv6,$(USEMODULE)))
CFLAGS += -DSOCK_HAS_IPV6
endif
endif
ifneq (,$(filter gnrc_sock_async,$(USEMODULE)))
@ -109,6 +106,12 @@ ifneq (,$(filter skald, $(USEMODULE)))
include $(RIOTBASE)/sys/net/ble/skald/Makefile.include
endif
ifneq (,$(filter sock sock_%,$(USEMODULE)))
ifneq (,$(filter ipv6,$(USEMODULE)))
CFLAGS += -DSOCK_HAS_IPV6
endif
endif
ifneq (,$(filter sock_async_event,$(USEMODULE)))
include $(RIOTBASE)/sys/net/sock/async/event/Makefile.include
endif

View File

@ -304,6 +304,10 @@ ifneq (,$(filter gnrc_rpl_srh,$(USEMODULE)))
USEMODULE += gnrc_ipv6_ext_rh
endif
ifneq (,$(filter gnrc_ipv6%,$(USEMODULE)))
USEMODULE += ipv6
endif
ifneq (,$(filter gnrc_ipv6_ext_frag,$(USEMODULE)))
USEMODULE += gnrc_ipv6_ext
USEMODULE += xtimer

View File

@ -9,8 +9,6 @@ USEMODULE += sock_udp
USEMODULE += od
USEMODULE += xtimer
CFLAGS += -DSOCK_HAS_IPV6
# mock IPv6 gnrc_nettype
CFLAGS += -DTEST_SUITES -DGNRC_NETTYPE_IPV6=GNRC_NETTYPE_TEST