Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: dhalser@yahoo.com (wrapper)
Subject: binding to a multicast address with multiple listeners
Date: 24 Apr 2003 18:51:01 -0700	[thread overview]
Message-ID: <bb464ba4.0304241751.26df0cbd@posting.google.com> (raw)

I do not have a copy of Stevens' Network Programming Book, but I am
nonetheless curious about why binding to a multicast address is a bad
idea.  I have the situation in my multicast application whereby
multiple sockets are bound to the same multicast port (say 8000) with
INADDR_ANY for the bind() address parameter.  The sockets then each
join a different multicast group.  However, all the sockets receive
any multicast traffic aimed at that port, even multicast traffic for
an address that was not the multicast group the socket joined.  As I
understand, joining the multicast group only tells the IP layer to
accept network traffic for a certain multicast address.  It does not
tell the UDP layer to deliver that data to the appropriate socket. 
Therefore, it would seem bind is the way in which the operating system
filters the multicast data so it knows what socket to deliver the data
to.  Without a multicast bind it seems there is no way to have
multiple sockets listen to the same port for different destination
addresses at the same time.  (Putting multicast data on the same port
is done because of network configuration reasons where my application
is to be used.  A router bridges two networks and only allows
multicast data through on a certain port.)  So why is a multicast bind
a bad idea?  It seems to be the only way to discriminate traffic sent
to the port.  In theory it seems possible that any unicast data aimed
at the port could be picked up by a socket bound with INADDR_ANY so
there would even be more potential for confusion as far as the socket
is concerned.  What am I missing?


             reply	other threads:[~2003-04-25  1:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25  1:51 wrapper [this message]
2003-04-30 19:37 ` binding to a multicast address with multiple listeners Vladislav Yasevich
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox