Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
84f0a035
Commit
84f0a035
authored
Dec 18, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Implement the SIO_ADDRESS_LIST_QUERY ioctl.
parent
5fc9ffd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
2 deletions
+71
-2
socket.c
dlls/ws2_32/socket.c
+71
-2
No files found.
dlls/ws2_32/socket.c
View file @
84f0a035
...
...
@@ -2389,9 +2389,78 @@ INT WINAPI WSAIoctl(SOCKET s,
break
;
case
WS_SIO_ADDRESS_LIST_QUERY
:
FIXME
(
"-> SIO_ADDRESS_LIST_QUERY request: stub
\n
"
);
break
;
{
DWORD
size
;
TRACE
(
"-> SIO_ADDRESS_LIST_QUERY request
\n
"
);
if
(
!
lpcbBytesReturned
)
{
WSASetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
if
(
GetAdaptersInfo
(
NULL
,
&
size
)
==
ERROR_BUFFER_OVERFLOW
)
{
IP_ADAPTER_INFO
*
p
,
*
table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
DWORD
need
,
num
;
if
(
!
table
||
GetAdaptersInfo
(
table
,
&
size
))
{
HeapFree
(
GetProcessHeap
(),
0
,
table
);
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
for
(
p
=
table
,
num
=
0
;
p
;
p
=
p
->
Next
)
if
(
p
->
IpAddressList
.
IpAddress
.
String
[
0
])
num
++
;
need
=
sizeof
(
SOCKET_ADDRESS_LIST
)
+
sizeof
(
SOCKET_ADDRESS
)
*
(
num
-
1
);
need
+=
sizeof
(
SOCKADDR
)
*
num
;
*
lpcbBytesReturned
=
need
;
if
(
need
>
cbOutBuffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
table
);
WSASetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
if
(
lpbOutBuffer
)
{
unsigned
int
i
;
SOCKET_ADDRESS
*
sa
;
SOCKET_ADDRESS_LIST
*
sa_list
=
(
SOCKET_ADDRESS_LIST
*
)
lpbOutBuffer
;
SOCKADDR_IN
*
sockaddr
;
sa
=
sa_list
->
Address
;
sockaddr
=
(
SOCKADDR_IN
*
)((
char
*
)
sa
+
num
*
sizeof
(
SOCKET_ADDRESS
));
sa_list
->
iAddressCount
=
num
;
for
(
p
=
table
,
i
=
0
;
p
;
p
=
p
->
Next
)
{
if
(
!
p
->
IpAddressList
.
IpAddress
.
String
[
0
])
continue
;
sa
[
i
].
lpSockaddr
=
(
SOCKADDR
*
)
&
sockaddr
[
i
];
sa
[
i
].
iSockaddrLength
=
sizeof
(
SOCKADDR
);
sockaddr
[
i
].
sin_family
=
AF_INET
;
sockaddr
[
i
].
sin_port
=
0
;
sockaddr
[
i
].
sin_addr
.
WS_s_addr
=
inet_addr
(
p
->
IpAddressList
.
IpAddress
.
String
);
i
++
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
table
);
return
0
;
}
else
{
WARN
(
"unable to get IP address list
\n
"
);
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
}
case
WS_SIO_FLUSH
:
FIXME
(
"SIO_FLUSH: stub.
\n
"
);
break
;
...
...
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