dns_mx_packet(3)
β¨ dns_mx_packet(3) β¨
okay so bestie, welcome to the dns_mx_packet page β it lives in the Library Functions Manual, section 3, and it is lowkey the backstage crew of DNS lookups. π
πΈ NAME πΈ
dns_mx_packet β pull the MX records out of a DNS answer packet π
π¦ SYNTAX π¦
#include <libowfat/dns.h>
int dns_mx_packet(stralloc* out,const char* buf,
unsigned int len);
π DESCRIPTION π
So dns_mx_packet is a low-level component of dns_mx, and the whole reason it exists is to make asynchronous DNS lookups possible. iykyk. π«Ά
Here's the vibe: it reads a DNS packet of length len out of buf, extracts the MX records from the answer section of that packet, drops the result into out, and then returns 0 or -1 β exactly the same way dns_mx does. no cap, same energy, same return values. β¨
bestie this is the plumbing-level function fr fr β if you just wanna do a normal MX lookup, go hang with dns_mx instead. this one is for when you are the one juggling the packets. π
π SEE ALSO π
and that's the whole page, periodt π that was dns_mx_packet(3), straight out of the Library Functions Manual, page 3, and honestly? iconic. go read dns_mx(3) next, ily, bye ππΈ
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms