On Mon, Sep 22, 2008 at 11:38 AM, Lev Olshvang <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I have following issue to solve:
>
> The network have one server which sends multicast streams to several
> multicast groups.
>
> I would like it to stop  streaming if no client is listening, and  start
> streaming again when client is joining multicast group.


Normally for multicast the server never receives any notification if there
are clients or not. It just sends data and if the clients want it, they ask
for it. To control the server actual sending you need an external protocol
to notify the server that there is a new client and when the client leaves.

If the clients are connected to the server without a router between them,
you could implement a program that listens on the interface for the IGMP
messages and controls the server when to send and when not.

If there is a router between the server and the clients you are out of luck
as the router expects the multicast packets to just be sent constantly to
its interface for it to consider this multicast group active at all. A
router will not send IGMP messages to you!


> I see from sniffing, that clients  indeed  send IGMP join group protocol
> message  , and I wonder how to make linux server to handle this join and
> manage multicast group.


If you send data to the interface the clients will receive it, I'm not sure
what is your problem statement here.

>
> I saw that kernel have provisions to manage multicast groups through
> setsockopt(), but I did not find how to get join/leave group notification at
> user
> space.
>
> I know that there are multicast routers , like mrouted and pimd and I am
> trying to configure thema at they moment but I  doubt that I can configure
> only one interface because it contradict routing concept, isn't it ?


mrouted and pimd will monitor for IGMP messages and control the kernel
multicast routing fabric. They will instruct the kernel where to forward
multicast packets, but you only need that if you have multiple interfaces on
your computer or to make a multicast router that sits between your multicast
server and clients.

If the server app is on a machine and the clients are connected to it
directly (as in with a switch or a hub) you don't need mrouted.


> Thanks ,
> Lev


Baruch

Reply via email to