kernel_sock_ip_overhead(9)
π NAME π
kernel_sock_ip_overhead β bestie, this one literally tells you the IP overhead that a socket is imposing β¨
(also hi, you're reading the Kernel API Manual, welcome to the group chat π«Ά)
πΈ SYNOPSIS πΈ
u32 kernel_sock_ip_overhead (struct sock *sk );
π ARGUMENTS π
skβ the socket. that's it. that's the whole argument. iconic of it honestly π
π¦ DESCRIPTION π¦
okay so picture this: this routine returns the IP overhead imposed by a socket β like, the actual length of the underlying IP header π and that number depends on two things:
- whether this is an IPv4 or an IPv6 socket π
- the length that comes from IP options that are turned on at the socket β¨
β οΈ important vibe check: this assumes that the caller has a lock on the socket. no lock, no peace, bestie. don't come crying to me π
π SEE ALSO π
Kernel file ./net/socket.c β and here's the whole friend group, no cap, everybody's invited π«Ά:
move_addr_to_kernel(9)move_addr_to_user(9)sock_read_xattr(9)sock_alloc_file(9)sock_from_file(9)sockfd_lookup(9)sock_alloc(9)sock_release(9)sock_sendmsg(9)kernel_sendmsg(9)sock_recvmsg(9)kernel_recvmsg(9)sock_create_lite(9)__sock_create(9)sock_create(9)sock_create_kern(9)sock_register(9)sock_unregister(9)kernel_bind(9)kernel_listen(9)kernel_accept(9)kernel_connect(9)kernel_getsockname(9)kernel_getpeername(9)kernel_sock_shutdown(9)
that's the whole page, mwah π
this little masterpiece lives in ./net, it's dated October 2026, and it's filed under kernel_sock_ip_overhead(9) β go forth and compute your overheads, bestie, i'm obsessed with you fr fr ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms