Where is the Linux socket implementation implemented?

In C programs, to use sockets, we need to enable:

#include<sys/socket.h>

I searched the file socket.c(implementation <sys/socket.h>) but did not find it ( find -iname "socket.c*")

  • Where can I find a Linux socket implementation?
  • Can I change this file and change this implementation?
+4
source share
2 answers

The header file contains declarations for system calls associated with sockets. To get started with the implementation, consider the link net/socket.cto the Linux source tree .

- Linux - , GNU GPL. , , ​​ , , , (, ).

+4

socket() net/socket.c linux kernel

SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol)

.

+1

Source: https://habr.com/ru/post/1680513/


All Articles