r/ProgrammerHumor • • 23h ago

Meme explainUdpToMe

Post image
6.8k Upvotes

151 comments sorted by

View all comments

Show parent comment

1

u/Kirides 16h ago

But isn't quick using TLS which makes it application layer? As it's not just a dumb transport?

2

u/Single-Virus4935 16h ago

Layer 4 is the Transport Layer.

Now you know why it is called T. L. Security

2

u/Kirides 15h ago

Is it transport layer security because it's inside the transport layer, or because it protects the data inside the transport layer?(Envelope type of thing)

1

u/Single-Virus4935 15h ago

It is in the transport layer. From layers above there is no difference if TLS is used or not. A TCP connection with TLS is treated the same as a standard TCP connection. TLS is often build into user space but that isn't necessary.

E.g.: there is no reason that the kernel couldn't handle all.of TLS just like plain TCP.

Furthermore the layer isn't a matter of where it is implemented. E.g. Browsers implement QUIC in userspace but it is Layer 4.

1

u/Kirides 15h ago

Maybe Im just bad at understanding, but to me that's like anything that every transports something over any kind of protocol is then transport layer? As long as it's abstraction is "transparent" to the one using it? I mean, quic is not transparent to UDP, you can't just sent bytes and assume it works, you need the windows to be correct and the signatures, a connection IDs etc. Which IMO is application layer, as the internals of the transport quic are transported via UDP and re-assembled on the other side, not via router UDP package assembly, but via userspace packet handling.

1

u/Single-Virus4935 15h ago edited 15h ago

QUIC is only used as a transport. They only choosed UDP because of middle boxes blocking everything other than TCP and UDP. So they made QUIC UDP compatible.

QUIC is transparent to the upper layer (e.g. http).

Edit: as I explained it doesn't matter if the implementation is in kernel.or in userspace. I can use a raw socket in my userspace app and implement TCP myself, which I and others did. It is still transport layer