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
f378f0d6
Commit
f378f0d6
authored
Apr 21, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied patch for support of the IP_MULTICAST_IF
by isteinmann (at) bluewin.ch with fixes
parent
c6990674
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
modules/misc/network/ipv4.c
modules/misc/network/ipv4.c
+23
-0
No files found.
modules/misc/network/ipv4.c
View file @
f378f0d6
...
...
@@ -97,6 +97,11 @@ static int NetOpen( vlc_object_t * );
"Allows you to modify the default TCP connection timeout. This " \
"value should be set in millisecond units." )
#define MIFACE_TEXT N_("Multicast output interface")
#define MIFACE_LONGTEXT N_( \
"Indicate here the multicast output interface. " \
"This overrides the routing table.")
vlc_module_begin
();
set_description
(
_
(
"IPv4 network abstraction layer"
)
);
set_capability
(
"network"
,
50
);
...
...
@@ -104,6 +109,7 @@ vlc_module_begin();
add_integer
(
"ipv4-timeout"
,
5
*
1000
,
NULL
,
TIMEOUT_TEXT
,
TIMEOUT_LONGTEXT
,
VLC_TRUE
);
add_string
(
"miface-addr"
,
NULL
,
NULL
,
MIFACE_TEXT
,
MIFACE_LONGTEXT
,
VLC_TRUE
);
vlc_module_end
();
/*****************************************************************************
...
...
@@ -432,6 +438,23 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
int
i_ttl
=
p_socket
->
i_ttl
;
unsigned
char
ttl
;
/* set the multicast interface */
char
*
psz_mif_addr
=
config_GetPsz
(
p_this
,
"miface-addr"
);
if
(
psz_mif_addr
)
{
struct
in_addr
intf
;
intf
.
s_addr
=
inet_addr
(
psz_mif_addr
);
free
(
psz_mif_addr
);
if
(
setsockopt
(
i_handle
,
IPPROTO_IP
,
IP_MULTICAST_IF
,
&
intf
,
sizeof
(
intf
)
)
<
0
)
{
msg_Dbg
(
p_this
,
"failed to set multicast interface (%s)."
,
strerror
(
errno
)
);
close
(
i_handle
);
return
(
-
1
);
}
}
if
(
i_ttl
<
1
)
{
if
(
var_Get
(
p_this
,
"ttl"
,
&
val
)
!=
VLC_SUCCESS
)
...
...
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