ACCF_DATA(9)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 14.5, freebsd 15.1

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