[riot-devel] Routing Tables

Benjamin Valentin benpicco at zedat.fu-berlin.de
Thu Dec 12 07:21:24 CET 2013

Am Tue, 3 Dec 2013 23:30:37 +0100
schrieb Lotte Steenbrink <lotte.steenbrink at fu-berlin.de>:

> Hi,
> with the development and extension of several routing protocols in
> progress, I was wondering if there are any plans to add some sort of
> routing table API to RIOT in the (near) future? The one included in
> the RPL implementation looks somewhat bare-bones and inefficient to
> me, and having every author of a routing protocol cobble their own
> implementation together seems, well, inefficient ;)

Well there is

ipv6_iface_set_routing_provider(ipv6_addr_t *(*next_hop)(ipv6_addr_t* dest))

with which you can register a function that returns the address of the
next hop for the address it gets as a parameter.
So while you have to maintain your own routing table, so to say, I think
many protocols will need to maintain a data structure of all available
destinations anyway.
This way you don't have to copy the data and avoid wasting memory.


More information about the devel mailing list