Loading...
Searching...
No Matches
6LoWPAN selective fragment recovery

6LoWPAN selective fragment recovery implementation for GNRC More...

Detailed Description

6LoWPAN selective fragment recovery implementation for GNRC

6LoWPAN selective fragment recovery is an alternative fragmentation specification to classic 6LoWPAN fragmentation. It can be run in parallel to classic fragmentation, but is incompatible with its message formats.

How nodes can exchange that they are able to communicate using selective fragment recovery is currently not specified, so this feature should only be used if the operator of a network can ensure that all 6LoWPAN nodes within that network can communicate using selective fragment recovery.

See also
RFC 8931
Warning
This feature is experimental!

Modules

 Congestion control for 6LoWPAN SFR
 Congestion control for 6LoWPAN SFR using the CongURE - A Congestion control framework.
 

Files

file  sfr.h
 6LoWPAN selective fragment recovery definitions for GNRC
 
file  sfr_types.h
 6LoWPAN selective fragment recovery type definitions for GNRC
 

Data Structures

struct  gnrc_sixlowpan_frag_sfr_stats_t
 Stats on selective fragment recovery. More...
 
union  gnrc_sixlowpan_frag_sfr_bitmap_t
 Bitmap type to simplify comparisons. More...
 
struct  gnrc_sixlowpan_frag_sfr_fb
 Extension for 6LoWPAN fragmentation buffer for selective fragment recovery. More...
 

Macros

#define GNRC_SIXLOWPAN_FRAG_SFR_ARQ_TIMEOUT_MSG   (0x0227)
 Message type to signal an acknowledgement request timeout.
 
#define GNRC_SIXLOWPAN_FRAG_SFR_INTER_FRAG_GAP_MSG   (0x0228)
 Message type to signal the sending of the next frame.
 

Typedefs

typedef struct gnrc_sixlowpan_frag_sfr_fb gnrc_sixlowpan_frag_sfr_fb_t
 Extension for 6LoWPAN fragmentation buffer for selective fragment recovery.
 

Functions

void gnrc_sixlowpan_frag_sfr_init (void)
 Initialize selective fragment recovery.
 
static void gnrc_sixlowpan_frag_sfr_init_iface (gnrc_netif_t *netif)
 Initialize a network interface for selective fragment recovery.
 
static bool gnrc_sixlowpan_frag_sfr_netif (gnrc_netif_t *netif)
 Checks if a network interface is configured for selective fragment recovery.
 
void gnrc_sixlowpan_frag_sfr_send (gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
 Sends a packet via selective fragment recovery.
 
void gnrc_sixlowpan_frag_sfr_recv (gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
 Handles a packet containing a selective fragment recovery header.
 
int gnrc_sixlowpan_frag_sfr_forward (gnrc_pktsnip_t *pkt, sixlowpan_sfr_rfrag_t *rfrag, gnrc_sixlowpan_frag_vrb_t *vrbe, unsigned page)
 Forward a fragment via selective fragment recovery.
 
void gnrc_sixlowpan_frag_sfr_arq_timeout (gnrc_sixlowpan_frag_fb_t *fbuf)
 Handles an Acknowledgment request timeout.
 
void gnrc_sixlowpan_frag_sfr_inter_frame_gap (gnrc_sixlowpan_frag_fb_t *fbuf)
 Handles inter frame gap.
 

Macro Definition Documentation

◆ GNRC_SIXLOWPAN_FRAG_SFR_ARQ_TIMEOUT_MSG

#define GNRC_SIXLOWPAN_FRAG_SFR_ARQ_TIMEOUT_MSG   (0x0227)

Message type to signal an acknowledgement request timeout.

Definition at line 54 of file sfr.h.

◆ GNRC_SIXLOWPAN_FRAG_SFR_INTER_FRAG_GAP_MSG

#define GNRC_SIXLOWPAN_FRAG_SFR_INTER_FRAG_GAP_MSG   (0x0228)

Message type to signal the sending of the next frame.

Definition at line 59 of file sfr.h.

Function Documentation

◆ gnrc_sixlowpan_frag_sfr_arq_timeout()

void gnrc_sixlowpan_frag_sfr_arq_timeout ( gnrc_sixlowpan_frag_fb_t fbuf)

Handles an Acknowledgment request timeout.

Parameters
[in]fbufThe fragmentation buffer representing the datagram for which fragments the Acknowledgment request timed out.

◆ gnrc_sixlowpan_frag_sfr_forward()

int gnrc_sixlowpan_frag_sfr_forward ( gnrc_pktsnip_t pkt,
sixlowpan_sfr_rfrag_t rfrag,
gnrc_sixlowpan_frag_vrb_t vrbe,
unsigned  page 
)

Forward a fragment via selective fragment recovery.

Parameters
[in]pktThe fragment to forward (without RFRAG header). Is consumed by this function.
[in]rfragThe originally received RFRAG header.
[in]vrbeVirtual reassembly buffer containing the forwarding information.
[in]pageCurrent 6Lo dispatch parsing page.
Returns
0, on success.
-ENOMEM, when packet buffer is too full to prepare packet for forwarding. pkt is released in that case.

◆ gnrc_sixlowpan_frag_sfr_init_iface()

static void gnrc_sixlowpan_frag_sfr_init_iface ( gnrc_netif_t netif)
inlinestatic

Initialize a network interface for selective fragment recovery.

Note
This is a NOP without module gnrc_sixlowpan_frag_sfr
Parameters
[in]netifA network interface

Definition at line 95 of file sfr.h.

◆ gnrc_sixlowpan_frag_sfr_inter_frame_gap()

void gnrc_sixlowpan_frag_sfr_inter_frame_gap ( gnrc_sixlowpan_frag_fb_t fbuf)

Handles inter frame gap.

Parameters
[in]fbufThe fragmentation buffer representing the datagram for which the next frame should uphold the inter frame gap

◆ gnrc_sixlowpan_frag_sfr_netif()

static bool gnrc_sixlowpan_frag_sfr_netif ( gnrc_netif_t netif)
inlinestatic

Checks if a network interface is configured for selective fragment recovery.

Parameters
[in]netifA network interface.
Returns
true, if netif supports selective fragment recovery and has it enabled.
false, if netif does not support selective fragment recovery or does not have it enabled.

Definition at line 121 of file sfr.h.

◆ gnrc_sixlowpan_frag_sfr_recv()

void gnrc_sixlowpan_frag_sfr_recv ( gnrc_pktsnip_t pkt,
void *  ctx,
unsigned  page 
)

Handles a packet containing a selective fragment recovery header.

Parameters
[in]pktThe packet to handle.
[in]ctxContext for the packet. May be NULL.
[in]pageCurrent 6Lo dispatch parsing page.

◆ gnrc_sixlowpan_frag_sfr_send()

void gnrc_sixlowpan_frag_sfr_send ( gnrc_pktsnip_t pkt,
void *  ctx,
unsigned  page 
)

Sends a packet via selective fragment recovery.

Precondition
ctx != NULL
gnrc_sixlowpan_frag_fb_t::pkt of ctx is equal to pkt or pkt == NULL.
Parameters
[in]pktA packet. May be NULL.
[in]ctxFragmentation buffer entry of. Expected to be of type gnrc_sixlowpan_frag_fb_t, with gnrc_sixlowpan_frag_fb_t set to pkt. Must not be NULL.
[in]pageCurrent 6Lo dispatch parsing page.