[streaming] UDP streaming, UDP punching and fixed server port

"Álvaro J. Iradier" airadier at iritec.es
Wed Sep 7 10:24:07 CEST 2005


Hi all, first of all, I'm new to this list. I just subscribed, because 
I'm working right now with VLC, a great piece of software, thanks very much!

I just have a question/problem, and maybe you can help me.

I'm searching for a way to use a fixed source port for UDP streaming, is 
it possible?

I have a VLC server that broadcasts video via UDP to a computer, that 
runs VLC. The computer is "mobile". I mean it can connect from different 
IPs, and behind a NAT.

I'm trying to make UDP hole punching to allow the server UDP packets 
come to the computer behind the NAT. The problem is, for UDP hole 
punching, I need to know the port the server is sending UDP packets 
from. Looking at the source code, at udp.c, I think the port is 
dynamically allocated (and testing with netcat and other tools, I can 
see packets coming from ports like 32828, 32829, etc.), but it looks 
like it tries to recover the port from server-port variable



     i_server_port = strtol( psz_server_port, NULL, 10 );
     if( ( i_bind_port   = strtol( psz_bind_port,   NULL, 10 ) ) == 0 )
     {
         i_bind_port = var_CreateGetInteger( p_access, "server-port" );
     }

however, if I'm not wrong, this is from the access/udp.c, while 
access_output/udp.c has something like:

     socket_desc.i_bind_port     = 0;

which means bind port is always 0.

Am I wrong? Is it possible to specify a fixed source port for UDP streaming?

Thanks very much.

-- 

    ============================================================
   /                                                            \
     Álvaro J. Iradier Muro              ** IRITEC **
                                         CEEI ARAGÓN
     airadier at iritec.es         C/ María de Luna, 11, Nave 19-A
                                        50018 ZARAGOZA
                               Tel: 976 106620 Fax: 976 106621
   \                                                            /
    ============================================================

-- 
This is the streaming mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the streaming mailing list