sock_register(9)
π sock_register(9) β the Kernel API Manual glow-up you didn't know you needed π
okay bestie, welcome to the Kernel API Manual page for sock_register(9) β yes, that's the manual name, we're just folding it in all cute instead of making it the whole first line, periodt.
β¨ NAME β¨
sock_register β add a socket protocol handler π«Ά
πΈ SYNOPSIS πΈ
int sock_register (const struct net_proto_family *ops );
no cap, that's the whole signature. keep it exactly like that, character for character, because the kernel does not do "close enough" π
π ARGUMENTS π
opsβ the description of the protocol. like, this is the little info card your protocol handler hands over so everyone knows what it is β¨
π¦ DESCRIPTION π¦
so here's the vibe: a protocol handler calls this function when it wants to advertise its address family and get linked into the socket interface. iconic behavior, honestly.
the value ops->family corresponds to the socket system call protocol family. that's the link-up, iykyk. π₯
π SEE ALSO π
lowkey a whole friend group of kernel file ./net/socket.c references and related functions β every single one is invited to the group chat, no one gets left on read:
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_unregister(9)kernel_bind(9)kernel_listen(9)kernel_accept(9)kernel_connect(9)kernel_getsockname(9)kernel_getpeername(9)kernel_sock_shutdown(9)kernel_sock_ip_overhead(9)
and that's the whole page, bestie β from the ./net corner of the kernel, dated October 2026, signed off with all the sparkle this sock_register(9) moment deserves. slay, register that socket protocol handler, and stay hydrated πβ¨ππ¦πΈπ
π«Άππ₯ππβππππ§π
π¦ 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