Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b19160b3
Commit
b19160b3
authored
Feb 15, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo broken Win32 ifdefs (breaks IPv6 case on decent OSes)
parent
061b69e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
31 deletions
+7
-31
modules/access_output/udp.c
modules/access_output/udp.c
+7
-31
No files found.
modules/access_output/udp.c
View file @
b19160b3
...
...
@@ -648,47 +648,23 @@ static const char *MakeRandMulticast (int family, char *buf, size_t buflen)
#ifdef AF_INET6
case
AF_INET6
:
{
struct
sockaddr_in6
addr
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
struct
in6_addr
addr
;
memcpy
(
&
addr
,
"
\xff\x38\x00\x00
"
"
\x00\x00\x00\x00
"
"
\x00\x00\x00\x00
"
,
12
);
rand
|=
0x80000000
;
memcpy
(
addr
.
sin6_addr
.
s6_addr
+
12
,
&
(
uint32_t
){
htonl
(
rand
)
},
4
);
#if defined(WIN32) || defined(UNDER_CE)
addr
.
sin6_family
=
AF_INET6
;
if
(
0
==
WSAAddressToStringA
((
LPSOCKADDR
)
&
addr
,
sizeof
(
struct
sockaddr_in6
),
NULL
,
buf
,
&
buflen
)
)
{
buf
[
buflen
]
=
'\0'
;
return
buf
;
}
return
NULL
;
#else
return
inet_ntop
(
family
,
&
(
addr
.
sin6_addr
),
buf
,
buflen
);
#endif
memcpy
(
addr
.
s6_addr
+
12
,
&
(
uint32_t
){
htonl
(
rand
)
},
4
);
return
inet_ntop
(
family
,
&
addr
,
buf
,
buflen
);
}
#endif
case
AF_INET
:
{
struct
sockaddr_in
addr
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sin_addr
.
s_addr
=
htonl
((
rand
&
0xffffff
)
|
0xe8000000
);
#if defined(WIN32) || defined(UNDER_CE)
addr
.
sin_family
=
AF_INET
;
if
(
0
==
WSAAddressToStringA
((
LPSOCKADDR
)
&
addr
,
sizeof
(
struct
sockaddr_in
),
NULL
,
buf
,
&
buflen
)
)
{
buf
[
buflen
]
=
'\0'
;
return
buf
;
}
return
NULL
;
#else
return
inet_ntop
(
family
,
&
(
addr
.
sin_addr
),
buf
,
buflen
);
#endif
struct
in_addr
addr
;
addr
.
s_addr
=
htonl
((
rand
&
0xffffff
)
|
0xe8000000
);
return
inet_ntop
(
family
,
&
addr
,
buf
,
buflen
);
}
}
#if defined(WIN32) || defined(UNDER_CE)
WSASetLastError
(
WSAEAFNOSUPPORT
);
#else
#ifdef EAFNOSUPPORT
errno
=
EAFNOSUPPORT
;
#endif
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment