Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
69acbc72
Commit
69acbc72
authored
Mar 01, 2002
by
Xavier Marchesini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multicast under Win32 now works with the new input.
parent
9b393dab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
plugins/network/ipv4.c
plugins/network/ipv4.c
+33
-4
No files found.
plugins/network/ipv4.c
View file @
69acbc72
...
...
@@ -2,7 +2,7 @@
* ipv4.c: IPv4 network abstraction layer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ipv4.c,v 1.
1 2002/03/01 00:33:18 massiot
Exp $
* $Id: ipv4.c,v 1.
2 2002/03/01 01:59:18 xav
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -154,6 +154,7 @@ static int OpenUDP( network_socket_t * p_socket )
int
i_bind_port
=
p_socket
->
i_bind_port
;
char
*
psz_server_addr
=
p_socket
->
psz_server_addr
;
int
i_server_port
=
p_socket
->
i_server_port
;
char
*
psz_bind_win32
;
/* WIN32 multicast kludge */
int
i_handle
,
i_opt
,
i_opt_size
;
struct
sockaddr_in
sock
;
...
...
@@ -209,9 +210,29 @@ static int OpenUDP( network_socket_t * p_socket )
intf_WarnMsg
(
1
,
"ipv4 warning: socket buffer size is 0x%x"
" instead of 0x%x"
,
i_opt
,
0x80000
);
}
/* Under Win32 and for the multicast, we bind on INADDR_ANY, so let's call BuildAddr with NULL instead of psz_bind_addr */
/* Build the local socket */
if
(
BuildAddr
(
&
sock
,
psz_bind_addr
,
i_bind_port
)
==
-
1
)
#ifdef WIN32
#ifndef IN_MULTICAST
# define IN_MULTICAST(a) IN_CLASSD(a)
#endif
psz_bind_win32
=
psz_bind_addr
;
/* Check if this is a multicast socket */
if
(
IN_MULTICAST
(
ntohl
(
psz_bind_address
)
)
)
{
psz_bind_win32
=
NULL
;
}
if
(
BuildAddr
(
&
sock
,
psz_bind_win32
,
i_bind_port
)
==
-
1
)
#else
if
(
BuildAddr
(
&
sock
,
psz_bind_addr
,
i_bind_port
)
==
-
1
)
#endif
{
close
(
i_handle
);
return
(
-
1
);
...
...
@@ -242,12 +263,20 @@ static int OpenUDP( network_socket_t * p_socket )
#ifndef IN_MULTICAST
# define IN_MULTICAST(a) IN_CLASSD(a)
#endif
#ifndef WIN32
if
(
IN_MULTICAST
(
ntohl
(
sock
.
sin_addr
.
s_addr
)
)
)
{
struct
ip_mreq
imr
;
imr
.
imr_interface
.
s_addr
=
INADDR_ANY
;
imr
.
imr_multiaddr
.
s_addr
=
sock
.
sin_addr
.
s_addr
;
#else
if
(
IN_MULTICAST
(
ntohl
(
inet_addr
(
psz_bind_addr
)
)
)
)
{
struct
ip_mreq
imr
;
imr
.
imr_interface
.
s_addr
=
INADDR_ANY
;
imr
.
imr_multiaddr
.
s_addr
=
inet_addr
(
psz_bind_addr
);
#endif
if
(
setsockopt
(
i_handle
,
IPPROTO_IP
,
IP_ADD_MEMBERSHIP
,
(
char
*
)
&
imr
,
sizeof
(
struct
ip_mreq
)
)
==
-
1
)
{
...
...
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