sock_create(9)
β¨ sock_create(9) β¨
okay bestie, welcome to the Kernel API Manual entry for sock_create β this is the sock_create(9) page and it's literally the moment where your kernel goes "imma make a socket rn" π
π NAME π
sock_create β creates a socket
πΈ SYNOPSIS πΈ
int sock_create (int family , int type , int protocol , struct socket
**res );
π ARGUMENTS π
familyβ the protocol family (AF_INET, ...) π§typeβ the communication type (SOCK_STREAM, ...) π¦protocolβ the protocol (0, ...) πresβ the new socket π
π₯ DESCRIPTION π₯
So what is this icon actually doing? It's a wrapper around __sock_create. Returns 0 or an error. And the fun lil detail: this function internally uses GFP_KERNEL. no cap π
π SEE ALSO π
okay this list is long but we're not skipping a single one, periodt:
- Kernel file
./net/socket.c 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_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)kernel_sock_ip_overhead(9)
and that's the whole page bestie, slay π
this lil masterpiece is chillin' in ./net, dated October 2026 β sock_create(9) out, mwah π«Άπ
π¦ 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