int
tcp_congctl_register(const char *, struct tcp_congctl *)
int
tcp_congctl_unregister(const char *)
const char *, struct tcp_congctl *)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 *);
};
const char *))
and
tcp_congctl_unregister()
both return
0
when there is no error.
If the name is already registered,
tcp_congctl_register()
will return
EEXIST.
tcp_congctl_unregister()
can return
ENOENT
if there is no congestion control algorithm by that name and can return
EBUSY
if the matched algorithm is being used by userspace applications.
sys/netinet/tcp_congctl.c
and the interface is in
sys/netinet/tcp_congctl.h.