I am having troubles finding answer to this question:
When the kernel receives a packet and processes it, how does it knows which sockets are available? I have seen that there is some kind of a socket queue, but I am trying to dive into the details.
Is there a queue for each type of family (SOCK_RAW, SOCK_DGRAM, etc) and the relevant protocol handler checks whether in its queue for the relevant sockets, or is there one united queue? Or maybe I am wrong and it happens in a completely different way...