29#ifndef NET_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_H
30#define NET_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_H
46#define GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT (1U)
48#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE) || DOXYGEN
91#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
109#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
111 fb->sfr.congure = NULL;
127#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
128 fb->sfr.congure->driver->init(fb->sfr.congure, fb);
145#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
146 if (fb->sfr.congure == NULL) {
177#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
178 return fb->sfr.frags_sent < fb->sfr.congure->cwnd;
202#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
204 < fb->sfr.congure->cwnd;
223 IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE);
249#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
258 return (uint32_t)res;
282#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
306#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
330#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
356#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
385#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
416#if IS_USED(MODULE_GNRC_SIXLOWPAN_FRAG_SFR_CONGURE)
#define assert(cond)
abort the program if assertion is false
6LoWPAN selective fragment recovery definitions for GNRC
#define CONFIG_GNRC_SIXLOWPAN_SFR_OPT_WIN_SIZE
Default value of window size that the sender should start with (OptWindowSize)
#define CONFIG_GNRC_SIXLOWPAN_SFR_INTER_FRAME_GAP_US
Default minimum amount of time between transmissions in microseconds (InterFrameGap)
#define CONFIG_GNRC_SIXLOWPAN_SFR_MAX_WIN_SIZE
Default maximum value of window size that the sender can use (MaxWindowSize)
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_timeout(gnrc_sixlowpan_frag_fb_t *fb)
Report to CongURE that the ACK for a fragment timed out.
static bool gnrc_sixlowpan_frag_sfr_congure_snd_next_in_cwnd(gnrc_sixlowpan_frag_fb_t *fb)
Checks if given fragmentation buffer entry would still be within congestion window after next send.
static void gnrc_sixlowpan_frag_sfr_congure_snd_setup(gnrc_sixlowpan_frag_fb_t *fb)
Retrieve CongURE state object when not retrieved and initialize it for a fragmentation buffer entry.
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frags_lost(gnrc_sixlowpan_frag_fb_t *fb, congure_snd_msg_t *frags)
Report to CongURE that a number of fragments are known to be lost.
static void gnrc_sixlowpan_frag_sfr_congure_snd_free(congure_snd_t *c)
Frees the CongURE state object.
static bool gnrc_sixlowpan_frag_sfr_congure_snd_has_inter_frame_gap(void)
Checks if inter-frame gap is provided.
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_sent(gnrc_sixlowpan_frag_fb_t *fb)
Report to CongURE that a fragment was sent.
static void gnrc_sixlowpan_frag_sfr_congure_snd_destroy(gnrc_sixlowpan_frag_fb_t *fb)
Frees the CongURE state object of a fragmentation buffer and set's it to NULL
congure_snd_t * gnrc_sixlowpan_frag_sfr_congure_snd_get(void)
Retrieve CongURE state object from a pool of free objects.
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_discard(gnrc_sixlowpan_frag_fb_t *fb)
Report to CongURE that a fragment as discarded.
static void gnrc_sixlowpan_frag_sfr_congure_snd_init(gnrc_sixlowpan_frag_fb_t *fb)
Initializes a CongURE state object in a fragmentation buffer entry.
static uint32_t gnrc_sixlowpan_frag_sfr_congure_snd_inter_frame_gap(gnrc_sixlowpan_frag_fb_t *fb)
Returns inter-frame gap if provided by CongURE implementation.
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_ecn(gnrc_sixlowpan_frag_fb_t *fb, uint32_t time)
Report to CongURE that ECN bit was set in an ACK.
static bool gnrc_sixlowpan_frag_sfr_congure_snd_in_cwnd(gnrc_sixlowpan_frag_fb_t *fb)
Checks if given fragmentation buffer entry is within congestion window.
static void gnrc_sixlowpan_frag_sfr_congure_snd_report_frag_acked(gnrc_sixlowpan_frag_fb_t *fb, congure_snd_msg_t *frag, congure_snd_ack_t *ack)
Report to CongURE that a number of fragments are known to be lost.
#define GNRC_SIXLOWPAN_FRAG_SFR_CONGURE_UNIT
The user-defined window unit for congure is one fragment with SFR.
uint32_t ztimer_now_t
type for ztimer_now() result
Common macros and compiler attributes/pragmas configuration.
#define IS_USED(module)
Checks whether a module is being used or not.
Congure definitions for 6LoWPAN selective fragment recovery.
Object to represent an ACK to a message.
void(* report_msg_sent)(congure_snd_t *c, unsigned msg_size)
Report that a message was sent.
void(* report_msgs_lost)(congure_snd_t *c, congure_snd_msg_t *msgs)
Report that a collection of messages that is known to be lost.
void(* report_ecn_ce)(congure_snd_t *c, ztimer_now_t time)
Report that "congestion encountered" CE signals were received for a message by means of explicit cong...
void(* report_msgs_timeout)(congure_snd_t *c, congure_snd_msg_t *msgs)
Report that the ACKs for a collection of messages timed out.
int32_t(* inter_msg_interval)(congure_snd_t *c, unsigned msg_size)
Get current interval between messages for pacing.
void(* report_msg_discarded)(congure_snd_t *c, unsigned msg_size)
Report message as discarded.
void(* report_msg_acked)(congure_snd_t *c, congure_snd_msg_t *msg, congure_snd_ack_t *ack)
Report that the ACK for a message was received.
Object to represent a collection of sent messages.
Base state object for CongURE implementations.
const congure_snd_driver_t * driver
Driver for the state object.
congure_wnd_size_t cwnd
Congestion window size.
6LoWPAN fragmentation buffer entry.