ACCF_DATA(9)
okay so bestie, welcome to ACCF_DATA(9) β the Kernel Developer's Manual page that's literally about making incoming connections wait for actual data before they get handed over β¨
π NAME π
accf_data β buffer incoming connections until data arrives.
β¨ SYNOPSIS β¨
options INET
options ACCEPT_FILTER_DATA
In rc.conf(5):
kld_list="accf_data"
π¦ DESCRIPTION π¦
This is a filter you place on a socket that's gonna use accept() to receive incoming connections. iconic behavior π
It stops the application from receiving the connected descriptor via accept() until data arrives on the connection. no cap β it lowkey makes the app wait for the good stuff.
The ACCEPT_FILTER_DATA kernel option is also a module that can be enabled at runtime via kldload(8) if the INET option has been compiled into the kernel. yep, that's the whole vibe π«Ά
πΈ EXAMPLES πΈ
Assuming ACCEPT_FILTER_DATA has been included in the kernel config file or the accf_data module has been loaded, this will enable the data accept filter on the socket sok.
struct accept_filter_arg afa;
bzero(&afa, sizeof(afa));
strcpy(afa.af_name, "dataready");
setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
π SEE ALSO π
π HISTORY π
The accept filter mechanism and the accf_data filter were introduced in FreeBSD 4.0. vintage but still slaying π
π AUTHORS π
This manual page and the filter were written by Alfred Perlstein. king behavior π
and that's the whole page, bestie β source/version is Debian, dated November 15, 2000. mwah π π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2000 Alfred Perlstein
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms