<div dir="ltr">Understood Rami Rosen. Thank you.<div><br></div><div>Regards</div><div>Ravi<br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 16, 2018 at 11:10 PM, Rami Rosen <span dir="ltr"><<a href="mailto:roszenrami@gmail.com" target="_blank">roszenrami@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ravi,<br>
The path that a packet goes through, from being received by the<br>
network driver and up to kernel Layer 3 (IPV4/IPV6) and from<br>
there to kernel Layer 4 (UDP/TCP/SCTP/other sockets) and from there to<br>
userspace sockets is quite complex. The logic is heavy, on that path<br>
there are lookups in routing tables, netfilter hooks, sanity checks,<br>
interaction with other subsystems, and more.<br>
<br>
In order to try to simplify things, and not go into deep technical<br>
details, we can say that generally the 5 tuple of the packet (SRC<br>
address, DST address, SRC port, DST port and protocol) is what<br>
determines to which socket it will go.<br>
<br>
Regards,<br>
Rami Rosen<br>
<a href="http://ramirose.wixsite.com/ramirosen" rel="noreferrer" target="_blank">http://ramirose.wixsite.com/<wbr>ramirosen</a><br>
<div><div class="h5"><br>
<br>
<br>
<br>
On 16 June 2018 at 20:16, V.Ravikumar <<a href="mailto:ravikumar.vallabhu@gmail.com">ravikumar.vallabhu@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I wanted to know how a packet received will be handovered to a correct user<br>
> process.<br>
> Basically I want to understand what are the various header parameters in<br>
> packet which will help to find the open socket descriptor of respective<br>
> user process. I'm not able to find the exact answers in the web.<br>
><br>
> Thanks in advance<br>
><br>
> Regards,<br>
> Ravi<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.<wbr>org</a><br>
> <a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.<wbr>org/mailman/listinfo/<wbr>kernelnewbies</a><br>
><br>
</blockquote></div><br></div></div></div>