[Live-devel] Interface selection on the server

Manuel Bernal Llinares mbernal at dif.um.es
Thu Feb 1 16:53:45 PST 2007


This is related to last e-mails about ourSourceAddressForMulticast() but most 
about the ability of picking a specific interface.

I have a linux (I prefer Debian but it's a Suse) machine with two IPs from 
different networks on the same interface and the liveMedia modified (with 
SRTP, MIKEY, and so on) running on it.

I'm trying to run to servers on the same machine, one of them on eth0 and the 
other on eth0:0.

I wrote some lines in ourSourceAddressForMulticast for the server to have the 
ability of selecting an interface in this way: the first time this method is 
called it checks if a source IP has been set for the server and, instead of 
using the multicast trick, it takes this IP and it sets this address as the 
source address for later calls to this method; otherwise it would use the 
original ways of guessing the source address.

Also, I wrote code to change ReceivingInterfaceAddr and SendingInterfaceAddr 
to be the same IP address I set for source address.

Then I run the server with the source address I want it to use as a command 
line parameter and it announces the streams using this address with no 
issue... but... when a client comes, after the first SETUP command I see a 
great "segmentation fault" from the server :S

I think it's a problem of getStreamParameters() call in handleCmd_SETUP, 
because the datagram socket seems not to be created correctly, but I don't 
know why yet.

Any idea? Maybe I lost something after hours and hours staring at the screen 
of my laptop :D

Thanks :)

Manuel.

---------

Seems a computer engineer, a systems analyst, and a programmer were
driving down a mountain when the brakes gave out.  They screamed down the
mountain, gaining speed, but finally managed to grind to a halt, more by
luck than anything else, just inches from a thousand foot drop to jagged
rocks.  They all got out of the car:
        The computer engineer said, "I think I can fix it."
        The systems analyst said, "No, no, I think we should take it
into town and have a specialist look at it."
        The programmer said, "OK, but first I think we should get back
in and see if it does it again."


More information about the live-devel mailing list