tcp_internals(3)

πŸ“¦
version 1.0.5 Β· 4 versions
, in ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 header
  • iph β€” pointer to the IPv4 header

Note

nfq_tcp_mangle_ipv4() invokes this function. As long as developers always use nfq_tcp_mangle_ipv4 when changing the content of a TCP message, there is no need to call nfq_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 header
  • ip6h β€” pointer to the IPv6 header

Note

nfq_tcp_mangle_ipv6() invokes this function. As long as developers always use nfq_tcp_mangle_ipv6 when changing the content of a TCP message, there is no need to call nfq_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. πŸ’–πŸŒΈπŸ«Ά