I have worked with the manual page of the socket() in my Linux system and I was wondering what the functions it is documenting are belonged to.
For example, the function int socket(int domain, int type, int protocol)
. Is the function part of glibc ? Is it direct part of Linux Kernel somehow ? The manual's title Linux Programmer's Manual.
I would love to get an explanation and clarification.
After my little research :
The C POSIX library
, which is the C standard library for POSIX
systems, contains numerous additional functions to those of the ANSI C
standard, most of them are dealing with the operating system for some extremely uses (multithreading implementation, networking(including any kind of communication(IPC for example))), users privileges manging, etc. )
The GNU/Linux
operating system, for example, is compatible with the POSIX
, therefore the glibc
is implementing the C POSIX library standard
(POSIX
libc
) which contains all its additional functions and headers with their Linux implementation using Linux's System Calls.
In our case, the documentation of sockets which introduce in Linux's manual page for developers belongs to the University of California, Berkeley (The developers of that form of sockets and modern networking in general). Because POSIX has "adopted" Berkeley's sockets and has included the header sys/socket.h
in its C standard library the GNU/Linux
system implements it either in its C standard library known as glibc
.
Therefore, that sockets' documentation actually documents the glibc
functions which are completely compatible with the POSIX's sockets functions which are compatible with the Berkeley's.
Thanks a lot for those who have helped!
BTW : Any other answers are welcome.