TCP_CONGCTL(9)
π TCP_CONGCTL(9) π
okay so bestie, welcome to the Kernel Developer's Manual page for tcp_congctl β yes that's the section 9 one, kernel dev territory, put your big-girl hat on π
β¨ NAME β¨
tcp_congctl β the TCP congestion control API, aka the plug-and-play system for congestion control algorithms π¦
β¨ SYNOPSIS β¨
#include <netinet/tcp_congctl.h>
int
tcp_congctl_register(const char *, struct tcp_congctl *);
int
tcp_congctl_unregister(const char *);
β¨ DESCRIPTION β¨
so the tcp_congctrl API is literally the whole vibe for adding or removing TCP congestion control algorithms on-the-fly and for modularizing them π« it's giving hot-swappable networking, no cap. it includes basically two functions:
tcp_congctl_register(const char *, struct tcp_congctl *)β registers a new congestion control algorithm, slay π thestruct tcp_congctlargument 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, unregisters the selected TCP congestion control algorithm. bye bestie π
β¨ RETURN VALUES β¨
tcp_congctl_register() and tcp_congctl_unregister() both return 0 when there is no error π zero means iconic, zero means we ate.
- if the name is already registered,
tcp_congctl_register()will returnEEXISTπ (bestie that name is taken) tcp_congctl_unregister()can returnENOENTif there is no congestion control algorithm by that name π (ghosted, doesn't exist)- and it can return
EBUSYif the matched algorithm is being used by userspace applications π (can't unregister it, it's literally in a relationship with a userspace app right now)
β¨ FILES β¨
- implementation is in
sys/netinet/tcp_congctl.cπΈ - the interface is in
sys/netinet/tcp_congctl.hπΈ
β¨ SEE ALSO β¨
tcp(4)π₯
and that's the whole page, no notes π«Ά this one's from Debian, dated October 15, 2006 β yes she's an older queen but she still slays, periodt π β¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2006 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms