quic.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include "ztimer.h"
21 
22 #include "congure.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
54 typedef struct {
65  void (*cong_event_cb)(void *ctx);
66 
71 
76 
80  uint16_t init_rtt;
81 
85  uint16_t max_msg_size;
86 
92  uint16_t pc_thresh;
93 
97  uint16_t granularity;
98 
104 
110 
117 
125 
131 typedef struct {
138 
144 
149  unsigned in_flight_size;
150 
157 
166 
170  uint16_t smoothed_rtt;
171 
175  uint16_t rtt_var;
176 
180  uint16_t min_rtt;
181 
191  uint16_t limited;
192 
203  uint16_t max_ack_delay;
205 
223  const congure_quic_snd_consts_t *consts);
224 
225 #ifdef __cplusplus
226 }
227 #endif
228 
void congure_quic_snd_setup(congure_quic_snd_t *c, const congure_quic_snd_consts_t *consts)
Set's up the driver for a CongURE QUIC object.
uint16_t congure_wnd_size_t
Define type for window size to allow for possible window size scaling.
Definition: congure.h:38
uint32_t ztimer_now_t
type for ztimer_now() result
Definition: ztimer.h:308
Constants for the congestion control.
Definition: quic.h:54
uint16_t pc_thresh
period of time in milliseconds for persistent congestion to be establisched
Definition: quic.h:92
uint8_t loss_reduction_numerator
numerator for the factor the congestion window should be reduced by when a new loss event is detected
Definition: quic.h:103
uint16_t granularity
system timer granularity in milliseconds (typically 1)
Definition: quic.h:97
uint8_t inter_msg_interval_numerator
numerator for the factor N used to adapt the message interval
Definition: quic.h:116
uint16_t init_rtt
The assumed RTT in milliseconds before an RTT sample is taken.
Definition: quic.h:80
uint8_t loss_reduction_denominator
denominator for the factor the congestion window should be reduced by when a new loss event is detect...
Definition: quic.h:109
uint16_t max_msg_size
maximum message size in initiator-defined units.
Definition: quic.h:85
uint8_t inter_msg_interval_denominator
denominator for the factor N used to adapt the message interval
Definition: quic.h:123
congure_wnd_size_t min_wnd
minimum congestion window size in initiator-defined units.
Definition: quic.h:75
congure_wnd_size_t init_wnd
Initial congestion window size in initiator-defined units.
Definition: quic.h:70
State object for CongURE QUIC.
Definition: quic.h:131
uint16_t smoothed_rtt
The smoothed RTT of a connection between peers in milliseconds.
Definition: quic.h:170
ztimer_now_t recovery_start
Timestamp in milliseconds of when congestion was first detected.
Definition: quic.h:156
congure_wnd_size_t ssthresh
Slow start threshold in caller-defined units.
Definition: quic.h:165
uint16_t rtt_var
The RTT variation.
Definition: quic.h:175
const congure_quic_snd_consts_t * consts
Constants.
Definition: quic.h:137
congure_snd_t super
see congure_snd_t
Definition: quic.h:132
uint16_t min_rtt
The minimum RTT seen over a period of time.
Definition: quic.h:180
unsigned in_flight_size
Sum of caller-defined units of message sizes of all messages that are yet not ack'd or declared lost.
Definition: quic.h:149
uint16_t limited
Set to one if congestion control should is limited by the application or flow control.
Definition: quic.h:191
ztimer_now_t first_rtt_sample
Timestamp in milliseconds of when the first RTT sample was obtained.
Definition: quic.h:143
uint16_t max_ack_delay
Advertised maximum amount of time in milliseconds a receiver intends to delay its acknowledgements.
Definition: quic.h:203
Base state object for CongURE implementations.
Definition: congure.h:48
ztimer API