News for hackers. Stuff that matters.
Re:Hooray for the Sockets Interface by inigyou on Wednesday July 29, 2026 @07:50AM (#49096249)
there is no protocol specific name resolution. getaddrinfo tells you which type of socket you need to connect to the remote endpoint!
Re:Hooray for the Sockets Interface by cyberax on Wednesday July 29, 2026 @02:46PM (#49101415)
Yes, there is. GAI was standardized in 2002, so it's not a part of the original sockets. And it still does not support Happy Eyeballs.
Re:Hooray for the Sockets Interface by inigyou on Wednesday July 29, 2026 @05:51PM (#49103544)
It does return a list of addresses you should try, in preference order, and possibly of different types.

I think Happy Eyeballs can't be implemented at that layer. It's inherently involved up to layer 7.

Re:Hooray for the Sockets Interface by cyberax on Wednesday July 29, 2026 @07:21PM (#49104358)
Happy Eyeballs was a bad fit for network-level implementation exactly because of sockets. But there's nothing inherently app-level about using multiple probing connections in parallel and then selecting the best one. If the IPv6 authors specified this behavior in the original IPv6 RFCs, we would have taken this behavior for granted.

After all, why would you expect every program under the sun to deal with all the possible network protocols? Who on Earth would expect every software to be rewritten to use IPv6 or SCTP?!? We don't have special open() calls for files on floppy disks or RAM disks, after all.

Sockets already have these "automatic" behaviors. For example, for the connection source address selection. Very few programs explicitly select it, although it's possible.

GAI was a late addition, and it's also awkward in itself.

Re:Hooray for the Sockets Interface by inigyou on Thursday July 30, 2026 @01:18AM (#49106335)
Why would you implement multiple concurrent connections at the network level instead of making the one single connection work well?
Re:Hooray for the Sockets Interface by cyberax on Thursday July 30, 2026 @03:39AM (#49107060)
Because there's no way to make that one connection that works well. IPv6 transitional state is fundamentally less stable than IPv4.

If you mean that one connection should be able to use multiple address families and addresses, then yes. It would be great, but at a much higher complexity than just making several connections at once and then discarding all but the first succcessful one.

Re:Hooray for the Sockets Interface by inigyou on Friday July 31, 2026 @10:20AM (#49123493)
> there's no way to make that one connection that works well

Really? With unlimited ability to tamper with the stuff below the sockets layer, you couldn't make a reliable network? I'm surprised.