| ▲ | Veserv a day ago | ||||||||||||||||||||||||||||||||||||||||||||||
Again, the backwards question. The actual question is: “What does UDP get you that IP does not get you?” UDP is just a length, checksum, source, and destination application routing address. IPv4 has a length, checksum, source, and destination machine routing address. IPv6 has a length, source, and destination machine routing address (having determined computing the checksum at this layer is a waste). They hold the same class of information except that layering UDP gives you a additional 16-bits of routing on top of your IP routing which is somewhat relevant for IPv4, but meaningless for IPv6. And the additional routing bits for IPv4 should have always been resolved at the IP routing layer anyways which is exactly what IPv6 did (though done poorly in my opinion, but at least solved the need for more bits). Flexible usage of UDP for higher level protocols effectively uses the destination port as the “Next Header” field present in IP protocols. The only advantage there is it is a 16-bit format identifier instead of 8-bit, but now the field is doing double duty as a application-level routing address and a format identifier. Placing a subsequent format identifier in the UDP payload then extends your format identifier further, but at least mostly preserves the application-level routing model of the destination port. If you actually need the extra formats then IP can easily reserve a few format values to indicate a even wider format identifier immediately afterward. | |||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | tptacek 21 hours ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||
I feel like you're making my case for me. You lose nothing by building on top of UDP. You gain (marginally) flexibility, since UDP has a larger multiplexing ID (and since userland on mainstream operating systems can program it directly), and you gain (massively) deployability --- which is why we have mainstream HTTP/3 deployments, and virtually no SCTP at all outside of private telecom use cases. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||