.NET Framework Bookmark and Share   
 index > Network Class Library (System.Net) > IPV6 multicast only seeing packets being sent by local PC
 

IPV6 multicast only seeing packets being sent by local PC

While experimenting with some SSDP stuff I’m finding that when I listen for IPv6 based broadcasts... using the following code, I only get local SSDP broadcast packets (as in those originating from my local machine)... and not those that are originating from other PCs on the network... and this despite the fact that I see everything I am looking for in Wireshark.

      private const int groupPort = 1900;

      public void Start()
      {
         ThreadPool.QueueUserWorkItem(new WaitCallback(StartListener), IPAddress.Parse("[FF02::C]"));
      }

      private static void StartListener(object o)
      {
         StartListener((IPAddress)o);
      }
  
      private static void StartListener(IPAddress groupAddress)
      {
         try
         {
            bool done = false;

            UdpClient listener = new UdpClient(groupPort, groupAddress.AddressFamily);
            IPEndPoint groupEP = new IPEndPoint(groupAddress, groupPort);
            
            listener.JoinMulticastGroup(groupAddress);

            while (!done)
            {
               //Never sees IPV6 multicast packets sent by other local PCs
               byte[] bytes = listener.Receive(ref groupEP);

               �




It’s also worth nothing that if the above code is kicked off for IPV4 multicast ala:

ThreadPool.QueueUserWorkItem(new WaitCallback(StartListener), IPAddress.Parse("239.255.255.250"));

... all works as expected.

Please tell me I'm doing something obviously wrong.

Now an enthusiast on the inside
  • Edited byBrendan Grant Sunday, September 13, 2009 12:59 AMtrying to fix code formatting
  • Edited byBrendan Grant Sunday, September 13, 2009 1:05 AMFixing minor typo from debug attempts
  •  
Brendan Grant
Are you sure the other pc are sending IPV6 multicast packets?
Ali A G
I am... in Wireshark when capturing the traffic (and just filtering for multicast traffic) I see the expected packets being generated by the other PCs as well as my own... and moving the app to another PC for testing sees the same results... multicast packets are being received by other apps on the machine (Windows Media Player specifically)... but my app is only able to see those IPv6 packets that were sent from the local machine.
Now an enthusiast on the inside
Brendan Grant
Do you have a firewall that might be blocking the incoming packets?
feroze
--
My blog
Feroze Daud

You can use google to search for other answers

Custom Search

More Threads

• How to identify FTP Connection closed due to some exceptions?
• applications requesting internet connection notification
• How can i do a POST request faster (httpWebRequest, VB.NET)
• socket Exception in certain times
• check Yahoo Messenger user online status (C#)?
• Server-client discovery without port forwarding
• Any tips/advice for my server project?
• Can't Read attachment of a mail sent using System.Net.Mail namespace
• Originate mail from an external dll
• Connect to Gateway server directly?