Loading...
Searching...
No Matches
congure.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef CONGURE_H
21#define CONGURE_H
22
23#include <stdint.h>
24
25#include "clist.h"
26#include "ztimer.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35#define CONGURE_WND_SIZE_MAX (UINT16_MAX)
36
41typedef uint16_t congure_wnd_size_t;
42
47
64
82
115
128 void (*init)(congure_snd_t *c, void *ctx);
129
142 int32_t (*inter_msg_interval)(congure_snd_t *c, unsigned msg_size);
143
150 void (*report_msg_sent)(congure_snd_t *c, unsigned msg_size);
151
162 void (*report_msg_discarded)(congure_snd_t *c, unsigned msg_size);
163
178
197
206 congure_snd_ack_t *ack);
207
218};
219
220#ifdef __cplusplus
221}
222#endif
223
224#endif /* CONGURE_H */
Circular linked list.
uint16_t congure_wnd_size_t
Define type for window size to allow for possible window size scaling.
Definition congure.h:41
uint32_t ztimer_now_t
type for ztimer_now() result
Definition ztimer.h:310
Object to represent an ACK to a message.
Definition congure.h:86
congure_wnd_size_t wnd
the peer-reported window size in caller defined units.
Definition congure.h:100
ztimer_now_t recv_time
Timestamp in milliseconds of when the ACK was received.
Definition congure.h:90
uint16_t delay
the peer-reported time in milliseconds the ACK was delayed since message reception.
Definition congure.h:113
uint32_t id
ID of the message the ACK is for.
Definition congure.h:91
uint16_t clean
true, if ACK only contains an ACK, false if not
Definition congure.h:107
congure_wnd_size_t size
size of the ACK in initiator-defined units
Definition congure.h:95
Driver for CongURE objects.
Definition congure.h:119
void(* report_msg_sent)(congure_snd_t *c, unsigned msg_size)
Report that a message was sent.
Definition congure.h:150
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.
Definition congure.h:196
void(* init)(congure_snd_t *c, void *ctx)
Initializes a CongURE object.
Definition congure.h:128
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...
Definition congure.h:217
void(* report_msgs_timeout)(congure_snd_t *c, congure_snd_msg_t *msgs)
Report that the ACKs for a collection of messages timed out.
Definition congure.h:177
int32_t(* inter_msg_interval)(congure_snd_t *c, unsigned msg_size)
Get current interval between messages for pacing.
Definition congure.h:142
void(* report_msg_discarded)(congure_snd_t *c, unsigned msg_size)
Report message as discarded.
Definition congure.h:162
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.
Definition congure.h:205
Object to represent a collection of sent messages.
Definition congure.h:68
congure_wnd_size_t size
size in initiator-defined units
Definition congure.h:74
clist_node_t super
see clist_node_t
Definition congure.h:69
ztimer_now_t send_time
timestamp in milliseconds of when the message was sent.
Definition congure.h:73
uint8_t resends
number of times the message has already been resent.
Definition congure.h:80
Base state object for CongURE implementations.
Definition congure.h:51
const congure_snd_driver_t * driver
Driver for the state object.
Definition congure.h:55
void * ctx
Context for callbacks specific to the congestion control.
Definition congure.h:61
congure_wnd_size_t cwnd
Congestion window size.
Definition congure.h:62
List node structure.
Definition list.h:40
ztimer API