setting (in fact only used by access_out/udp.c.
* network.h: interface to communicate with network plug-ins
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: network.h,v 1.3 2002/07/20 18:01:41 sam Exp $
+ * $Id: network.h,v 1.4 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
char * psz_server_addr;
int i_server_port;
+ int i_ttl;
+
/* Return values */
int i_handle;
size_t i_mtu;
* ftp.c:
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: ftp.c,v 1.19 2003/05/15 22:27:36 massiot Exp $
+ * $Id: ftp.c,v 1.20 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
socket_desc.i_server_port = p_url->i_server_port;
socket_desc.psz_bind_addr = "";
socket_desc.i_bind_port = 0;
+ socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input, "network", psz_network ) ) )
{
socket_desc.i_server_port = i_port;
socket_desc.psz_bind_addr = "";
socket_desc.i_bind_port = 0;
+ socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input, "network", "" ) ) )
{
* http.c: HTTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: http.c,v 1.40 2003/07/31 21:18:59 bigben Exp $
+ * $Id: http.c,v 1.41 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_access_data->socket_desc.psz_server_addr = psz_proxy;
p_access_data->socket_desc.i_server_port = i_proxy_port;
p_access_data->socket_desc.i_type = NETWORK_TCP;
+ p_access_data->socket_desc.i_ttl = 0;
snprintf( p_access_data->psz_buffer, MAX_QUERY_SIZE,
"GET http://%s:%d/%s HTTP/1.0\r\n",
p_access_data->socket_desc.i_type = NETWORK_TCP;
p_access_data->socket_desc.psz_server_addr = psz_server_addr;
p_access_data->socket_desc.i_server_port = i_server_port;
+ p_access_data->socket_desc.i_ttl = 0;
snprintf( p_access_data->psz_buffer, MAX_QUERY_SIZE,
"GET /%s HTTP/1.1\r\nHost: %s\r\n",
* mmsh.c:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: mmsh.c,v 1.3 2003/05/08 19:06:45 titer Exp $
+ * $Id: mmsh.c,v 1.4 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
socket_desc.i_server_port = p_url->i_port;
socket_desc.psz_bind_addr = "";
socket_desc.i_bind_port = 0;
+ socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input, "network", psz_network ) ) )
{
* mms.c: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: mmstu.c,v 1.5 2003/07/16 15:32:41 sam Exp $
+ * $Id: mmstu.c,v 1.6 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
socket_desc.i_server_port = p_url->i_port;
socket_desc.psz_bind_addr = "";
socket_desc.i_bind_port = 0;
+ socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input, "network", psz_network ) ) )
{
socket_desc.i_server_port = 0;
socket_desc.psz_bind_addr = p_sys->psz_bind_addr;
socket_desc.i_bind_port = 7000; //p_url->i_bind_port; FIXME
+ socket_desc.i_ttl = 0;
p_input->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_input, "network", psz_network ) ) )
{
* udp.c: raw UDP & RTP access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: udp.c,v 1.20 2003/07/23 07:37:34 jpsaman Exp $
+ * $Id: udp.c,v 1.21 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Tristan Leteurtre <tooney@via.ecp.fr>
socket_desc.i_bind_port = i_bind_port;
socket_desc.psz_server_addr = psz_server_addr;
socket_desc.i_server_port = i_server_port;
+ socket_desc.i_ttl = 0;
/* Find an appropriate network module */
p_input->p_private = (void*) &socket_desc;
* udp.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: udp.c,v 1.10 2003/06/19 18:45:06 gbazin Exp $
+ * $Id: udp.c,v 1.11 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
module_t *p_network;
network_socket_t socket_desc;
+ char *val;
+
if( !( p_sys = p_access->p_sys =
malloc( sizeof( sout_access_out_sys_t ) ) ) )
{
socket_desc.i_server_port = i_dst_port;
socket_desc.psz_bind_addr = "";
socket_desc.i_bind_port = 0;
+ socket_desc.i_ttl = 0;
+ if( ( val = sout_cfg_find_value( p_access->p_cfg, "ttl" ) ) )
+ {
+ socket_desc.i_ttl = atoi( val );
+ }
p_sys->p_thread->p_private = (void*)&socket_desc;
if( !( p_network = module_Need( p_sys->p_thread,
"network", "" ) ) )
* ipv4.c: IPv4 network abstraction layer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.19 2003/06/15 01:23:31 massiot Exp $
+ * $Id: ipv4.c,v 1.20 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Mathias Kretschmer <mathias@research.att.com>
if( IN_MULTICAST( ntohl(inet_addr(psz_server_addr) ) ) )
{
/* set the time-to-live */
- int ttl = config_GetInt( p_this, "ttl" );
+ int ttl = p_socket->i_ttl;
+ if( ttl < 1 )
+ {
+ ttl = config_GetInt( p_this, "ttl" );
+ }
if( ttl < 1 ) ttl = 1;
if( setsockopt( i_handle, IPPROTO_IP, IP_MULTICAST_TTL,
* ipv6.c: IPv6 network abstraction layer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: ipv6.c,v 1.13 2003/06/15 01:23:31 massiot Exp $
+ * $Id: ipv6.c,v 1.14 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Alexis Guillard <alexis.guillard@bt.com>
* Christophe Massiot <massiot@via.ecp.fr>
if( *psz_server_addr )
{
- int ttl = config_GetInt( p_this, "ttl" );
+ int ttl = p_socket->i_ttl;
+ if( ttl < 1 )
+ {
+ ttl = config_GetInt( p_this, "ttl" );
+ }
if( ttl < 1 ) ttl = 1;
/* Build socket for remote connection */
* sap.c : SAP interface module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: sap.c,v 1.20 2003/07/23 01:28:54 gbazin Exp $
+ * $Id: sap.c,v 1.21 2003/07/31 23:44:49 fenrir Exp $
*
* Authors: Arnaud Schauly <gitan@via.ecp.fr>
* Clément Stenac <zorglub@via.ecp.fr>
socket_desc.i_bind_port = HELLO_PORT;
socket_desc.psz_server_addr = "";
socket_desc.i_server_port = 0;
+ socket_desc.i_ttl = 0;
p_intf->p_private = (void*) &socket_desc;
psz_network = "ipv4";
socket_desc.i_bind_port = HELLO_PORT;
socket_desc.psz_server_addr = "";
socket_desc.i_server_port = 0;
+ socket_desc.i_ttl = 0;
p_intf->p_private = (void*) &socket_desc;
psz_network = "ipv6";
socket_desc.psz_server_addr = SAP_IPV4_ADDR;
socket_desc.i_server_port = SAP_PORT;
socket_desc.i_handle = 0;
+ socket_desc.i_ttl = 0;
/* Call the network module */
p_sout->p_private = (void*) &socket_desc;
socket_desc.psz_server_addr = sap_ipv6_addr;
socket_desc.i_server_port = SAP_PORT;
socket_desc.i_handle = 0;
+ socket_desc.i_ttl = 0;
/* Call the network module */
p_sout->p_private = (void *) &socket_desc;