[Live-devel] Groupsock doesn't bind to Multicast Address
Ross Finlayson
finlayson at live555.com
Tue Oct 3 02:55:07 PDT 2006
>I am relatively new user to the Live Media library. In our
>application, we would like to bind to a multicast address in
>addition to binding to the local port number. This is so that we
>*only* receive packets destined for a given Multicast address & port
>combination and prevent other datagrams destined for that same port
>from being deliverd to our socket.
This is often an operating system issue. Some OSs work the way you
want; others do not.
>// change imr.imr_interface.s_addr = ReceivingInterfaceAddr; to following:
>
>if (IN_MULTICAST(ntohl(ReceivingInterfaceAddr))) {
> // Bound to MULTICAST Address, so use INADDR_ANY as the i/f address
> imr.imr_interface.s_addr = INADDR_ANY;
> }
> else {
> // Bound to UNICAST Address, so use this address as the i/f address
> imr.imr_interface.s_addr = ReceivingInterfaceAddr;
> }
This is bogus, because the default value of "ReceivingInterfaceAddr"
*is* INADDR_ANY. I.e., you'll get the same effect as your proposed
change if you don't set "ReceivingInterfaceAddr" at all.
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20061003/d6cc2b16/attachment.html
More information about the live-devel
mailing list