Re: Too much multicasting in Linux

From: Juanjo Aparicio Jara (bnt_at_fastpace.org)
Date: 04/07/04


Date: Wed, 7 Apr 2004 12:11:31 +0000 (UTC)

That is what I expected. However, data is being received by sockets
that didn't join the multicast address where the data is being sent.
That is, data sent to 224.0.1.84 is being received by a socket that
joined ONLY group 224.0.1.85. I assume this is not the expected
behaviour.

I don't think Java is the culprit. As stated before, code in C is doing
the same.

A previous poster suggested that the fact that the sockets are tied to
the interface 0.0.0.0 causes them to receive all data. If the solution
means to bind the sockets to different interfaces I guess they will not
receive the data, which is what I want since they have not joined the
same multicast group. But then, if I have a socket that joins the SAME
multicast group but is tied to a different interface it will not receive
the multicast data. The software I'm working on should work on
different machines in the same LAN.

Anyone have any more ideas?

Thank you very much to all that responded.

In article <4073b747$0$64610$4a441750@news.euronet.nl>, Johan Hendriks wrote:
>
> To send multicast messages, you don't have to do anything special.
> Just apply the multicast address and the kernel (network driver) will
> recognize this and generate
> the expected packets.
>
> Only on the receiving side you must join a multicast group (setsocktopt)
> after binding the socket to a port.
>
> Above applies to a socket implementation. Your JAVA classes should not do
> anything more
>
> Johan
>
>



Relevant Pages

  • Re: socket question: how to use sendto and recvfrom based on the same multicast address
    ... Why don't you just use the same socket for both send and receive? ... multicast address and receive other data from others on the samd ... closesocket; ... if (setsockopt (sockrcv, ...
    (microsoft.public.windowsce.platbuilder)
  • AF_IPN: Inter Process Networking, try these...
    ... If you suspect we would be better using IP multicast, ... Exercise #1. ... I Create a IPN socket, with protocol IPN_VDESWITCH and all the VM can ... or a binary stream. ...
    (Linux-Kernel)
  • Re: divert and deadlock issues
    ... multicast socket options to a divert socket, ... socket that originally sent the multicast packet itself. ... They shouldn't be necessary, however I can foresee situations where someone might well want to redirect multicast datagrams traversing an IPPROTO_DIVERT socket, by using these socket options. ... a divert injection should occur at teh position of the firewall ...
    (freebsd-net)
  • Re: Too much multicasting in Linux
    ... > that didn't join the multicast address where the data is being sent. ... > the interface 0.0.0.0 causes them to receive all data. ... if I have a socket that joins the SAME ... > multicast group but is tied to a different interface it will not receive ...
    (comp.os.linux.networking)
  • Re: WSASocket FAILS for multicast options..
    ... CE supports multicasting using Berkeley calls. ... // Set up the socket. ... We aren't associated with a multicast ... Paul T. ...
    (microsoft.public.windowsce.app.development)