The socket() function is not a kernel function, it is a libc .
If you want to learn socket() internals, get the glibc code (or any implementation of the standard C library), not the kernel code.
If you plan to go even deeper and learn how the kernel implements the socket mechanism, find the sys_socketcall() system call.
source share