* Linux Networking Internals Question
@ 2018-06-16 17:16 V.Ravikumar
2018-06-16 17:40 ` Rami Rosen
0 siblings, 1 reply; 4+ messages in thread
From: V.Ravikumar @ 2018-06-16 17:16 UTC (permalink / raw)
To: kernelnewbies
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180616/5d88b9c6/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Linux Networking Internals Question
2018-06-16 17:16 Linux Networking Internals Question V.Ravikumar
@ 2018-06-16 17:40 ` Rami Rosen
2018-06-16 17:47 ` V.Ravikumar
0 siblings, 1 reply; 4+ messages in thread
From: Rami Rosen @ 2018-06-16 17:40 UTC (permalink / raw)
To: kernelnewbies
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@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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Linux Networking Internals Question
2018-06-16 17:40 ` Rami Rosen
@ 2018-06-16 17:47 ` V.Ravikumar
2018-06-25 22:51 ` Tobin C. Harding
0 siblings, 1 reply; 4+ messages in thread
From: V.Ravikumar @ 2018-06-16 17:47 UTC (permalink / raw)
To: kernelnewbies
Understood Rami Rosen. Thank you.
Regards
Ravi
On Sat, Jun 16, 2018 at 11:10 PM, Rami Rosen <roszenrami@gmail.com> wrote:
> 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@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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180616/e31264f8/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Linux Networking Internals Question
2018-06-16 17:47 ` V.Ravikumar
@ 2018-06-25 22:51 ` Tobin C. Harding
0 siblings, 0 replies; 4+ messages in thread
From: Tobin C. Harding @ 2018-06-25 22:51 UTC (permalink / raw)
To: kernelnewbies
On Sat, Jun 16, 2018 at 11:17:01PM +0530, V.Ravikumar wrote:
> Understood Rami Rosen. Thank you.
>
> Regards
> Ravi
>
> On Sat, Jun 16, 2018 at 11:10 PM, Rami Rosen <roszenrami@gmail.com> wrote:
>
> > 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@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.
Or you could read Rami's book, you will learn a whole bunch :)
Tobin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-06-25 22:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-16 17:16 Linux Networking Internals Question V.Ravikumar
2018-06-16 17:40 ` Rami Rosen
2018-06-16 17:47 ` V.Ravikumar
2018-06-25 22:51 ` Tobin C. Harding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).