reno.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 
23 #ifndef CONGURE_RENO_H
24 #define CONGURE_RENO_H
25 
26 #include <stdint.h>
27 
28 #include "congure.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
38 
60 typedef struct {
67  void (*fr)(congure_reno_snd_t *c);
68 
77  bool (*same_wnd_adv)(congure_reno_snd_t *c, congure_snd_ack_t *ack);
78 
93  void (*ss_cwnd_inc)(congure_reno_snd_t *c);
94 
111  void (*ca_cwnd_inc)(congure_reno_snd_t *c);
112 
129  void (*fr_cwnd_dec)(congure_reno_snd_t *c);
130 
138  unsigned init_mss;
139 
147 
155 
160 
164  uint8_t frthresh;
166 
179  uint32_t last_ack;
189  uint16_t in_flight_size;
190  uint8_t dup_acks;
191 };
192 
204  const congure_reno_snd_consts_t *consts);
205 
228 
237 
248  unsigned msg_size);
249 
257 
266 
275  congure_snd_msg_t *msgs);
276 
285  congure_snd_msg_t *msgs);
286 
295  congure_snd_ack_t *ack);
296 
307 #ifdef __cplusplus
308 }
309 #endif
310 
311 #endif /* CONGURE_RENO_H */
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:41
uint32_t ztimer_now_t
type for ztimer_now() result
Definition: ztimer.h:311
Constants for the congestion control.
Definition: reno.h:60
congure_wnd_size_t init_ssthresh
Initial slow-start threshold in initiator-defined units.
Definition: reno.h:159
congure_wnd_size_t cwnd_upper
Initial upper bound for initial window initiator-defined units.
Definition: reno.h:146
uint8_t frthresh
Threshold for duplicate ACKs to go into Fast Retransmit.
Definition: reno.h:164
congure_wnd_size_t cwnd_lower
Initial lower bound for initial window initiator-defined units.
Definition: reno.h:154
unsigned init_mss
Initial maximum segment size of the sender in intiator-defined units.
Definition: reno.h:138
State object for CongURE Reno.
Definition: reno.h:172
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:189
uint32_t last_ack
ID of the last ACK reported.
Definition: reno.h:179
congure_wnd_size_t mss
Maximum segment size of the sender in caller-defined units.
Definition: reno.h:183
congure_snd_t super
see congure_snd_t
Definition: reno.h:173
uint8_t dup_acks
Number of duplicate ACKs reported.
Definition: reno.h:190
const congure_reno_snd_consts_t * consts
Constants.
Definition: reno.h:178
congure_wnd_size_t ssthresh
Slow-start threshold.
Definition: reno.h:184
Object to represent an ACK to a message.
Definition: congure.h:86
Object to represent a collection of sent messages.
Definition: congure.h:68
Base state object for CongURE implementations.
Definition: congure.h:51