case IPPROTO_DCCP:
#ifdef SOCK_DCCP
+ var_Create( p_access, "dccp-service", VLC_VAR_STRING );
+ var_SetString( p_access, "dccp-service", "RTPV" );
p_sys->fd = net_Connect( p_access, psz_server_addr, i_server_port,
SOCK_DCCP, IPPROTO_DCCP );
#else
# define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
+#ifdef HAVE_LINUX_DCCP_H
+/* TODO: use glibc instead of linux-kernel headers */
+# include <linux/dccp.h>
+# define SOL_DCCP 269
+#endif
+
extern int rootwrap_bind (int family, int socktype, int protocol,
const struct sockaddr *addr, size_t alen);
&(int){ PROTECTION_LEVEL_UNRESTRICTED }, sizeof (int));
#endif
+#ifdef DCCP_SOCKOPT_SERVICE
+ char *dccps = var_CreateGetNonEmptyString (p_this, "dccp-service");
+ if (dccps != NULL)
+ {
+ setsockopt (fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, dccps,
+ (strlen (dccps) + 3) & ~3);
+ free (dccps);
+ }
+#endif
+
return fd;
}