[Mono-dev] mutilcast group membership doesn't work

Gladish, Jacob Jacob.Gladish at sig.com
Fri Mar 13 10:43:53 EDT 2009


Nothing appears to be returned from a call to  NetworkInterface.GetIPProperties().MulticastAddresses, when I'm joined to one or more multicast groups.  I confirmed that on Windows using MS.NET that it indeed returns all multicast joins for each interface.

The mono framework appears to be using getifaddrs(3). I don't know whether that's supposed to return multicast info or not. I ran a small test on Linux calling it directly. No multicast addresses where returned. I wanted to confirm this behavior with someone else before filing a bug.

If you run strace on netstat you'll see that it reads /proc/net/igmp.


using System;
using System.Net.NetworkInformation;

namespace McastInfo
{
    class Program
    {
        static void Main(string[] args) {
            foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) {
                Console.WriteLine("interface: {0}", nic.Description);
                foreach (MulticastIPAddressInformation mcastInfo in nic.GetIPProperties().MulticastAddresses) {
                    Console.WriteLine("mcast-addr: {0}", mcastInfo.Address);
                }
            }
        }
    }
}

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


More information about the Mono-devel-list mailing list