ACCF_DNS(9)
π accf_dns, aka ACCF_DNS(9) β bestie edition π
okay so this is the ACCF_DNS(9) page from the Kernel Developer's Manual, and it's all about the accf_dns accept filter. slay. β¨
πΈ NAME πΈ
okay so accf_dns β buffer incoming DNS requests until the whole first request is present. that's the entire mission, bestie. π
β¨ SYNOPSIS β¨
Kernel config vibes:
options INET
options ACCEPT_FILTER_DNS
In rc.conf(5):
kld_list="accf_dns"
π¦ DESCRIPTION π¦
This is a filter to be placed on a socket that will be using accept() to receive incoming connections. no cap. π«Ά
It prevents the application from receiving the connected descriptor via accept() until a whole DNS request is available on the socket. It does this by reading the first two bytes of the request, to determine its size, and waiting until the required amount of data is available to be read. lowkey clever, honestly. π
The ACCEPT_FILTER_DNS 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. periodt. π
π EXAMPLES π
If the accf_dns module is available in the kernel, the following code will enable the DNS accept filter on a socket sok. iconic behavior. π
struct accept_filter_arg afa;
bzero(&afa, sizeof(afa));
strcpy(afa.af_name, "dnsready");
setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
π₯ SEE ALSO π₯
go read the friends, bestie. iykyk. πβ¨
β HISTORY β
The accept filter mechanism was introduced in FreeBSD 4.0. retro but still main character energy. π°οΈπ«
π AUTHORS π
This manual page and the filter were written by David Malone. ty for your service, king. π«‘π
with love from the Debian build, dated July 16, 2008 β bye bestie! ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2008 David Malone
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms