2020-02-26 13:05:58 +01:00
|
|
|
# native has a TAP interface towards the host, just add parameters for
|
|
|
|
# `socket_zep`
|
2020-04-03 23:03:36 +02:00
|
|
|
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)
|
2023-01-31 16:15:18 +01:00
|
|
|
CFLAGS += -DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES)
|
2020-04-03 23:03:36 +02:00
|
|
|
|
2020-07-23 17:30:57 +02:00
|
|
|
# Set CFLAGS if not being set via Kconfig
|
|
|
|
CFLAGS += $(if $(CONFIG_KCONFIG_MODULE_DHCPV6),,-DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES))
|
|
|
|
|
2022-11-02 21:09:42 +01:00
|
|
|
# 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
|
2020-02-26 13:05:58 +01:00
|
|
|
endif
|
2020-08-13 18:43:31 +02:00
|
|
|
|
|
|
|
# enable the ZEP dispatcher
|
|
|
|
FLAGS_EXTRAS += -z $(ZEP_PORT_BASE)
|
|
|
|
|
2023-10-20 17:51:05 +02:00
|
|
|
ifneq (, $(ZEP_TOPO_FILE))
|
|
|
|
FLAGS_EXTRAS += --topology $(ZEP_TOPO_FILE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (1, $(ZEP_MONITOR))
|
|
|
|
FLAGS_EXTRAS += --monitor
|
|
|
|
endif
|
|
|
|
|
2020-08-13 18:43:31 +02:00
|
|
|
# Configure terminal parameters
|
|
|
|
TERMDEPS += host-tools
|
|
|
|
TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX)
|
2023-12-13 20:54:49 +01:00
|
|
|
RIOT_TERMINAL ?= native
|
2020-08-13 18:43:31 +02:00
|
|
|
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)))
|
2021-12-03 18:29:41 +01:00
|
|
|
|
2022-11-08 15:13:45 +01:00
|
|
|
# native uses $PORT to specify the TAP interface
|
|
|
|
PORT ?= $(TAP)
|