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
fd133237
Commit
fd133237
authored
Jun 29, 2007
by
Kai Blin
Committed by
Alexandre Julliard
Jul 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Handle IPv6 in WSAStringToAddress.
parent
bf6a96ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
4 deletions
+41
-4
configure
configure
+2
-0
configure.ac
configure.ac
+1
-0
socket.c
dlls/ws2_32/socket.c
+35
-4
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
fd133237
...
@@ -15828,6 +15828,7 @@ fi
...
@@ -15828,6 +15828,7 @@ fi
for
ac_func
in
\
for
ac_func
in
\
_pclose
\
_pclose
\
_popen
\
_popen
\
...
@@ -15857,6 +15858,7 @@ for ac_func in \
...
@@ -15857,6 +15858,7 @@ for ac_func in \
gettid
\
gettid
\
gettimeofday
\
gettimeofday
\
getuid
\
getuid
\
inet_pton
\
kqueue
\
kqueue
\
lstat
\
lstat
\
memmove
\
memmove
\
...
...
configure.ac
View file @
fd133237
...
@@ -1151,6 +1151,7 @@ AC_CHECK_FUNCS(\
...
@@ -1151,6 +1151,7 @@ AC_CHECK_FUNCS(\
gettid \
gettid \
gettimeofday \
gettimeofday \
getuid \
getuid \
inet_pton \
kqueue \
kqueue \
lstat \
lstat \
memmove \
memmove \
...
...
dlls/ws2_32/socket.c
View file @
fd133237
...
@@ -4457,7 +4457,7 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
...
@@ -4457,7 +4457,7 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
switch
(
AddressFamily
)
switch
(
AddressFamily
)
{
{
case
AF_INET
:
case
WS_
AF_INET
:
{
{
struct
in_addr
inetaddr
;
struct
in_addr
inetaddr
;
...
@@ -4494,8 +4494,9 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
...
@@ -4494,8 +4494,9 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
break
;
break
;
}
}
case
AF_INET6
:
case
WS_
AF_INET6
:
{
{
struct
in6_addr
inetaddr
;
/* If lpAddressLength is too small, tell caller the size we need */
/* If lpAddressLength is too small, tell caller the size we need */
if
(
*
lpAddressLength
<
sizeof
(
SOCKADDR_IN6
))
if
(
*
lpAddressLength
<
sizeof
(
SOCKADDR_IN6
))
{
{
...
@@ -4503,8 +4504,38 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
...
@@ -4503,8 +4504,38 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString,
res
=
WSAEFAULT
;
res
=
WSAEFAULT
;
break
;
break
;
}
}
FIXME
(
"We don't support IPv6 yet.
\n
"
);
#ifdef HAVE_INET_PTON
res
=
WSAEINVAL
;
memset
(
lpAddress
,
0
,
sizeof
(
SOCKADDR_IN6
));
((
LPSOCKADDR_IN6
)
lpAddress
)
->
sin6_family
=
WS_AF_INET6
;
/* This one is a bit tricky. An IPv6 address contains colons, so the
* check from IPv4 doesn't work like that. However, IPv6 addresses that
* contain a port are written with braces like [fd12:3456:7890::1]:12345
* so what we will do is to look for ']', check if the next char is a
* colon, and if it is, parse the port as in IPv4. */
ptrPort
=
strchr
(
workBuffer
,
']'
);
if
(
ptrPort
&&
*
(
++
ptrPort
)
==
':'
)
{
((
LPSOCKADDR_IN6
)
lpAddress
)
->
sin6_port
=
(
WS_u_short
)
atoi
(
ptrPort
+
1
);
*
ptrPort
=
'\0'
;
}
else
{
((
LPSOCKADDR_IN6
)
lpAddress
)
->
sin6_port
=
0
;
}
if
(
inet_pton
(
AF_INET6
,
workBuffer
,
&
inetaddr
)
>
0
)
{
memcpy
(
&
((
LPSOCKADDR_IN6
)
lpAddress
)
->
sin6_addr
,
&
inetaddr
,
sizeof
(
struct
in6_addr
));
res
=
0
;
}
else
#endif
/* HAVE_INET_PTON */
res
=
WSAEINVAL
;
break
;
break
;
}
}
default:
default:
...
...
include/config.h.in
View file @
fd133237
...
@@ -240,6 +240,9 @@
...
@@ -240,6 +240,9 @@
/* Define to 1 if you have the `inet_network' function. */
/* Define to 1 if you have the `inet_network' function. */
#undef HAVE_INET_NETWORK
#undef HAVE_INET_NETWORK
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the <inttypes.h> header file. */
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
#undef HAVE_INTTYPES_H
...
...
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