Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
cpp-libs
libnice
Commits
67cc93bf
Commit
67cc93bf
authored
Aug 13, 2020
by
Ami Perlmutter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore interfaces in windows
parent
a9b18580
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
agent/interfaces.c
agent/interfaces.c
+25
-0
No files found.
agent/interfaces.c
View file @
67cc93bf
...
...
@@ -74,6 +74,10 @@
#endif
/* G_OS_UNIX */
#ifdef IGNORED_IFACE_PREFIX
#ifdef G_OS_WIN32
#include <stdio.h>
#endif
static
const
gchar
*
ignored_iface_prefix_list
[]
=
{
IGNORED_IFACE_PREFIX
,
NULL
...
...
@@ -565,6 +569,11 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
IP_ADAPTER_ADDRESSES
*
addresses
,
*
a
;
DWORD
pref
=
0
;
GList
*
ret
=
NULL
;
#ifdef IGNORED_IFACE_PREFIX
const
gchar
**
prefix
;
gboolean
ignored
;
const
char
output
[
256
];
#endif
addresses
=
_nice_get_adapters_addresses
();
if
(
!
addresses
)
...
...
@@ -611,6 +620,22 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
continue
;
}
#ifdef IGNORED_IFACE_PREFIX
sprintf_s
(
output
,
256
,
"%ws"
,
a
->
FriendlyName
);
ignored
=
FALSE
;
for
(
prefix
=
ignored_iface_prefix_list
;
*
prefix
;
prefix
++
)
{
if
(
g_str_has_prefix
(
output
,
*
prefix
))
{
nice_debug
(
"Ignoring interface %s as it matches prefix %s"
,
output
,
*
prefix
);
ignored
=
TRUE
;
break
;
}
}
if
(
ignored
)
continue
;
#endif
/* Grab the interface’s unicast addresses. */
for
(
unicast
=
a
->
FirstUnicastAddress
;
unicast
!=
NULL
;
unicast
=
unicast
->
Next
)
{
...
...
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