Jump to content

Receiving an IPv6 Multicast Message

- - - - -

  • Please log in to reply
No replies to this topic

#1
feno

feno

    Newbie

  • Members
  • Pip
  • 1 posts
Hi!

Im working with IPv6 on C#, developing a Router Advertisement Daemon. Im having problems to receive the Router Solicitation Messages.

The Router Solicitation Messages are sended to the All-Routers Multicast Address FF02::2. This is what i've tried so far:

Socket socket = new Socket(AddressFamily.InterNetworkV6, SocketType.Raw, ProtocolType.IcmpV6);    

    

IPv6MulticastOption multicastOption = new IPv6MulticastOption(IPAddress.Parse("FF02::2"));    

socket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.AddMembership, multicastOption);    

        

IPEndPoint iep = new IPEndPoint(IPAddress.IPv6Any, 0);    

socket.Bind(iep);    

        

IPEndPoint multiep = new IPEndPoint(IPAddress.Parse("FF02::2"), 0);    

EndPoint ep = (EndPoint)multiep;    

        

byte[] data = new byte[100];    

socket.ReceiveFrom(data, ref ep);

The program stays waiting forever...

I've also tried:

using the All-Node Multicas Address FF02::1 (in case the AddMembership isnt working).
sending the Router Solicitation Message directly to the host (unicast address).
many other things...

Can anybody help me plz? thanks!!

---Im using VS2008




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users