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
ec49a574
Commit
ec49a574
authored
Aug 31, 2013
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add a request to get socket information.
parent
f5023dda
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
1 deletion
+67
-1
server_protocol.h
include/wine/server_protocol.h
+20
-1
protocol.def
server/protocol.def
+10
-0
request.h
server/request.h
+8
-0
sock.c
server/sock.c
+14
-0
trace.c
server/trace.c
+15
-0
No files found.
include/wine/server_protocol.h
View file @
ec49a574
...
...
@@ -1529,6 +1529,22 @@ struct get_socket_event_reply
struct
get_socket_info_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
};
struct
get_socket_info_reply
{
struct
reply_header
__header
;
int
family
;
int
type
;
int
protocol
;
char
__pad_20
[
4
];
};
struct
enable_socket_event_request
{
struct
request_header
__header
;
...
...
@@ -5082,6 +5098,7 @@ enum request
REQ_accept_into_socket
,
REQ_set_socket_event
,
REQ_get_socket_event
,
REQ_get_socket_info
,
REQ_enable_socket_event
,
REQ_set_socket_deferred
,
REQ_alloc_console
,
...
...
@@ -5341,6 +5358,7 @@ union generic_request
struct
accept_into_socket_request
accept_into_socket_request
;
struct
set_socket_event_request
set_socket_event_request
;
struct
get_socket_event_request
get_socket_event_request
;
struct
get_socket_info_request
get_socket_info_request
;
struct
enable_socket_event_request
enable_socket_event_request
;
struct
set_socket_deferred_request
set_socket_deferred_request
;
struct
alloc_console_request
alloc_console_request
;
...
...
@@ -5598,6 +5616,7 @@ union generic_reply
struct
accept_into_socket_reply
accept_into_socket_reply
;
struct
set_socket_event_reply
set_socket_event_reply
;
struct
get_socket_event_reply
get_socket_event_reply
;
struct
get_socket_info_reply
get_socket_info_reply
;
struct
enable_socket_event_reply
enable_socket_event_reply
;
struct
set_socket_deferred_reply
set_socket_deferred_reply
;
struct
alloc_console_reply
alloc_console_reply
;
...
...
@@ -5802,6 +5821,6 @@ union generic_reply
struct
set_suspend_context_reply
set_suspend_context_reply
;
};
#define SERVER_PROTOCOL_VERSION 44
7
#define SERVER_PROTOCOL_VERSION 44
8
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
ec49a574
...
...
@@ -1236,6 +1236,16 @@ enum server_fd_type
@END
/* Get socket info */
@REQ(get_socket_info)
obj_handle_t handle; /* handle to the socket */
@REPLY
int family; /* family, see socket manpage */
int type; /* type, see socket manpage */
int protocol; /* protocol, see socket manpage */
@END
/* Re-enable pending socket events */
@REQ(enable_socket_event)
obj_handle_t handle; /* handle to the socket */
...
...
server/request.h
View file @
ec49a574
...
...
@@ -156,6 +156,7 @@ DECL_HANDLER(accept_socket);
DECL_HANDLER
(
accept_into_socket
);
DECL_HANDLER
(
set_socket_event
);
DECL_HANDLER
(
get_socket_event
);
DECL_HANDLER
(
get_socket_info
);
DECL_HANDLER
(
enable_socket_event
);
DECL_HANDLER
(
set_socket_deferred
);
DECL_HANDLER
(
alloc_console
);
...
...
@@ -414,6 +415,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_accept_into_socket
,
(
req_handler
)
req_set_socket_event
,
(
req_handler
)
req_get_socket_event
,
(
req_handler
)
req_get_socket_info
,
(
req_handler
)
req_enable_socket_event
,
(
req_handler
)
req_set_socket_deferred
,
(
req_handler
)
req_alloc_console
,
...
...
@@ -972,6 +974,12 @@ C_ASSERT( FIELD_OFFSET(struct get_socket_event_reply, mask) == 8 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_socket_event_reply
,
pmask
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_socket_event_reply
,
state
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_socket_event_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_socket_info_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_socket_info_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_socket_info_reply
,
family
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_socket_info_reply
,
type
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_socket_info_reply
,
protocol
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_socket_info_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
enable_socket_event_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
enable_socket_event_request
,
mask
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
enable_socket_event_request
,
sstate
)
==
20
);
...
...
server/sock.c
View file @
ec49a574
...
...
@@ -1073,3 +1073,17 @@ DECL_HANDLER(set_socket_deferred)
sock
->
deferred
=
acceptsock
;
release_object
(
sock
);
}
DECL_HANDLER
(
get_socket_info
)
{
struct
sock
*
sock
;
sock
=
(
struct
sock
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
FILE_READ_ATTRIBUTES
,
&
sock_ops
);
if
(
!
sock
)
return
;
reply
->
family
=
sock
->
family
;
reply
->
type
=
sock
->
type
;
reply
->
protocol
=
sock
->
proto
;
release_object
(
&
sock
->
obj
);
}
server/trace.c
View file @
ec49a574
...
...
@@ -1712,6 +1712,18 @@ static void dump_get_socket_event_reply( const struct get_socket_event_reply *re
dump_varargs_ints
(
", errors="
,
cur_size
);
}
static
void
dump_get_socket_info_request
(
const
struct
get_socket_info_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
}
static
void
dump_get_socket_info_reply
(
const
struct
get_socket_info_reply
*
req
)
{
fprintf
(
stderr
,
" family=%d"
,
req
->
family
);
fprintf
(
stderr
,
", type=%d"
,
req
->
type
);
fprintf
(
stderr
,
", protocol=%d"
,
req
->
protocol
);
}
static
void
dump_enable_socket_event_request
(
const
struct
enable_socket_event_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
...
...
@@ -4107,6 +4119,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_accept_into_socket_request
,
(
dump_func
)
dump_set_socket_event_request
,
(
dump_func
)
dump_get_socket_event_request
,
(
dump_func
)
dump_get_socket_info_request
,
(
dump_func
)
dump_enable_socket_event_request
,
(
dump_func
)
dump_set_socket_deferred_request
,
(
dump_func
)
dump_alloc_console_request
,
...
...
@@ -4362,6 +4375,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL
,
NULL
,
(
dump_func
)
dump_get_socket_event_reply
,
(
dump_func
)
dump_get_socket_info_reply
,
NULL
,
NULL
,
(
dump_func
)
dump_alloc_console_reply
,
...
...
@@ -4617,6 +4631,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"accept_into_socket"
,
"set_socket_event"
,
"get_socket_event"
,
"get_socket_info"
,
"enable_socket_event"
,
"set_socket_deferred"
,
"alloc_console"
,
...
...
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