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 (5)

  1. How do port numbers complicate the picture? In the worst case you just allocate a fixed port number and run the whole protocol as if it was riding IP instead of UDP. Someone else complained about the wire encoding waste, but come on, we're in Bernstein's "Modest Proposal" territory here. Other than the 1-3 bytes you spend (3-5 if you want to count the UDP sum against the design because you're going to do a better checksum), you lose nothing. Riding on IP gets you nothing.
    Replies (1)
    1. > How do port numbers complicate the picture?

      If they can vary then discovery is made more complex. If you fix the port number then discovery is not made more complex, but you lose the multiplexing you advertised as a feature earlier.

      We're broadly in agreement except that you don't care to tell middlebox engineers to cut the shit, and I do. That's basically the only daylight between us here, I think. Fighting every little point serves to obscure my message to middlebox engineers.

      Replies (1)
      1. No, you don't lose the multiplexing. This is simple. IP has an 8 bit multiplexing ID and you pay heavily in deployability (not just from middleboxes) to use it. UDP has a 16-32 bit multiplexer ID, depending on how you choose to encode and interpret it, and you can use it freely. It costs you nothing but a (very few) bits on the wire to fix a UDP port number, forever carving a path for your upper-layer protocol, and then do whatever other multiplexing you want.

        That's what every protocol already does! That's what a URL is, or a channel identifier, or a path, or a session identifier. The worst protocols in the world are the ones that use UDP/TCP port numbers directly as a multi-application multiplexing ID.

        Replies (1)
        1. We're going in circles. I believe readers can see that you've contradicted yourself (if ports complicate discovery then fix the ports, but also ports give you multiplexing if you're running over UDP, and you don't want to multiplex at the IP layer because middleboxes and API issues), but also that it's not super critical. My point as to what I want stands. I see no point continuing this sub-thread.
          Replies (1)
          1. I don't even understand the UDP port controversy. All I care about with UDP ports is that there's a bigger multiplexing ID space than IP protocols, which can only accommodate 256 protocols. My entire thing about UDP is that it doesn't do anything, which means riding UDP is functionally the same as riding IP, but with none of the deployability problems.

            At bottom I think defining direct-on-IP protocols is a vanity exercise. I think that's why SCTP works that way: because they felt like their protocol was too important to do on UDP. That's why OSPF does this, too.