I thought there was a problem on Big Sur beta with getifaddrs() or with UDP broadcasts.
But the problem turns out to be something else. UDP broadcasts seem to work, The problem occurs, not with the UDP broadcasts, but with the UDP responses to the broadcasts, and not just on Big Sur (and iOS 14), but with the most current release of Catalina 10.15.7.
And, the problem did *not* occur on previous releases of Catalina (from several months ago, maybe 10.15.4? and earlier).
getifaddrs() is returning the IPV4 address 127.0.0.1, and that is the address being used for the UDP broadcast.
On macOS 10.15.7, with code compiled with Xcode 12, the UDP broadcasts to 127.0.0.1 succeed. e.g. they are going out on the local network, as seen by a UDP sniffer running on a Raspberry Pi 4 on the local network.
But, the new binaries never receives a UDP reply from the target responding device that is trying to respond to the UDP broadcast.
However, on the same Mac and macOS 10.15.7, running a binary that was compiled months ago with Xcode 11 from the same source code, that old binary does receive UPD responses to the UDP broadcasts. Reliably. And the code also works just fine on Mohave.
What could cause this difference? Is it intended? (new firewall rules?). Does it require a bug report? (If so, to where?) Or is there a way to turn it on/off, so that UDP responses to broadcast UDP packets can be received?
Note that this UDP (broadcast and response) protocol is an open source protocol being used by likely multiple thousands of existing SDR radios from multiple hardware vendors, and dozens of open source software projects on multiple platforms. e.g. something not likely to change.
And my iOS beta test SDR app did work a few months ago using this protocol, but can't be built with the current Xcode release and still work.