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
40cc236b
Commit
40cc236b
authored
May 13, 2020
by
Alex Henrie
Committed by
Alexandre Julliard
May 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implement ParseNetworkString for IPv6 addresses and services.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
474d1f0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+37
-1
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
40cc236b
...
...
@@ -3415,6 +3415,8 @@ DWORD WINAPI ParseNetworkString(const WCHAR *str, DWORD type,
NET_ADDRESS_INFO
*
info
,
USHORT
*
port
,
BYTE
*
prefix_len
)
{
IN_ADDR
temp_addr4
;
IN6_ADDR
temp_addr6
;
ULONG
temp_scope
;
USHORT
temp_port
=
0
;
NTSTATUS
status
;
...
...
@@ -3455,10 +3457,44 @@ DWORD WINAPI ParseNetworkString(const WCHAR *str, DWORD type,
return
ERROR_SUCCESS
;
}
}
if
(
type
&
NET_STRING_IPV6_ADDRESS
)
{
status
=
RtlIpv6StringToAddressExW
(
str
,
&
temp_addr6
,
&
temp_scope
,
&
temp_port
);
if
(
SUCCEEDED
(
status
)
&&
!
temp_port
)
{
if
(
info
)
{
info
->
Format
=
NET_ADDRESS_IPV6
;
info
->
u
.
Ipv6Address
.
sin6_addr
=
temp_addr6
;
info
->
u
.
Ipv6Address
.
sin6_scope_id
=
temp_scope
;
info
->
u
.
Ipv6Address
.
sin6_port
=
0
;
}
if
(
port
)
*
port
=
0
;
if
(
prefix_len
)
*
prefix_len
=
255
;
return
ERROR_SUCCESS
;
}
}
if
(
type
&
NET_STRING_IPV6_SERVICE
)
{
status
=
RtlIpv6StringToAddressExW
(
str
,
&
temp_addr6
,
&
temp_scope
,
&
temp_port
);
if
(
SUCCEEDED
(
status
)
&&
temp_port
)
{
if
(
info
)
{
info
->
Format
=
NET_ADDRESS_IPV6
;
info
->
u
.
Ipv6Address
.
sin6_addr
=
temp_addr6
;
info
->
u
.
Ipv6Address
.
sin6_scope_id
=
temp_scope
;
info
->
u
.
Ipv6Address
.
sin6_port
=
temp_port
;
}
if
(
port
)
*
port
=
ntohs
(
temp_port
);
if
(
prefix_len
)
*
prefix_len
=
255
;
return
ERROR_SUCCESS
;
}
}
if
(
info
)
info
->
Format
=
NET_ADDRESS_FORMAT_UNSPECIFIED
;
if
(
type
&
~
(
NET_STRING_IPV4_ADDRESS
|
NET_STRING_IPV4_SERVICE
))
if
(
type
&
~
(
NET_STRING_IPV4_ADDRESS
|
NET_STRING_IPV4_SERVICE
|
NET_STRING_IPV6_ADDRESS
|
NET_STRING_IPV6_SERVICE
))
{
FIXME
(
"Unimplemented type 0x%x
\n
"
,
type
);
return
ERROR_NOT_SUPPORTED
;
...
...
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