LoRaWAN adaption for Network interface API. More...

Detailed Description

LoRaWAN adaption for Network interface API.

Author
Jose Ignacio Alamos jose..nosp@m.alam.nosp@m.os@ha.nosp@m.w-ha.nosp@m.mburg.nosp@m..de

Definition in file lorawan.h.

#include "net/gnrc/lorawan.h"
#include "ztimer.h"
+ Include dependency graph for lorawan.h:

Go to the source code of this file.

Data Structures

struct  gnrc_netif_lorawan_t
 GNRC LoRaWAN interface descriptor. More...
 
#define GNRC_NETIF_LORAWAN_FLAGS_LINK_CHECK   (0x1U)
 A Link Check request was scheduled.
 
#define CONFIG_GNRC_NETIF_LORAWAN_NETIF_HDR
 Encode LoRaWAN port in GNRC netif header. More...
 
static int gnrc_netif_lorawan_set_appkey (gnrc_netif_lorawan_t *lw_netif, const uint8_t *key, size_t len)
 Set the app key in the interface descriptor. More...
 
static uint8_t * gnrc_netif_lorawan_get_appkey (gnrc_netif_lorawan_t *lw_netif)
 Get the app key from the interface descriptor. More...
 
static int gnrc_netif_lorawan_set_snwksintkey (gnrc_netif_lorawan_t *lw_netif, const uint8_t *key, size_t len)
 Set the serving network session integrity key in the interface descriptor. More...
 
static int gnrc_netif_lorawan_set_nwksenckey (gnrc_netif_lorawan_t *lw_netif, const uint8_t *key, size_t len)
 Set the network session encryption key in the interface descriptor. More...
 

Macro Definition Documentation

◆ CONFIG_GNRC_NETIF_LORAWAN_NETIF_HDR

#define CONFIG_GNRC_NETIF_LORAWAN_NETIF_HDR

Encode LoRaWAN port in GNRC netif header.

When set, GNRC netif will interpret the destination address of the GNRC netif header as the LoRaWAN port. For downlinks, a GNRC netif header with the received port in destination field will be included in the first snip.

Deprecated:
From Release 2021.10 all GNRC LoRaWAN packets will include the GNRC Netif header. Therefore this parameter will be removed

Definition at line 46 of file lorawan.h.

Function Documentation

◆ gnrc_netif_lorawan_get_appkey()

static uint8_t* gnrc_netif_lorawan_get_appkey ( gnrc_netif_lorawan_t lw_netif)
inlinestatic

Get the app key from the interface descriptor.

This getter function exists to allow if (IS_USED(...)) constructs in the LoRaWAN code in order to increase code coverage.

Parameters
[in]lw_netifpointer to the interface descriptor
Returns
pointer to the app key

Definition at line 114 of file lorawan.h.

◆ gnrc_netif_lorawan_set_appkey()

static int gnrc_netif_lorawan_set_appkey ( gnrc_netif_lorawan_t lw_netif,
const uint8_t *  key,
size_t  len 
)
inlinestatic

Set the app key in the interface descriptor.

This getter function exists to allow if (IS_USED(...)) constructs in the LoRaWAN code in order to increase code coverage.

Parameters
[in]lw_netifpointer to the interface descriptor
[in]keypointer to the app key
[in]lenlength of the app key
Returns
0 on success
<0 on failure

Definition at line 89 of file lorawan.h.

◆ gnrc_netif_lorawan_set_nwksenckey()

static int gnrc_netif_lorawan_set_nwksenckey ( gnrc_netif_lorawan_t lw_netif,
const uint8_t *  key,
size_t  len 
)
inlinestatic

Set the network session encryption key in the interface descriptor.

This getter function exists to allow if (IS_USED(...)) constructs in the LoRaWAN code in order to increase code coverage.

Parameters
[in]lw_netifpointer to the interface descriptor
[in]keypointer to the network session encryption key
[in]lenlength of network session encryption key
Returns
0 on success
<0 on failure

Definition at line 164 of file lorawan.h.

◆ gnrc_netif_lorawan_set_snwksintkey()

static int gnrc_netif_lorawan_set_snwksintkey ( gnrc_netif_lorawan_t lw_netif,
const uint8_t *  key,
size_t  len 
)
inlinestatic

Set the serving network session integrity key in the interface descriptor.

This getter function exists to allow if (IS_USED(...)) constructs in the LoRaWAN code in order to increase code coverage.

Parameters
[in]lw_netifpointer to the interface descriptor
[in]keypointer to the serving network session integrity key
[in]lenlength of serving network session integrity key
Returns
0 on success
<0 on failure

Definition at line 136 of file lorawan.h.