Consider we have a server that forks children after accept() returns, each child handling a client connection.

By using getsockname() and getpeername() I can see that all packets enter the server through the same port.

How does the kernel know which child the different packets are directed to?

Thanks in advance !