Commit 1d974c62 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Nuke manual IP version selection

World IPv6 day was a non-event, establishing that those options are
useless, and so should they.
parent 1616903a
...@@ -107,10 +107,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -107,10 +107,6 @@ static int Open( vlc_object_t *p_this )
{ {
access_t *p_access = (access_t*)p_this; access_t *p_access = (access_t*)p_this;
/* First set ipv4/ipv6 */
var_Create( p_access, "ipv4", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Create( p_access, "ipv6", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
/* mms-caching */ /* mms-caching */
var_Create( p_access, "mms-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); var_Create( p_access, "mms-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
......
...@@ -80,12 +80,6 @@ ...@@ -80,12 +80,6 @@
#define SAP_ADDR_LONGTEXT N_( "The SAP module normally chooses itself the " \ #define SAP_ADDR_LONGTEXT N_( "The SAP module normally chooses itself the " \
"right addresses to listen to. However, you " \ "right addresses to listen to. However, you " \
"can specify a specific address." ) "can specify a specific address." )
#define SAP_IPV4_TEXT N_( "IPv4 SAP" )
#define SAP_IPV4_LONGTEXT N_( \
"Listen to IPv4 announcements on the standard addresses." )
#define SAP_IPV6_TEXT N_( "IPv6 SAP" )
#define SAP_IPV6_LONGTEXT N_( \
"Listen to IPv6 announcements on the standard addresses." )
#define SAP_SCOPE_TEXT N_( "IPv6 SAP scope" ) #define SAP_SCOPE_TEXT N_( "IPv6 SAP scope" )
#define SAP_SCOPE_LONGTEXT N_( \ #define SAP_SCOPE_LONGTEXT N_( \
"Scope for IPv6 announcements (default is 8)." ) "Scope for IPv6 announcements (default is 8)." )
...@@ -124,10 +118,8 @@ vlc_module_begin () ...@@ -124,10 +118,8 @@ vlc_module_begin ()
add_string( "sap-addr", NULL, add_string( "sap-addr", NULL,
SAP_ADDR_TEXT, SAP_ADDR_LONGTEXT, true ) SAP_ADDR_TEXT, SAP_ADDR_LONGTEXT, true )
add_bool( "sap-ipv4", true, add_obsolete_bool( "sap-ipv4" ) /* since 1.2.0 */
SAP_IPV4_TEXT,SAP_IPV4_LONGTEXT, true ) add_obsolete_bool( "sap-ipv6" ) /* since 1.2.0 */
add_bool( "sap-ipv6", true,
SAP_IPV6_TEXT, SAP_IPV6_LONGTEXT, true )
add_integer( "sap-timeout", 1800, add_integer( "sap-timeout", 1800,
SAP_TIMEOUT_TEXT, SAP_TIMEOUT_LONGTEXT, true ) SAP_TIMEOUT_TEXT, SAP_TIMEOUT_LONGTEXT, true )
add_bool( "sap-parse", true, add_bool( "sap-parse", true,
...@@ -495,17 +487,12 @@ static void *Run( void *data ) ...@@ -495,17 +487,12 @@ static void *Run( void *data )
* Winsock 1.1 from Windows 95, if not Windows 3.1. * Winsock 1.1 from Windows 95, if not Windows 3.1.
* Anyway, to avoid a 30 seconds delay for failed IPv6 socket creation, * Anyway, to avoid a 30 seconds delay for failed IPv6 socket creation,
* we have to open sockets in Run() rather than Open(). */ * we have to open sockets in Run() rather than Open(). */
if( var_CreateGetBool( p_sd, "sap-ipv4" ) )
{
InitSocket( p_sd, SAP_V4_GLOBAL_ADDRESS, SAP_PORT ); InitSocket( p_sd, SAP_V4_GLOBAL_ADDRESS, SAP_PORT );
InitSocket( p_sd, SAP_V4_ORG_ADDRESS, SAP_PORT ); InitSocket( p_sd, SAP_V4_ORG_ADDRESS, SAP_PORT );
InitSocket( p_sd, SAP_V4_LOCAL_ADDRESS, SAP_PORT ); InitSocket( p_sd, SAP_V4_LOCAL_ADDRESS, SAP_PORT );
InitSocket( p_sd, SAP_V4_LINK_ADDRESS, SAP_PORT ); InitSocket( p_sd, SAP_V4_LINK_ADDRESS, SAP_PORT );
}
if( var_CreateGetBool( p_sd, "sap-ipv6" ) )
{
char psz_address[NI_MAXNUMERICHOST] = "ff02::2:7ffe%";
char psz_address[NI_MAXNUMERICHOST] = "ff02::2:7ffe%";
#ifndef WIN32 #ifndef WIN32
struct if_nameindex *l = if_nameindex (); struct if_nameindex *l = if_nameindex ();
if (l != NULL) if (l != NULL)
...@@ -550,7 +537,6 @@ static void *Run( void *data ) ...@@ -550,7 +537,6 @@ static void *Run( void *data )
psz_address[3] = *c_scope; psz_address[3] = *c_scope;
InitSocket( p_sd, psz_address, SAP_PORT ); InitSocket( p_sd, psz_address, SAP_PORT );
} }
}
psz_addr = var_CreateGetString( p_sd, "sap-addr" ); psz_addr = var_CreateGetString( p_sd, "sap-addr" );
if( psz_addr && *psz_addr ) if( psz_addr && *psz_addr )
......
...@@ -170,8 +170,6 @@ This dialog needs the following dialogs to be fully functional: browse ...@@ -170,8 +170,6 @@ This dialog needs the following dialogs to be fully functional: browse
<td> <td>
<label for="input_net_udp_port">Port</label> <label for="input_net_udp_port">Port</label>
<input type="text" id="input_net_udp_port" size="6" onchange="update_input_net();" /> <input type="text" id="input_net_udp_port" size="6" onchange="update_input_net();" />
<input type="checkbox" id="input_net_udp_forceipv6" onchange="update_input_net();" />
<label for="input_net_udp_forceipv6">Force IPv6</label>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -806,8 +806,6 @@ function update_input_net() ...@@ -806,8 +806,6 @@ function update_input_net()
if( type == "udp" ) if( type == "udp" )
{ {
mrl.value += "udp://"; mrl.value += "udp://";
if( checked( 'input_net_udp_forceipv6' ) )
mrl.value += "[::]";
if( value( 'input_net_udp_port' ) ) if( value( 'input_net_udp_port' ) )
mrl.value += ":"+value( 'input_net_udp_port' ); mrl.value += ":"+value( 'input_net_udp_port' );
} }
......
...@@ -887,14 +887,6 @@ static const char *const ppsz_clock_descriptions[] = ...@@ -887,14 +887,6 @@ static const char *const ppsz_clock_descriptions[] =
#define VCD_DEVICE CD_DEVICE #define VCD_DEVICE CD_DEVICE
#define CDAUDIO_DEVICE CD_DEVICE #define CDAUDIO_DEVICE CD_DEVICE
#define IPV6_TEXT N_("Force IPv6")
#define IPV6_LONGTEXT N_( \
"IPv6 will be used by default for all connections.")
#define IPV4_TEXT N_("Force IPv4")
#define IPV4_LONGTEXT N_( \
"IPv4 will be used by default for all connections.")
#define TIMEOUT_TEXT N_("TCP connection timeout") #define TIMEOUT_TEXT N_("TCP connection timeout")
#define TIMEOUT_LONGTEXT N_( \ #define TIMEOUT_LONGTEXT N_( \
"Default TCP connection timeout (in milliseconds). " ) "Default TCP connection timeout (in milliseconds). " )
...@@ -1884,10 +1876,8 @@ vlc_module_begin () ...@@ -1884,10 +1876,8 @@ vlc_module_begin ()
add_integer( "server-port", 1234, add_integer( "server-port", 1234,
SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT, false ) SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT, false )
add_integer( "mtu", MTU_DEFAULT, MTU_TEXT, MTU_LONGTEXT, true ) add_integer( "mtu", MTU_DEFAULT, MTU_TEXT, MTU_LONGTEXT, true )
add_bool( "ipv6", 0, IPV6_TEXT, IPV6_LONGTEXT, false ) add_obsolete_bool( "ipv6" ) /* since 1.2.0 */
change_short('6') add_obsolete_bool( "ipv4" ) /* since 1.2.0 */
add_bool( "ipv4", 0, IPV4_TEXT, IPV4_LONGTEXT, false )
change_short('4')
add_integer( "ipv4-timeout", 5 * 1000, TIMEOUT_TEXT, add_integer( "ipv4-timeout", 5 * 1000, TIMEOUT_TEXT,
TIMEOUT_LONGTEXT, true ) TIMEOUT_LONGTEXT, true )
......
...@@ -134,17 +134,6 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, ...@@ -134,17 +134,6 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
/* We only ever use port *numbers* */ /* We only ever use port *numbers* */
hints.ai_flags |= AI_NUMERICSERV; hints.ai_flags |= AI_NUMERICSERV;
if( hints.ai_family == AF_UNSPEC )
{
#ifdef AF_INET6
if (var_InheritBool (p_this, "ipv6"))
hints.ai_family = AF_INET6;
else
#endif
if (var_InheritBool (p_this, "ipv4"))
hints.ai_family = AF_INET;
}
/* /*
* VLC extensions : * VLC extensions :
* - accept "" as NULL * - accept "" as NULL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment