All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches

6LoWPAN selective fragment recovery dispatch type and helper function definitions. More...

Detailed Description

6LoWPAN selective fragment recovery dispatch type and helper function definitions.

Author
Martine Lenders m.len.nosp@m.ders.nosp@m.@fu-b.nosp@m.erli.nosp@m.n.de

Definition in file sfr.h.

#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include "bitfield.h"
#include "byteorder.h"
#include "net/sixlowpan.h"
+ Include dependency graph for sfr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sixlowpan_sfr_t
 Generic type for selective fragment recovery headers. More...
 
struct  sixlowpan_sfr_rfrag_t
 Recoverable fragment header. More...
 
struct  sixlowpan_sfr_ack_t
 Recoverable fragment (RFRAG) acknowledgment header. More...
 

Macros

#define SIXLOWPAN_SFR_GEN_DISP_MASK   (0xfc)
 Mask for generic dispatch of both selective fragment recovery headers.
 
#define SIXLOWPAN_SFR_GEN_DISP   (0xe8)
 generic dispatch for both SFR headers
 
#define SIXLOWPAN_SFR_ECN   (0x01U)
 explicit congestion notification flag
 
#define SIXLOWPAN_SFR_ACK_REQ   (0x80U)
 Acknowledgment request flag (for 8 MSB)
 
#define SIXLOWPAN_SFR_SEQ_MASK   (0x7cU)
 Sequence number mask (for 8 MSB)
 
#define SIXLOWPAN_SFR_SEQ_POS   (2U)
 Sequence number position (for 8 MSB)
 
#define SIXLOWPAN_SFR_SEQ_MAX   (0x1fU)
 Maximum value for sequence number.
 
#define SIXLOWPAN_SFR_FRAG_SIZE_MASK   (0x03ffU)
 Fragment size mask.
 
#define SIXLOWPAN_SFR_FRAG_SIZE_MAX   (0x03ffU)
 Maximum value for fragment size.
 
#define SIXLOWPAN_SFR_ACK_BITMAP_SIZE   (32U)
 Acknowledgment bitmap size in bits.
 

Functions

static bool sixlowpan_sfr_is (sixlowpan_sfr_t *hdr)
 Check if given header is a 6LoWPAN selective fragment recovery header (either RFRAG or RFRAG ACK)
 
static void sixlowpan_sfr_set_ecn (sixlowpan_sfr_t *hdr)
 Set the ECN flag in a 6LoWPAN selective fragment recovery header.
 
static void sixlowpan_sfr_clear_ecn (sixlowpan_sfr_t *hdr)
 Clear the ECN flag in a 6LoWPAN recoverable fragment header.
 
static bool sixlowpan_sfr_ecn (const sixlowpan_sfr_t *hdr)
 Check if the ECN flag in a 6LoWPAN recoverable fragment header is set.
 
static void sixlowpan_sfr_rfrag_set_disp (sixlowpan_sfr_t *hdr)
 Initialize 6LoWPAN recoverable fragment dispatch.
 
static bool sixlowpan_sfr_rfrag_is (const sixlowpan_sfr_t *hdr)
 Check if given header is a 6LoWPAN recoverable fragment header.
 
static void sixlowpan_sfr_rfrag_set_ack_req (sixlowpan_sfr_rfrag_t *hdr)
 Set the Acknowledgment request flag in a 6LoWPAN recoverable fragment header.
 
static void sixlowpan_sfr_rfrag_clear_ack_req (sixlowpan_sfr_rfrag_t *hdr)
 Clear the Acknowledgment request flag in a 6LoWPAN recoverable fragment header.
 
static bool sixlowpan_sfr_rfrag_ack_req (sixlowpan_sfr_rfrag_t *hdr)
 Check if the Acknowledgment request flag in a 6LoWPAN recoverable fragment header is set.
 
static void sixlowpan_sfr_rfrag_set_seq (sixlowpan_sfr_rfrag_t *hdr, uint8_t seq)
 Set sequence number in a 6LoWPAN recoverable fragment header.
 
static uint8_t sixlowpan_sfr_rfrag_get_seq (const sixlowpan_sfr_rfrag_t *hdr)
 Get sequence number from a 6LoWPAN recoverable fragment header.
 
static void sixlowpan_sfr_rfrag_set_frag_size (sixlowpan_sfr_rfrag_t *hdr, uint16_t frag_size)
 Set fragment size in a 6LoWPAN recoverable fragment header.
 
static uint16_t sixlowpan_sfr_rfrag_get_frag_size (const sixlowpan_sfr_rfrag_t *hdr)
 Get fragment size from a 6LoWPAN recoverable fragment header.
 
static void sixlowpan_sfr_rfrag_set_offset (sixlowpan_sfr_rfrag_t *hdr, uint16_t offset)
 Set fragment offset in a 6LoWPAN recoverable fragment header.
 
static uint16_t sixlowpan_sfr_rfrag_get_offset (const sixlowpan_sfr_rfrag_t *hdr)
 Get fragment offset from a 6LoWPAN recoverable fragment header.
 
static void sixlowpan_sfr_ack_set_disp (sixlowpan_sfr_t *hdr)
 Initialize 6LoWPAN RFRAG acknowledgment dispatch.
 
static bool sixlowpan_sfr_ack_is (const sixlowpan_sfr_t *hdr)
 Check if given header is a 6LoWPAN RFRAG acknowledgment header.