reno.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 
23 #include <stdint.h>
24 
25 #include "congure.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 
57 typedef struct {
64  void (*fr)(congure_reno_snd_t *c);
65 
74  bool (*same_wnd_adv)(congure_reno_snd_t *c, congure_snd_ack_t *ack);
75 
90  void (*ss_cwnd_inc)(congure_reno_snd_t *c);
91 
108  void (*ca_cwnd_inc)(congure_reno_snd_t *c);
109 
126  void (*fr_cwnd_dec)(congure_reno_snd_t *c);
127 
135  unsigned init_mss;
136 
144 
152 
157 
161  uint8_t frthresh;
163 
176  uint32_t last_ack;
186  uint16_t in_flight_size;
187  uint8_t dup_acks;
188 };
189 
201  const congure_reno_snd_consts_t *consts);
202 
225 
234 
245  unsigned msg_size);
246 
254 
263 
272  congure_snd_msg_t *msgs);
273 
282  congure_snd_msg_t *msgs);
283 
292  congure_snd_ack_t *ack);
293 
304 #ifdef __cplusplus
305 }
306 #endif
307 
void congure_reno_snd_report_msgs_lost(congure_snd_t *c, congure_snd_msg_t *msgs)
Use to override congure_snd_driver_t::report_msgs_lost.
void congure_reno_snd_report_ecn_ce(congure_snd_t *c, ztimer_now_t time)
Use to override congure_snd_driver_t::report_ecn_ce.
void congure_reno_snd_report_msg_acked(congure_snd_t *c, congure_snd_msg_t *msg, congure_snd_ack_t *ack)
Use to override congure_snd_driver_t::report_msg_acked.
void congure_reno_snd_init(congure_snd_t *c, void *ctx)
Use to override congure_snd_driver_t::init.
void congure_reno_snd_report_msgs_timeout(congure_snd_t *c, congure_snd_msg_t *msgs)
Use to override congure_snd_driver_t::report_msgs_timeout.
void congure_reno_snd_report_msg_sent(congure_snd_t *c, unsigned msg_size)
Use to override congure_snd_driver_t::report_msg_sent.
void congure_reno_snd_report_msg_discarded(congure_snd_t *c, unsigned msg_size)
Use to override congure_snd_driver_t::report_msg_discarded.
int32_t congure_reno_snd_inter_msg_interval(congure_snd_t *c, unsigned msg_size)
Use to override congure_snd_driver_t::inter_msg_interval.
void congure_reno_set_mss(congure_reno_snd_t *c, congure_wnd_size_t mss)
Set sender maximum segment size.
void congure_reno_snd_setup(congure_reno_snd_t *c, const congure_reno_snd_consts_t *consts)
Set-up CongURE implementation of TCP Reno driver and constants.
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: reno.h:57
congure_wnd_size_t init_ssthresh
Initial slow-start threshold in initiator-defined units.
Definition: reno.h:156
congure_wnd_size_t cwnd_upper
Initial upper bound for initial window initiator-defined units.
Definition: reno.h:143
uint8_t frthresh
Threshold for duplicate ACKs to go into Fast Retransmit.
Definition: reno.h:161
congure_wnd_size_t cwnd_lower
Initial lower bound for initial window initiator-defined units.
Definition: reno.h:151
unsigned init_mss
Initial maximum segment size of the sender in intiator-defined units.
Definition: reno.h:135
State object for CongURE Reno.
Definition: reno.h:169
uint16_t in_flight_size
Sum of caller-defined units of message sizes of all messages that are yet not ack'd or declared lost.
Definition: reno.h:186
uint32_t last_ack
ID of the last ACK reported.
Definition: reno.h:176
congure_wnd_size_t mss
Maximum segment size of the sender in caller-defined units.
Definition: reno.h:180
congure_snd_t super
see congure_snd_t
Definition: reno.h:170
uint8_t dup_acks
Number of duplicate ACKs reported.
Definition: reno.h:187
const congure_reno_snd_consts_t * consts
Constants.
Definition: reno.h:175
congure_wnd_size_t ssthresh
Slow-start threshold.
Definition: reno.h:181
Object to represent an ACK to a message.
Definition: congure.h:83
Object to represent a collection of sent messages.
Definition: congure.h:65
Base state object for CongURE implementations.
Definition: congure.h:48