Unofficial Hacker News companion — get notified on comment replies, and more.

A portable SCTP userland stack (opens external site)

42 points by mococa 2 days ago | github.com | 59 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (7)

  1. Only if you think that spending 8 extra bytes to get 1 extra byte of format identifier is making your case for you. Just to make it really, really obvious, doing it directly on top of IP would cost like 1, maybe 2 extra bytes to get 1 extra byte of format identifier. Strictly inferior to the alternative on a technical level. And that is ignoring the extra cost of adding a extra checksum, a cost so not worth it that IPv6 decided to remove it from the header format even though it was present in IPv4.

    The only compelling argument is deployability, but, as I clearly pointed out above, that is a invalid argument because it is a consequence of the decision to ban anything other than TCP and UDP. Arguing that using UDP is the best choice because using anything else is banned is circular reasoning at its finest. As I also acknowledged above it is the state of the world right now and it is what you need to do to get deployed, but it is not a technical argument in favor of that technical decision. It is a terrible technical decision being propped up by ossification.

    Replies (1)
    1. You're just saying the same things over again. I especially like the accounting you did with the header bytes to avoid acknowledging UDP has 32 bits of multiplexing ID to IP's 8. I don't grant the premise that these are meaningful size differences to begin with, but if we're playing that game, we can golf a bunch of stuff out of the IP header too.

      You also skated past half the deployability argument. It's not just that basically every middlebox on the Internet, old and new, will refuse to forward martian IPPROTO datagrams. It's also that every mainstream operating system prevents normal programs from programming IP directly.

      All this drama... to save, like, 3-6 bytes? Yeah, seems like a pretty bad trade.

      Replies (2)
      1. It is clear that you have no interest is making a technical argument about protocol design. Have a nice day.
        Replies (2)
        1. You get how that's a weird thing to say to someone who is golfing the IP header in the very comment you responded to, right? It's ok to just disagree with people.
        2. It seems like `tptacek's argument is something along the lines of 'maybe you can save bytes, but the cost of doing so is making your protocol basically impossible to deploy on the open internet', which to me is a perfectly reasonable technical argument.
      2. >It's also that every mainstream operating system prevents normal programs from programming IP directly.

        Well yes, because transport is typically handled by the kernel. Do you think UDP should be the only protocol handled by kernel and kernel TCP stack shouldn't exist?

        Replies (1)
        1. You can't reasonably demand that TCP ride on UDP, because TCP precedes UDP by several years. But if the chronology was reversed, then, yes: it would make more sense for TCP to be a UDP protocol (you'd unify the port spaces, most likely, and obviously strip from the TCP header the duplicative fields).

          There's no coherent "transport" vs. "network" design line here for what does and doesn't belong in the kernel, though if there was, you might just as well say that SCTP needlessly opted into requiring a kernel implementation, which is one of many factors that destroyed its marketability.