Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Multicast filtering question: (5 Items)
   
Multicast filtering question  
Hi
I'm currently using 6.3.0, with io-net and the full ip stack (vs tiny stack).
On the same processor and on the same interface, 2 processes (P1 and P2) own a separate socket (S1 and S2). Each socket 
is bound to INADDR_ANY:13000.
S1 joins group 239.192.1.1 and S2 joins group 239.192.1.2. 
I expected S1 receives only messages sent to group  239.192.1.1 and S2 receives only messages sent to group 239.192.1.2

But unfortunately S1 and S2 receive messages from  both multicast adresses.  

Does anyone know if this point has changed in 6.4 and io-pkt ? 

Philippe
       
RE: Multicast filtering question  
I believe this is the way it is meant to work.  I've never worked with
multicast on Neutrino but did many years ago on Windows and this was
certainly the behavior there.  Joining a multicast group only affects
whether or not the host receives datagrams sent to the particular
address, irrespective of port, and once received datagrams are sent to
all sockets bound to the destination port of the datagram irrespective
of address.  I haven't looked up the relevant RFCs though a quick Google
showed that this also appears to be Sun's behavior so I imagine it's
universal.
Re: RE: Multicast filtering question  
> I believe this is the way it is meant to work.  I've never worked with
> multicast on Neutrino but did many years ago on Windows and this was
> certainly the behavior there.  Joining a multicast group only affects
> whether or not the host receives datagrams sent to the particular
> address, irrespective of port, and once received datagrams are sent to
> all sockets bound to the destination port of the datagram irrespective
> of address.  I haven't looked up the relevant RFCs though a quick Google
> showed that this also appears to be Sun's behavior so I imagine it's
> universal.


Joining a multicast group will affect whether network card will accept that packet.
addr:port will affect whether udp layer accepts it.

take a look at udp_input you will find out in 10 minutes why?  if it is not nullhost then it will match the dst addr but
 in your case you are using nullhost so all processes monitering that dport will get a copy.
Re: Multicast filtering question  
I think this is expected behavior and I don't think it has changed. Try 
binding to the multicast group rather than INADDR_ANY.

Hope this helps!
/P

Philippe ELSKENS wrote:
> Hi
> I'm currently using 6.3.0, with io-net and the full ip stack (vs tiny stack).
> On the same processor and on the same interface, 2 processes (P1 and P2) own a separate socket (S1 and S2). Each 
socket is bound to INADDR_ANY:13000.
> S1 joins group 239.192.1.1 and S2 joins group 239.192.1.2. 
> I expected S1 receives only messages sent to group  239.192.1.1 and S2 receives only messages sent to group 239.192.1.
2
>
> But unfortunately S1 and S2 receive messages from  both multicast adresses.  
>
> Does anyone know if this point has changed in 6.4 and io-pkt ? 
>
> Philippe
>        
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post42377
>
>   
Re: Multicast filtering question  
Thanks for your answers.
Regards
Philippe