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