Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
00fb3569
Commit
00fb3569
authored
Mar 11, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Pass address family to adapterAddressesFromIndex.
parent
00f1c3d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+21
-11
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
00fb3569
...
...
@@ -632,12 +632,27 @@ static ULONG v4addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs)
return
ERROR_SUCCESS
;
}
static
ULONG
adapterAddressesFromIndex
(
DWORD
index
,
IP_ADAPTER_ADDRESSES
*
aa
,
ULONG
*
size
)
static
ULONG
adapterAddressesFromIndex
(
ULONG
family
,
DWORD
index
,
IP_ADAPTER_ADDRESSES
*
aa
,
ULONG
*
size
)
{
ULONG
ret
,
i
,
num_v4addrs
,
total_size
;
DWORD
*
v4addrs
;
ULONG
ret
,
i
,
num_v4addrs
=
0
,
total_size
;
DWORD
*
v4addrs
=
NULL
;
if
((
ret
=
v4addressesFromIndex
(
index
,
&
v4addrs
,
&
num_v4addrs
)))
return
ret
;
if
(
family
==
AF_INET
)
ret
=
v4addressesFromIndex
(
index
,
&
v4addrs
,
&
num_v4addrs
);
else
if
(
family
==
AF_UNSPEC
)
{
WARN
(
"no support for IPv6 addresses
\n
"
);
ret
=
v4addressesFromIndex
(
index
,
&
v4addrs
,
&
num_v4addrs
);
}
else
{
if
(
family
==
AF_INET6
)
FIXME
(
"no support for IPv6 addresses
\n
"
);
else
FIXME
(
"address family %u unsupported
\n
"
,
family
);
ret
=
ERROR_NO_DATA
;
}
if
(
ret
)
return
ret
;
total_size
=
sizeof
(
IP_ADAPTER_ADDRESSES
);
total_size
+=
IF_NAMESIZE
;
...
...
@@ -717,11 +732,6 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved,
if
(
!
buflen
)
return
ERROR_INVALID_PARAMETER
;
if
(
family
==
AF_INET6
||
family
==
AF_UNSPEC
)
FIXME
(
"no support for IPv6 addresses
\n
"
);
if
(
family
!=
AF_INET
&&
family
!=
AF_UNSPEC
)
return
ERROR_NO_DATA
;
table
=
getInterfaceIndexTable
();
if
(
!
table
||
!
table
->
numIndexes
)
{
...
...
@@ -732,7 +742,7 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved,
for
(
i
=
0
;
i
<
table
->
numIndexes
;
i
++
)
{
size
=
0
;
if
((
ret
=
adapterAddressesFromIndex
(
table
->
indexes
[
i
],
NULL
,
&
size
)))
if
((
ret
=
adapterAddressesFromIndex
(
family
,
table
->
indexes
[
i
],
NULL
,
&
size
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
table
);
return
ret
;
...
...
@@ -744,7 +754,7 @@ ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved,
ULONG
bytes_left
=
size
=
total_size
;
for
(
i
=
0
;
i
<
table
->
numIndexes
;
i
++
)
{
if
((
ret
=
adapterAddressesFromIndex
(
table
->
indexes
[
i
],
aa
,
&
size
)))
if
((
ret
=
adapterAddressesFromIndex
(
family
,
table
->
indexes
[
i
],
aa
,
&
size
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
table
);
return
ret
;
...
...
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