[Live-devel] getting multicast source address

Ross Finlayson finlayson at live.com
Tue Jun 1 13:26:40 PDT 2004


At 09:09 AM 6/1/04, you wrote:
>In GroupsockHelper.cpp, the ourSourceAddressForMulticast function is 
>trying to retrieve our source address.
>It does this by sending a dummy multicast packet and looking at it when 
>receiving it.
>
>It uses:
>testAddr.s_addr = our_inet_addr("228.67.43.91"); // arbitrary
>
>In my config, this is failing and I can see a "Unable to determine our 
>source address:" message.

That usually means that IP multicast is not properly configured in your 
operating system, or that your network interface does not loop-back 
multicast packets.  This means, unfortunately, that the multicast test 
programs probably are not going to work for you.  So, you should try to 
figure out what's wrong with your OS.

>When changing the arbitrary IP to "128.0.0.0", this seems to be working.

If you really need to change "ourSourceAddressForMulticast()", you should 
change it to return your computer's IP address *as seen by the outside 
world*.  (So, 128.0.0.0 won't work.)

>Also am I right into thinking that this technique will not work if I am 
>using NAT?

Yes, see above.  "ourSourceAddressForMulticast()" is used primarily by code 
- such as RTSP servers - that need to tell their remote clients their IP 
address.  Because of this, code that uses "RTSPServer" (for example) may 
not work properly if it's sitting behind a NAT.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list