Skip to content

Commit

Permalink
examples/gnrc_networking: optional RPL and router
Browse files Browse the repository at this point in the history
Introduce a Makefile variable for enabling RPL and/or routing
functionality.
  • Loading branch information
OlegHahm committed Jan 3, 2025
1 parent 52668c8 commit fb2c5c3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion examples/gnrc_networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ BOARD ?= native
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..

# By default this application will run as a host, i.e., not forward any
# packets. Setting this variable to 1 will change this behavior and let the
# node act as a router.
ROUTER ?= 0
# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
USEMODULE += netdev_default
USEMODULE += auto_init_gnrc_netif
# Activate ICMPv6 error messages
USEMODULE += gnrc_icmpv6_error
# Specify the mandatory networking module for a IPv6 host node
# Specify the mandatory networking module for a IPv6 in router or host node
ifeq (1,$(ROUTER))
USEMODULE += gnrc_ipv6_router_default
else
USEMODULE += gnrc_ipv6_default
endif
# Additional networking modules that can be dropped if not needed
USEMODULE += gnrc_icmpv6_echo
USEMODULE += shell_cmd_gnrc_udp
Expand All @@ -24,7 +32,16 @@ USEMODULE += shell_cmds_default
USEMODULE += ps
USEMODULE += netstats_l2
USEMODULE += netstats_ipv6

# Optionally include the RPL routing protocol (particular useful if not all
# nodes are within radio transmission range to the border router)
USE_RPL ?= 0

ifeq (1,$(USE_RPL))
USEMODULE += gnrc_rpl
USEMODULE += auto_init_gnrc_rpl
USEMODULE += netstats_rpl
endif

# Optionally include DNS support. This includes resolution of names at an
# upstream DNS server and the handling of RDNSS options in Router Advertisements
Expand Down

0 comments on commit fb2c5c3

Please sign in to comment.