Linux Networking Internals Question

Rami Rosen roszenrami at gmail.com
Sat Jun 16 13:40:30 EDT 2018


Hi Ravi,
The path that a packet goes through, from being received by the
network driver and up to kernel Layer 3 (IPV4/IPV6) and from
there to kernel Layer 4 (UDP/TCP/SCTP/other sockets) and from there to
userspace sockets is quite complex. The logic is heavy, on that path
there are lookups in routing tables, netfilter hooks, sanity checks,
interaction with other subsystems, and more.

In order to try to simplify things, and not go into deep technical
details, we can say that generally the 5 tuple of the packet (SRC
address, DST address, SRC port, DST port and protocol) is what
determines to which socket it will go.

Regards,
Rami Rosen
http://ramirose.wixsite.com/ramirosen




On 16 June 2018 at 20:16, V.Ravikumar <ravikumar.vallabhu at gmail.com> wrote:
> Hi All,
>
> I wanted to know how a packet received will be handovered to a correct user
> process.
> Basically I want to understand what are the various header parameters in
> packet which will help to  find the open socket descriptor  of respective
> user process. I'm not able to find the exact  answers in the web.
>
> Thanks in advance
>
> Regards,
> Ravi
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



More information about the Kernelnewbies mailing list