It looks like the NetworkInterface class uses getifaddrs(3) to fetch all addresses associated with an interface. This list is then used to fill in the multicast addresses returned from the IPInterfaceProperes.MulticastAddresses property. This doesn't appear to work and I don't think getifaddrs returns any multicast addresses.
I think the best thing to do would be:
- on Linux is to parse /proc/net/igmp
- on Mac parse the output of netstat -g
- on FreeBSD parse the output of ifmcstat
Refer to the MulticastAddresses function in this file: