Page 1 of 1

Multicast address binding on VLC

Posted: 18 Jun 2008 03:30
by nero
Hi guys,

I noticed that the VLC binds the socket connection it makes to a multicast address instead of a normal local ip address. Can i know why is the socket is bound to the multicast address instead of a local ip address (as normally would have been).

If we bound the socket to the multicast address, how can we determine on which interface it should be bound upon to for the direction of the packets received? (Receiver end).


btw, Im using 0.8.6f with Fedora 8.

Nero

Edited :

And one more thing, how can we determine which interface do we bind to for the multicast ?

Re: Multicast address binding on VLC

Posted: 19 Jun 2008 00:49
by Rémi Denis-Courmont
On 0.9.0 the multicast interface is specified with

Code: Select all

--miface <name>
though I don't know the state of 0.8.6. In principle, the routing table should take care of this, not the applications.

Re: Multicast address binding on VLC

Posted: 19 Jun 2008 04:05
by nero
Okay.. still, can anyone explain why is it that vlc actually binds to a multicast address?

Tq in advance.

Nero

Re: Multicast address binding on VLC

Posted: 19 Jun 2008 17:35
by Rémi Denis-Courmont
Why not?

Re: Multicast address binding on VLC

Posted: 20 Jun 2008 03:30
by nero
Why not?
Good one :D

Well, first, thanks for your quick reply.

Secondly, the reason i asked this question is because i need to know which interface that is 'RECEIVING' the multicast packets. Using 'miface' only sets the outgoing interface for the multicast session rite? Im interested in setting the incoming interface for the multicast traffic. Will it be possible? Initially, i thought that if the bind is executed by binding to a local interface, what im interested can be achieved.. but since it is binding to a multicast address.. im not sure which interface it is binding now. Surely if the kernel chooses it, there should be a part in the vlc source code that tell the kernel to choose. Im interested to know which part is that ?

:) Hope you understand what i tried to mean.


tq lotz...


Nero

Re: Multicast address binding on VLC

Posted: 20 Jun 2008 20:58
by Rémi Denis-Courmont
AFAIK, you'll receive multicast packets from any interface. But the kernel will only send IGMP reports to whatever interface is the destination of IGMP reports as per the routing table.

Managed to control the Multicast receiving interface

Posted: 23 Jun 2008 03:24
by nero
Hi,

I think i have a solution to the problem that i was mentioning. I did a small modification on the source code like below:


/modules/misc/network/ipv6.c

i changed the coding
imr.ipv6mr_interface = loc.sin6_scope_id;

to

imr.ipv6mr_interface = if_nametoindex("ethX");

where ethX is the name of your network interface device.

Please bear in mind that I changed this coding accordingly to my specification that is using a IPv6 network using Fedora. But i think it would be more or less the same with IPv4 also.

At the moment, i could actually identify the interface i am receiving my multicast traffic. Works as for now...

Developers : Can you help verifying if this change would pose problem later on in the future or something?

Tq.


Nero