Changeset 2815e99445ba576d06e3688df81db6ae59732b13
- Timestamp:
- 03/02/08 20:01:43
(6 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1204484503 +0200
- git-parent:
[f8c4e779ab99f83ab0494a2ce3a2a9960dafcbf4]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1204484503 +0200
- Message:
Set the DCCP service code properly.
Assume RTP converys video (which is fine for MPEG-TS), as we cannot
know if it's only audio anyway.
Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r99fab90 |
r2815e99 |
|
| 233 | 233 | case IPPROTO_DCCP: |
|---|
| 234 | 234 | #ifdef SOCK_DCCP |
|---|
| | 235 | var_Create( p_access, "dccp-service", VLC_VAR_STRING ); |
|---|
| | 236 | var_SetString( p_access, "dccp-service", "RTPV" ); |
|---|
| 235 | 237 | p_sys->fd = net_Connect( p_access, psz_server_addr, i_server_port, |
|---|
| 236 | 238 | SOCK_DCCP, IPPROTO_DCCP ); |
|---|
| re589680 |
r2815e99 |
|
| 69 | 69 | #endif |
|---|
| 70 | 70 | |
|---|
| | 71 | #ifdef HAVE_LINUX_DCCP_H |
|---|
| | 72 | /* TODO: use glibc instead of linux-kernel headers */ |
|---|
| | 73 | # include <linux/dccp.h> |
|---|
| | 74 | # define SOL_DCCP 269 |
|---|
| | 75 | #endif |
|---|
| | 76 | |
|---|
| 71 | 77 | extern int rootwrap_bind (int family, int socktype, int protocol, |
|---|
| 72 | 78 | const struct sockaddr *addr, size_t alen); |
|---|
| … | … | |
| 117 | 123 | setsockopt (fd, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, |
|---|
| 118 | 124 | &(int){ PROTECTION_LEVEL_UNRESTRICTED }, sizeof (int)); |
|---|
| | 125 | #endif |
|---|
| | 126 | |
|---|
| | 127 | #ifdef DCCP_SOCKOPT_SERVICE |
|---|
| | 128 | char *dccps = var_CreateGetNonEmptyString (p_this, "dccp-service"); |
|---|
| | 129 | if (dccps != NULL) |
|---|
| | 130 | { |
|---|
| | 131 | setsockopt (fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, dccps, |
|---|
| | 132 | (strlen (dccps) + 3) & ~3); |
|---|
| | 133 | free (dccps); |
|---|
| | 134 | } |
|---|
| 119 | 135 | #endif |
|---|
| 120 | 136 | |
|---|