tcp_internals(3)
π tcp_internals(3) π
okay bestie, gather round, because we're diving into the Library Functions Manual and this one is a lil deep cut. it's tcp_internals from the libnetfilter_queue crew β the backstage-pass functions that keep the TCP party running. π
β¨ NAME β¨
tcp_internals β Internal TCP functions
like, literally the internals. the plumbing. the stuff behind the curtain. π«Ά
πΈ SYNOPSIS πΈ
Functions
void nfq_tcp_compute_checksum_ipv4 (struct tcphdr *tcph, struct iphdr
*iph)
void nfq_tcp_compute_checksum_ipv6 (struct tcphdr *tcph, struct ip6_hdr
*ip6h)
two functions. that's the whole vibe. π
π¦ Detailed Description π¦
Most user-space programs will never need these.
no fr, bestie β this is giving "you probably don't need to touch this, and that's okay." if you're just out here writing a normal user-space program, you can scroll past and keep thriving. β¨
π Function Documentation π
π void nfq_tcp_compute_checksum_ipv4 (struct tcphdr * tcph, struct iphdr * iph)
nfq_tcp_compute_checksum_ipv4 β computes IPv4/TCP packet checksum
it does exactly what it says on the tin, no cap. number crunching for your IPv4/TCP checksum. π₯
Parameters
tcphβ pointer to the TCP headeriphβ pointer to the IPv4 header
Note
nfq_tcp_mangle_ipv4()invokes this function. As long as developers always usenfq_tcp_mangle_ipv4when changing the content of a TCP message, there is no need to callnfq_tcp_compute_checksum_ipv4.
so like β nfq_tcp_mangle_ipv4() already calls this for you, bestie. as long as you always reach for nfq_tcp_mangle_ipv4 whenever you're changing the content of a TCP message, you genuinely do not need to call nfq_tcp_compute_checksum_ipv4 yourself. let the mangle function do its thing, it's a whole main character. π
Definition at line 108 of file tcp.c.
π void nfq_tcp_compute_checksum_ipv6 (struct tcphdr * tcph, struct ip6_hdr * ip6h)
nfq_tcp_compute_checksum_ipv6 β computes IPv6/TCP packet checksum
same energy, but make it IPv6. the checksum math, now with extra colons. π¦
Parameters
tcphβ pointer to the TCP headerip6hβ pointer to the IPv6 header
Note
nfq_tcp_mangle_ipv6()invokes this function. As long as developers always usenfq_tcp_mangle_ipv6when changing the content of a TCP message, there is no need to callnfq_tcp_compute_checksum_ipv6.
yes, this is the exact same plot twist as the IPv4 one, just IPv6-coded. nfq_tcp_mangle_ipv6() calls this for you, and as long as developers always use nfq_tcp_mangle_ipv6 when changing the content of a TCP message, there's no need to call nfq_tcp_compute_checksum_ipv6 yourself. obsessed with a function that handles its own business. π
Definition at line 126 of file tcp.c.
π Author π
Generated automatically by Doxygen for libnetfilter_queue from the source code.
(so like, nobody hand-wrote this, it's a robot's masterpiece. we love a machine that serves. π€β¨)
aaaand that's the whole page, bestie!! π this lil gem is from libnetfilter_queue, Version 1.0.5, and it's the tcp_internals(3) page β internal TCP functions, no cap, periodt. go forth and checksum responsibly. ππΈπ«Ά
π¦ where this page comes from
- ubuntu noble: libnetfilter-queue-doc 1.0.5-4build1 Β· GPL-2.0-or-later
- ubuntu questing: libnetfilter-queue-doc 1.0.5-4build1
- ubuntu resolute: libnetfilter-queue-doc 1.0.5-4build2 Β· GPL-2.0-or-later
- ubuntu stonking: libnetfilter-queue-doc 1.0.5-4build2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms