+ case AF_INET6:
+ {
+ int scope = if_nametoindex( str );
+
+ if( scope == 0 )
+ {
+ msg_Err( p_this, "Invalid multicast interface %s", str );
+ return VLC_EGENERIC;
+ }
+
+ if( setsockopt( fd, SOL_IPV6, IPV6_MULTICAST_IF,
+ &scope, sizeof( scope ) ) < 0 )
+ {
+ msg_Err( p_this, "Cannot use %s as multicast interface: %s",
+ str, strerror( errno ) );
+ return VLC_EGENERIC;
+ }
+ break;
+ }