I read that getaddrinfo() returns addresses sorted based on RFC 3484. I'm using the attached program to test it and I'm not sure if they are sorted. I looked at the musl getaddrinfo.c here: https://github.com/idunham/musl/blob/master/src/network/getaddrinfo.c I don't see an obvious sort in the code. Is it there? John