When reading C source code, I see the socket function used to open a connection. When I search for the definition of socket in the Linux kernel source code (version 3 and above) using grep, I can find more calls to socket but not the definition.
Where is socket defined? Is it defined in the source code of the ethernet card?