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
00f1c3d3
Commit
00f1c3d3
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: Rename a function and variables to make it clearer they're related to IPv4 addresses.
parent
93c2256c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+11
-11
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
00f1c3d3
...
...
@@ -608,7 +608,7 @@ static DWORD typeFromMibType(DWORD mib_type)
}
}
static
ULONG
addressesFromIndex
(
DWORD
index
,
DWORD
**
addrs
,
ULONG
*
num_addrs
)
static
ULONG
v4
addressesFromIndex
(
DWORD
index
,
DWORD
**
addrs
,
ULONG
*
num_addrs
)
{
ULONG
ret
,
i
,
j
;
MIB_IPADDRTABLE
*
at
;
...
...
@@ -634,16 +634,16 @@ static ULONG addressesFromIndex(DWORD index, DWORD **addrs, ULONG *num_addrs)
static
ULONG
adapterAddressesFromIndex
(
DWORD
index
,
IP_ADAPTER_ADDRESSES
*
aa
,
ULONG
*
size
)
{
ULONG
ret
,
i
,
num_addrs
,
total_size
;
DWORD
*
addrs
;
ULONG
ret
,
i
,
num_
v4
addrs
,
total_size
;
DWORD
*
v4
addrs
;
if
((
ret
=
addressesFromIndex
(
index
,
&
addrs
,
&
num_
addrs
)))
return
ret
;
if
((
ret
=
v4addressesFromIndex
(
index
,
&
v4addrs
,
&
num_v4
addrs
)))
return
ret
;
total_size
=
sizeof
(
IP_ADAPTER_ADDRESSES
);
total_size
+=
IF_NAMESIZE
;
total_size
+=
IF_NAMESIZE
*
sizeof
(
WCHAR
);
total_size
+=
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
)
*
num_addrs
;
total_size
+=
sizeof
(
struct
sockaddr_in
)
*
num_addrs
;
total_size
+=
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
)
*
num_
v4
addrs
;
total_size
+=
sizeof
(
struct
sockaddr_in
)
*
num_
v4
addrs
;
if
(
aa
&&
*
size
>=
total_size
)
{
...
...
@@ -665,13 +665,13 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
*
dst
++
=
0
;
ptr
=
(
char
*
)
dst
;
if
(
num_addrs
)
if
(
num_
v4
addrs
)
{
IP_ADAPTER_UNICAST_ADDRESS
*
ua
;
struct
sockaddr_in
*
sa
;
ua
=
aa
->
FirstUnicastAddress
=
(
IP_ADAPTER_UNICAST_ADDRESS
*
)
ptr
;
for
(
i
=
0
;
i
<
num_addrs
;
i
++
)
for
(
i
=
0
;
i
<
num_
v4
addrs
;
i
++
)
{
memset
(
ua
,
0
,
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
));
ua
->
u
.
s
.
Length
=
sizeof
(
IP_ADAPTER_UNICAST_ADDRESS
);
...
...
@@ -680,11 +680,11 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
sa
=
(
struct
sockaddr_in
*
)
ua
->
Address
.
lpSockaddr
;
sa
->
sin_family
=
AF_INET
;
sa
->
sin_addr
.
s_addr
=
addrs
[
i
];
sa
->
sin_addr
.
s_addr
=
v4
addrs
[
i
];
sa
->
sin_port
=
0
;
ptr
+=
ua
->
u
.
s
.
Length
+
ua
->
Address
.
iSockaddrLength
;
if
(
i
<
num_addrs
-
1
)
if
(
i
<
num_
v4
addrs
-
1
)
{
ua
->
Next
=
(
IP_ADAPTER_UNICAST_ADDRESS
*
)
ptr
;
ua
=
ua
->
Next
;
...
...
@@ -705,7 +705,7 @@ static ULONG adapterAddressesFromIndex(DWORD index, IP_ADAPTER_ADDRESSES *aa, UL
else
aa
->
OperStatus
=
IfOperStatusUnknown
;
}
*
size
=
total_size
;
HeapFree
(
GetProcessHeap
(),
0
,
addrs
);
HeapFree
(
GetProcessHeap
(),
0
,
v4
addrs
);
return
ERROR_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