# native has a TAP interface towards the host, just add parameters for # `socket_zep` ZEP_PORT_BASE ?= 17754 ZEP_PORT_MAX := $(shell expr $(ZEP_PORT_BASE) + $(ZEP_DEVICES) - 1) CFLAGS += -DSOCKET_ZEP_MAX=$(ZEP_DEVICES) CFLAGS += -DASYNC_READ_NUMOF=$(shell expr $(ZEP_DEVICES) + 1) CFLAGS += -DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES) # Set CFLAGS if not being set via Kconfig CFLAGS += $(if $(CONFIG_KCONFIG_MODULE_DHCPV6),,-DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES)) # create a new TAP interface if not re-using an existing one ifneq (1, $(REUSE_TAP)) FLAGS_EXTRAS += --create-tap ifeq (dhcpv6,$(PREFIX_CONF)) FLAGS_EXTRAS += --use-dhcpv6 else ifeq (auto_subnets,$(PREFIX_CONF)) FLAGS_EXTRAS += --use-radvd endif endif # enable the ZEP dispatcher FLAGS_EXTRAS += -z $(ZEP_PORT_BASE) ifneq (, $(ZEP_TOPO_FILE)) FLAGS_EXTRAS += --topology $(ZEP_TOPO_FILE) endif ifeq (1, $(ZEP_MONITOR)) FLAGS_EXTRAS += --monitor endif # Configure terminal parameters TERMDEPS += host-tools TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX) RIOT_TERMINAL ?= native TERMPROG ?= sudo $(RIOTTOOLS)/zep_dispatch/start_network.sh $(TERMPROG_FLAGS) # -z [::1]:$PORT for each ZEP device TERMFLAGS ?= $(patsubst %,-z [::1]:%, $(shell seq $(ZEP_PORT_BASE) $(ZEP_PORT_MAX))) # native uses $PORT to specify the TAP interface PORT ?= $(TAP)