The
tcp_congctrl API is used to add or remove TCP congestion control algorithms on-the-fly and to modularize them. It includes basically two functions:
tcp_congctl_register(const char *, struct tcp_congctl *)
Registers a new congestion control algorithm. The
struct tcp_congctl argument must contain a list of callbacks like the following:
struct tcp_congctl {
int (*fast_retransmit)(struct tcpcb *,
struct tcphdr *);
void (*slow_retransmit)(struct tcpcb *);
void (*fast_retransmit_newack)(struct tcpcb *,
struct tcphdr *);
void (*newack)(struct tcpcb *,
struct tcphdr *);
void (*cong_exp)(struct tcpcb *);
};
tcp_congctl_unregister(const char *)
If found, unregister the selected TCP congestion control algorithm.