module documentation

Where can I find documentation about available modules?

In particular, I want to learn about the use cases and properties of the gnrc_ipv6* and gnrc_sixlowpan* modules.

- Ralph

Hello Ralph, Sorry for the delay. The module documentation for RIOT can be found here [1]. The documentation for the particular modules you requested can be found there too [2] [3]. As better documentation is one of our main goals for the next release(s), we welcome feedback on those.

Best regards, Martine

[1] http://doc.riot-os.org/ [2] http://doc.riot-os.org/group__net__gnrc__ipv6.html [3] http://doc.riot-os.org/group__net__gnrc__sixlowpan.html

Hey Martine,

The module documentation for RIOT can be found here [1].

duh. :wink:

When I saw Ralph's question, I was looking forward to you using the opportunity to put some light in how gnrc_ipv6, gnrc_ipv6_router, ipv6_router_default, sixlowpan, sixlowpan_nd, sixlowpan_router_nd, sixlowpan_border_router_sixlowpan_nd_host, ..., are related.

Sure, it might be in our doxygen, but some words of you might save hours of clicking through multiple windows of html documentation.

Kaspar

Hi there, I agree that some text would be very helpful. Actually, the plan was to indeed provide some such text very soon, right Martine? Best, Emmanuel

Hi,

I agree that some text would be very helpful. Actually, the plan was to indeed provide some such text very soon, right Martine?

yes, we are currently working on making the documentation more precise and helpful for the whole system. Not just IPv6 and 6LoWPAN. Actually, that was what I try to imply with “better documentation is one of our main goals for the next release(s)”.

Not to go into much detail (that’s what a landing page in our future documentation will be for; but thanks for pointing out, that pseudo-modules will need documentation too :-)), but:

  • gnrc_ipv6 is the main module implementing IPv6 for GNRC. Building just gnrc_ipv6 gives you the bare minimum you need for IPv6 communication: 1-hop sending and receiving
  • some sub-modules, like gnrc_ipv6_netif (IPv6-relevant interface data) and gnrc_ipv6_nc (neighbor cache) are independently usable (good for testing) from gnrc_ipv6, but essential to its functionality
  • gnrc_ipv6_router is a pseudo-module providing build-instructions to include routing capabilities for IPv6 (forwarding of packets + FIB)
  • gnrc_sixlowpan is the bare minimum implementation of 6LoWPAN for GNRC
  • gnrc_sixlowpan_frag and gnrc_sixlowpan_iphc implenent 6LoWPAN fragmentation and IP header compression respectively
  • gnrc_sixlowpan_nd provides base functionality for 6Lo-ND (but no behavior).
  • gnrc_sixlowpan_nd_host provides host behavior of 6Lo-ND
  • gnrc_sixlowpan_nd_router provides router behavior of 6Lo-ND
  • gnrc_sixlowpan_nd_border_router provides border router behavior of 6Lo-ND
  • either of the nd or router modules can be included or excluded from the build to optimize in a size-feature axis. The stack should still be operational, though the features of the missing modules would also be missing of course.
  • gnrc_.*_default are convenience modules that provide the required neighbor discoveries of the given mode and other modules needed for (size-wise) ideal full operation.

Hope this was more helpful, Martine

Hi!

One tiny addition:

Hi,

There is also grnc_sixlowpan_ctx for stateful compression (using the 6co flag in RAs).

If you want to be precise, gnrc_sixlowpan_ctx is just the storage type for the context → IPv6 prefix mapping. The stateful comression is provided by gnrc_sixlowpan_iphc.

Cheers, Martine

Hi all,

I followed that information provided by community, but did not find the MODULE gnrc, and also just find gnrc_netif MODULE in sys, but not gnrc_netif_default

# gnrc is a meta module including all required, basic gnrc networking modules   USEMODULE += gnrc   # use the default network interface for the board   USEMODULE += gnrc_netif_default

# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present If I just want to get IEEE802.15.4 data, from my perspective I directly use MODULE of gnrc_netif, right? And add packet header I defined by myself.

Thanks for your answers.

Cheers, Haoyang

Hello Haoyang, gnrc_netif_default is a pseudo-module, defined in Makefile.pseudomodules. Pseudo-modules are modules, that don’t have code, but are used by the build-system to collect other modules as dependencies or to express a certain build configuration. gnrc can be found in sys/net/gnrc. If the directory the module resides in is called the same as the module, the MODULE macro needs not be set in the module’s Makefile. Can you rephrase your second question. I have difficulties to understand what you are going at.

Cheers, Martine

Hello Martine,

Thanks for you answer, right now I fully understand how it works. But why do we need Pseudo-modules? Can we use other modules directly without indirect way.

My last question is there is a note that:

NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present

I use module only for gnrc_netif_default, it seems include the 6LoWPAN module too?

Thanks! Haoyang

Hi Haoyang, pseaudo-modules are used to describe certain module configurations (and macro settings) in a way that is easy and convenient to use for a user. For example: Without reading a lot about how networking is working under the hoodit might not be immediately clear that for normal IPv6 communication you need NDP and thus ICMPv6. The module gnrc_ipv6_default provides a user with these modules without the requirement to know everything about our network stack, while an experienced user might want to choose to exclude NDP to optimize for size and configure the address resolution manually.

If gnrc_netif_default pulls in 6LoWPAN without the presence of IPv6 this is definitely an error of the dependencies. I will look into it tomorrow.

Good night (from Berlin), Martine

Hi Martine,

I understood the idea behind the concept. Thank you very much!

I came across a question about all the

#ifdef MODULE_XXXX_XXXX_XXX, just like #ifdef MODULE_GNRC_NDP_ROUTER, MODULE_GNRC_NDP

I have no idea where do the source code defined them, how was the name defined?

Thank you for your quick reply.

Cheers, Haoyang

Hello Haoyang,

MODULE_* macros will be generated from the USEMODULE and USEPKG variables. [1]

Best, Cenk

[1]

Hi Cenk,

Thanks for your reply, I finished read the Makefile.modules and fully understood!

Hi all,

I also curious about the RIOT platform, do we have the STL tools or map, multimap or linked list utility directly for use? Or I can work my own data structure for use, if has, I can focus only on functionality.

Cheers, Haoyang