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
d9b281e5
Commit
d9b281e5
authored
Jun 23, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Move the getsockopt(SO_BROADCAST) implementation to ntdll.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8eed10c5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
socket.c
dlls/ntdll/unix/socket.c
+22
-0
socket.c
dlls/ws2_32/socket.c
+3
-1
afd.h
include/wine/afd.h
+1
-0
No files found.
dlls/ntdll/unix/socket.c
View file @
d9b281e5
...
...
@@ -1146,6 +1146,25 @@ static void complete_async( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, vo
}
static
NTSTATUS
do_getsockopt
(
HANDLE
handle
,
IO_STATUS_BLOCK
*
io
,
void
*
out_buffer
,
ULONG
out_size
,
int
level
,
int
option
)
{
int
fd
,
needs_close
=
FALSE
;
socklen_t
len
=
out_size
;
NTSTATUS
status
;
int
ret
;
if
((
status
=
server_get_unix_fd
(
handle
,
0
,
&
fd
,
&
needs_close
,
NULL
,
NULL
)))
return
status
;
ret
=
getsockopt
(
fd
,
level
,
option
,
out_buffer
,
&
len
);
if
(
needs_close
)
close
(
fd
);
if
(
ret
)
return
sock_errno_to_status
(
errno
);
io
->
Information
=
len
;
return
STATUS_SUCCESS
;
}
NTSTATUS
sock_ioctl
(
HANDLE
handle
,
HANDLE
event
,
PIO_APC_ROUTINE
apc
,
void
*
apc_user
,
IO_STATUS_BLOCK
*
io
,
ULONG
code
,
void
*
in_buffer
,
ULONG
in_size
,
void
*
out_buffer
,
ULONG
out_size
)
{
...
...
@@ -1566,6 +1585,9 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
break
;
}
case
IOCTL_AFD_WINE_GET_SO_BROADCAST
:
return
do_getsockopt
(
handle
,
io
,
out_buffer
,
out_size
,
SOL_SOCKET
,
SO_BROADCAST
);
default:
{
if
((
code
>>
16
)
==
FILE_DEVICE_NETWORK
)
...
...
dlls/ws2_32/socket.c
View file @
d9b281e5
...
...
@@ -2098,9 +2098,11 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
case
WS_SO_ACCEPTCONN
:
return
server_getsockopt
(
s
,
IOCTL_AFD_WINE_GET_SO_ACCEPTCONN
,
optval
,
optlen
);
case
WS_SO_BROADCAST
:
return
server_getsockopt
(
s
,
IOCTL_AFD_WINE_GET_SO_BROADCAST
,
optval
,
optlen
);
/* Handle common cases. The special cases are below, sorted
* alphabetically */
case
WS_SO_BROADCAST
:
case
WS_SO_DEBUG
:
case
WS_SO_KEEPALIVE
:
case
WS_SO_OOBINLINE
:
...
...
include/wine/afd.h
View file @
d9b281e5
...
...
@@ -160,6 +160,7 @@ struct afd_get_events_params
#define IOCTL_AFD_WINE_DEFER CTL_CODE(FILE_DEVICE_NETWORK, 217, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_GET_INFO CTL_CODE(FILE_DEVICE_NETWORK, 218, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_GET_SO_ACCEPTCONN CTL_CODE(FILE_DEVICE_NETWORK, 219, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_GET_SO_BROADCAST CTL_CODE(FILE_DEVICE_NETWORK, 220, METHOD_BUFFERED, FILE_ANY_ACCESS)
struct
afd_create_params
{
...
...
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