getifaddrs never specifies broadcast addresses

Apple “Feedback” #12149764. According to man 3 getifaddrs: The ifa_dstaddr field references the destination address on a P2P interface, if one exists, otherwise it contains the broadcast address. In my testing the ifa_dstaddr field is never non-null. I’m not sure I have any suitably configured P2P interfaces, but I definitely have interfaces with broadcast capabilities… Read more

getifaddrs returns truncated sockaddr_in’s for AF_INET ifa_netmasks

Apple “Feedback” #12149675. Some netmasks returned by getifaddrs have family of AF_INET yet a length less than sizeof(sockaddr_in), e.g. 5, 6, 7, or 8. On macOS Ventura 13.3.1, at least. It looks like it’s actually allocating only eight bytes for the ifa_netmask (not the 16 that is the size of sockaddr_in per MacOSX13.3.sdk/usr/include/netinet/in.h), as it… Read more