Skip to content

Simplify sixlowpan initialisation #165

@miri64

Description

@miri64

By now there are three functions to initialize a 6LoWPAN node

  • for a general 6LoWPAN node (6LN) (calls sixlowpan_lowpan_border_init() if as_border == 1)
void sixlowpan_lowpan_init(transceiver_type_t trans, uint8_t r_addr,
                           int as_border);
  • for a 6LoWPAN router (6LR) (calls sixlowpan_lowpan_init(trans, addr, 0) in the end)
void sixlowpan_lowpan_adhoc_init(transceiver_type_t trans,
                                 const ipv6_addr_t *prefix,
                                 uint8_t r_addr);
  • for a 6LoWPAN border router (6LBR)
uint8_t sixlowpan_lowpan_border_init(transceiver_type_t trans,
                                     const ipv6_addr_t *border_router_addr);

The easiest way to simplify this would be to unify this into one function with flags to tell it what to do.

Metadata

Metadata

Assignees

Labels

Type: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions