Contiki-NG
tsch-roots.c File Reference

Keeps track of which neighbors advertise themselves as roots. More...

#include "contiki.h"
#include "lib/list.h"
#include "lib/memb.h"
#include "net/mac/tsch/tsch.h"
#include "sys/log.h"

Go to the source code of this file.

Functions

void tsch_roots_add_address (const linkaddr_t *root_address)
 Add address as a potential RPL root that is a single-hop neighbor in the TSCH network. More...
 
void tsch_roots_set_self_to_root (uint8_t is_root)
 Set the root status of the local node. More...
 
int tsch_roots_is_root (const linkaddr_t *address)
 Tests whether a given address belongs to a single-hop reachable root node in this network. More...
 
void tsch_roots_init (void)
 Initialize the list of RPL network roots.
 

Detailed Description

Keeps track of which neighbors advertise themselves as roots.

This information is used by the Orchestra root rule.

Author
Atis Elsts atis..nosp@m.elst.nosp@m.s@gma.nosp@m.il.c.nosp@m.om

Definition in file tsch-roots.c.

Function Documentation

◆ tsch_roots_add_address()

void tsch_roots_add_address ( const linkaddr_t *  root_address)

Add address as a potential RPL root that is a single-hop neighbor in the TSCH network.

Author
Atis Elsts atis..nosp@m.elst.nosp@m.s@gma.nosp@m.il.c.nosp@m.om For now, only add addresses that send TSCH EB's with join priority set to zero.
Parameters
root_address- the address of the root.

Definition at line 168 of file tsch-roots.c.

◆ tsch_roots_is_root()

int tsch_roots_is_root ( const linkaddr_t *  address)

Tests whether a given address belongs to a single-hop reachable root node in this network.

Parameters
address- the address to test
Returns
nonzero if the address belongs to a root node that is a single hop neighbor; zero otherwise.

Note: does not check if the address belongs to self, or to a root node more than a hop away!

Definition at line 176 of file tsch-roots.c.

◆ tsch_roots_set_self_to_root()

void tsch_roots_set_self_to_root ( uint8_t  is_root)

Set the root status of the local node.

Parameters
is_root- if nonzero, the local node becomes root; otherwise, it ceases to be root

Definition at line 172 of file tsch-roots.c.