Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4b38328b
Commit
4b38328b
authored
Feb 21, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/misc/network/ipv4.c: multicast support for WinCE.
parent
f467427e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
modules/misc/network/ipv4.c
modules/misc/network/ipv4.c
+15
-8
No files found.
modules/misc/network/ipv4.c
View file @
4b38328b
...
...
@@ -28,6 +28,7 @@
*****************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <vlc/vlc.h>
#include <errno.h>
...
...
@@ -45,13 +46,19 @@
# include <unistd.h>
#endif
#if defined(
UNDER_CE
)
# i
nclude <winsock.h>
#
define close(fd) CloseHandle((HANDLE)fd)
#
elif defined( WIN32 )
#if defined(
WIN32) || defined(UNDER_CE
)
# i
f defined(UNDER_CE) && defined(sockaddr_storage)
#
undef sockaddr_storage
#
endif
# include <winsock2.h>
# include <ws2tcpip.h>
# define close closesocket
# if defined(UNDER_CE)
# undef IP_MULTICAST_TTL
# define IP_MULTICAST_TTL 3
# undef IP_ADD_MEMBERSHIP
# define IP_ADD_MEMBERSHIP 5
# endif
#else
# include <netdb.h>
/* hostent ... */
# include <sys/socket.h>
...
...
@@ -256,7 +263,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
/* Build the local socket */
#if defined( WIN32 )
&& !
defined( UNDER_CE )
#if defined( WIN32 )
||
defined( UNDER_CE )
/* Under Win32 and for multicasting, we bind to INADDR_ANY,
* so let's call BuildAddr with "" instead of psz_bind_addr */
if
(
BuildAddr
(
&
sock
,
IN_MULTICAST
(
ntohl
(
inet_addr
(
psz_bind_addr
)
)
)
?
...
...
@@ -282,7 +289,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
return
(
-
1
);
}
#if defined( WIN32 )
&& !
defined( UNDER_CE )
#if defined( WIN32 )
||
defined( UNDER_CE )
/* Restore the sock struct so we can spare a few #ifdef WIN32 later on */
if
(
IN_MULTICAST
(
ntohl
(
inet_addr
(
psz_bind_addr
)
)
)
)
{
...
...
@@ -313,7 +320,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
}
#endif
#if !defined(
UNDER_CE ) && !defined(
SYS_BEOS )
#if !defined( SYS_BEOS )
/* Join the multicast group if the socket is a multicast address */
if
(
IN_MULTICAST
(
ntohl
(
sock
.
sin_addr
.
s_addr
)
)
)
{
...
...
@@ -418,7 +425,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
return
(
-
1
);
}
#if !defined(
UNDER_CE ) && !defined(
SYS_BEOS )
#if !defined( SYS_BEOS )
if
(
IN_MULTICAST
(
ntohl
(
inet_addr
(
psz_server_addr
)
)
)
)
{
/* set the time-to-live */
...
...
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