<commit_before># Setup the build
First switch to this application directory:

	cd RIOT/examples/rpl_udp

#### Parameterizing the build
The build system provides two specific parameters for the RPL module.  
These parameters are:
 * `RPL_MAX_ROUTING_ENTRIES` sets the desired maximum number of entries for the RPL routing table. _If this parameter is not provided, a [default](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L130) value is used._
 * `RPL_NODE_IS_ROOT` indicating the build is specifically for a root node. This parameter is **only required** for using [`RPL_NON_STORING_MODE`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L31) MOP to initialize a RPL routing table. The parameter is ignored in all other cases. _For non-storing MOP a node does not require to provide a routing table._

#### Compiling the executable
**example for [`RPL_STORING_MODE_NO_MC`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L139):**

	make

builds the project and creates `128` entries for the RPL routing table by default.

	make RPL_MAX_ROUTING_ENTRIES=103

builds the project and creates `103` entries for the RPL routing table **overwriting** the default value.

**example for [`RPL_NON_STORING_MODE`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L133):**

	make RPL_MAX_ROUTING_ENTRIES=103 RPL_NODE_IS_ROOT=1

builds the project and creates `103` entries for the RPL routing table for the root node.

#### _[native only]_ Set up a bridge for *two* tap devices for communication

	../../cpu/native/tapsetup.sh create 2

The `2` corresponds to the number of _virtual_ nodes to be started.  
The tap devices are bound to the _virtual_ native node on starting the created executable `rpl_udp.elf`.  

#### _[native only]_ Starting _virtual_ nodes
Run the first node

	make term

This starts the executable binding a _virtual_ node to the first tap device `tap0`.  

**Further nodes must be bound to tap devices manually.**  
For the second node it would be:

	make term PORT=tap1


# RPL init
Type ``help`` to see the commands available.

#### Command order:

	init (r|n|h)
	server
	send <node-id> <message>


Init your RPL node either as root (`r`), as node router (`n`), or as non-routing node (host-mode) (`h`)

	> init r
	init r
	INFO: Initialize as root on address 1
	6LoWPAN and RPL initialized.<commit_msg>examples/rpl_udp: Update line number on link to default RPL_MAX_ROUTING_ENTRIES<commit_after># Setup the build
First switch to this application directory:

	cd RIOT/examples/rpl_udp

#### Parameterizing the build
The build system provides two specific parameters for the RPL module.
These parameters are:
 * `RPL_MAX_ROUTING_ENTRIES` sets the desired maximum number of entries for the RPL routing table. _If this parameter is not provided, a [default](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L139) value is used._
 * `RPL_NODE_IS_ROOT` indicating the build is specifically for a root node. This parameter is **only required** for using [`RPL_NON_STORING_MODE`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L31) MOP to initialize a RPL routing table. The parameter is ignored in all other cases. _For non-storing MOP a node does not require to provide a routing table._

#### Compiling the executable
**example for [`RPL_STORING_MODE_NO_MC`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L139):**

	make

builds the project and creates `128` entries for the RPL routing table by default.

	make RPL_MAX_ROUTING_ENTRIES=103

builds the project and creates `103` entries for the RPL routing table **overwriting** the default value.

**example for [`RPL_NON_STORING_MODE`](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/include/rpl/rpl_config.h#L133):**

	make RPL_MAX_ROUTING_ENTRIES=103 RPL_NODE_IS_ROOT=1

builds the project and creates `103` entries for the RPL routing table for the root node.

#### _[native only]_ Set up a bridge for *two* tap devices for communication

	../../cpu/native/tapsetup.sh create 2

The `2` corresponds to the number of _virtual_ nodes to be started.
The tap devices are bound to the _virtual_ native node on starting the created executable `rpl_udp.elf`.

#### _[native only]_ Starting _virtual_ nodes
Run the first node

	make term

This starts the executable binding a _virtual_ node to the first tap device `tap0`.

**Further nodes must be bound to tap devices manually.**
For the second node it would be:

	make term PORT=tap1


# RPL init
Type ``help`` to see the commands available.

#### Command order:

	init (r|n|h)
	server
	send <node-id> <message>


Init your RPL node either as root (`r`), as node router (`n`), or as non-routing node (host-mode) (`h`)

	> init r
	init r
	INFO: Initialize as root on address 1
	6LoWPAN and RPL initialized.
{'fraction_non_alphanumeric': 0.0930516050386022, 'fraction_numerical': 0.013409183258837871, 'mean_word_length': 4.543918918918919, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5599227', 'n_tokens_mistral': 1658, 'n_tokens_neox': 1556, 'n_words': 601}