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
019211f8
Commit
019211f8
authored
Oct 13, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
Oct 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added socket interface to wineserver.
parent
448b34a0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
0 deletions
+152
-0
server.h
include/server.h
+59
-0
winsock.h
include/winsock.h
+1
-0
Makefile.in
server/Makefile.in
+1
-0
request.h
server/request.h
+10
-0
sock.c
server/sock.c
+0
-0
trace.c
server/trace.c
+81
-0
No files found.
include/server.h
View file @
019211f8
...
@@ -463,6 +463,60 @@ struct create_pipe_request
...
@@ -463,6 +463,60 @@ struct create_pipe_request
};
};
/* Create a socket */
struct
create_socket_request
{
IN
unsigned
int
access
;
/* wanted access rights */
IN
int
inherit
;
/* inherit flag */
IN
int
family
;
/* family, see socket manpage */
IN
int
type
;
/* type, see socket manpage */
IN
int
protocol
;
/* protocol, see socket manpage */
OUT
int
handle
;
/* handle to the new socket */
};
/* Accept a socket */
struct
accept_socket_request
{
IN
int
lhandle
;
/* handle to the listening socket */
IN
unsigned
int
access
;
/* wanted access rights */
IN
int
inherit
;
/* inherit flag */
OUT
int
handle
;
/* handle to the new socket */
};
/* Set socket event parameters */
struct
set_socket_event_request
{
IN
int
handle
;
/* handle to the socket */
IN
unsigned
int
mask
;
/* event mask */
IN
int
event
;
/* event object */
};
/* Get socket event parameters */
struct
get_socket_event_request
{
IN
int
handle
;
/* handle to the socket */
IN
int
service
;
/* clear pending? */
IN
int
s_event
;
/* "expected" event object */
OUT
unsigned
int
mask
;
/* event mask */
OUT
unsigned
int
pmask
;
/* pending events */
OUT
unsigned
int
state
;
/* status bits */
OUT
int
errors
[
1
];
/* event errors */
};
/* Reenable pending socket events */
struct
enable_socket_event_request
{
IN
int
handle
;
/* handle to the socket */
IN
unsigned
int
mask
;
/* events to re-enable */
IN
unsigned
int
sstate
;
/* status bits to set */
IN
unsigned
int
cstate
;
/* status bits to clear */
};
/* Allocate a console for the current process */
/* Allocate a console for the current process */
struct
alloc_console_request
struct
alloc_console_request
{
{
...
@@ -794,6 +848,11 @@ enum request
...
@@ -794,6 +848,11 @@ enum request
REQ_LOCK_FILE
,
REQ_LOCK_FILE
,
REQ_UNLOCK_FILE
,
REQ_UNLOCK_FILE
,
REQ_CREATE_PIPE
,
REQ_CREATE_PIPE
,
REQ_CREATE_SOCKET
,
REQ_ACCEPT_SOCKET
,
REQ_SET_SOCKET_EVENT
,
REQ_GET_SOCKET_EVENT
,
REQ_ENABLE_SOCKET_EVENT
,
REQ_ALLOC_CONSOLE
,
REQ_ALLOC_CONSOLE
,
REQ_FREE_CONSOLE
,
REQ_FREE_CONSOLE
,
REQ_OPEN_CONSOLE
,
REQ_OPEN_CONSOLE
,
...
...
include/winsock.h
View file @
019211f8
...
@@ -282,6 +282,7 @@ typedef struct WSAData {
...
@@ -282,6 +282,7 @@ typedef struct WSAData {
#define WS_FD_INACTIVE 0x20000000
#define WS_FD_INACTIVE 0x20000000
#define WS_FD_CONNECTED 0x40000000
#define WS_FD_CONNECTED 0x40000000
#define WS_FD_RAW 0x80000000
#define WS_FD_RAW 0x80000000
#define WS_FD_NONBLOCKING 0x01000000
#define WS_FD_INTERNAL 0xFFFF0000
#define WS_FD_INTERNAL 0xFFFF0000
/*
/*
...
...
server/Makefile.in
View file @
019211f8
...
@@ -22,6 +22,7 @@ C_SRCS = \
...
@@ -22,6 +22,7 @@ C_SRCS = \
snapshot.c
\
snapshot.c
\
select
.c
\
select
.c
\
semaphore.c
\
semaphore.c
\
sock.c
\
socket.c
\
socket.c
\
thread.c
\
thread.c
\
trace.c
trace.c
...
...
server/request.h
View file @
019211f8
...
@@ -105,6 +105,11 @@ DECL_HANDLER(get_file_info);
...
@@ -105,6 +105,11 @@ DECL_HANDLER(get_file_info);
DECL_HANDLER
(
lock_file
);
DECL_HANDLER
(
lock_file
);
DECL_HANDLER
(
unlock_file
);
DECL_HANDLER
(
unlock_file
);
DECL_HANDLER
(
create_pipe
);
DECL_HANDLER
(
create_pipe
);
DECL_HANDLER
(
create_socket
);
DECL_HANDLER
(
accept_socket
);
DECL_HANDLER
(
set_socket_event
);
DECL_HANDLER
(
get_socket_event
);
DECL_HANDLER
(
enable_socket_event
);
DECL_HANDLER
(
alloc_console
);
DECL_HANDLER
(
alloc_console
);
DECL_HANDLER
(
free_console
);
DECL_HANDLER
(
free_console
);
DECL_HANDLER
(
open_console
);
DECL_HANDLER
(
open_console
);
...
@@ -177,6 +182,11 @@ static const struct handler {
...
@@ -177,6 +182,11 @@ static const struct handler {
{
(
void
(
*
)())
req_lock_file
,
sizeof
(
struct
lock_file_request
)
},
{
(
void
(
*
)())
req_lock_file
,
sizeof
(
struct
lock_file_request
)
},
{
(
void
(
*
)())
req_unlock_file
,
sizeof
(
struct
unlock_file_request
)
},
{
(
void
(
*
)())
req_unlock_file
,
sizeof
(
struct
unlock_file_request
)
},
{
(
void
(
*
)())
req_create_pipe
,
sizeof
(
struct
create_pipe_request
)
},
{
(
void
(
*
)())
req_create_pipe
,
sizeof
(
struct
create_pipe_request
)
},
{
(
void
(
*
)())
req_create_socket
,
sizeof
(
struct
create_socket_request
)
},
{
(
void
(
*
)())
req_accept_socket
,
sizeof
(
struct
accept_socket_request
)
},
{
(
void
(
*
)())
req_set_socket_event
,
sizeof
(
struct
set_socket_event_request
)
},
{
(
void
(
*
)())
req_get_socket_event
,
sizeof
(
struct
get_socket_event_request
)
},
{
(
void
(
*
)())
req_enable_socket_event
,
sizeof
(
struct
enable_socket_event_request
)
},
{
(
void
(
*
)())
req_alloc_console
,
sizeof
(
struct
alloc_console_request
)
},
{
(
void
(
*
)())
req_alloc_console
,
sizeof
(
struct
alloc_console_request
)
},
{
(
void
(
*
)())
req_free_console
,
sizeof
(
struct
free_console_request
)
},
{
(
void
(
*
)())
req_free_console
,
sizeof
(
struct
free_console_request
)
},
{
(
void
(
*
)())
req_open_console
,
sizeof
(
struct
open_console_request
)
},
{
(
void
(
*
)())
req_open_console
,
sizeof
(
struct
open_console_request
)
},
...
...
server/sock.c
0 → 100644
View file @
019211f8
This diff is collapsed.
Click to expand it.
server/trace.c
View file @
019211f8
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/uio.h>
#include "winsock2.h"
#include "request.h"
#include "request.h"
...
@@ -28,6 +29,14 @@ static void dump_varargs_get_apcs( struct get_apcs_request *req )
...
@@ -28,6 +29,14 @@ static void dump_varargs_get_apcs( struct get_apcs_request *req )
fprintf
(
stderr
,
"}"
);
fprintf
(
stderr
,
"}"
);
}
}
static
void
dump_varargs_get_socket_event
(
struct
get_socket_event_request
*
req
)
{
int
i
;
for
(
i
=
0
;
i
<
FD_MAX_EVENTS
;
i
++
)
fprintf
(
stderr
,
"%c%d"
,
i
?
','
:
'{'
,
req
->
errors
[
i
]
);
fprintf
(
stderr
,
"}"
);
}
typedef
void
(
*
dump_func
)(
const
void
*
req
);
typedef
void
(
*
dump_func
)(
const
void
*
req
);
...
@@ -474,6 +483,63 @@ static void dump_create_pipe_reply( struct create_pipe_request *req )
...
@@ -474,6 +483,63 @@ static void dump_create_pipe_reply( struct create_pipe_request *req )
fprintf
(
stderr
,
" handle_write=%d"
,
req
->
handle_write
);
fprintf
(
stderr
,
" handle_write=%d"
,
req
->
handle_write
);
}
}
static
void
dump_create_socket_request
(
struct
create_socket_request
*
req
)
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" inherit=%d,"
,
req
->
inherit
);
fprintf
(
stderr
,
" family=%d,"
,
req
->
family
);
fprintf
(
stderr
,
" type=%d,"
,
req
->
type
);
fprintf
(
stderr
,
" protocol=%d"
,
req
->
protocol
);
}
static
void
dump_create_socket_reply
(
struct
create_socket_request
*
req
)
{
fprintf
(
stderr
,
" handle=%d"
,
req
->
handle
);
}
static
void
dump_accept_socket_request
(
struct
accept_socket_request
*
req
)
{
fprintf
(
stderr
,
" lhandle=%d,"
,
req
->
lhandle
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" inherit=%d"
,
req
->
inherit
);
}
static
void
dump_accept_socket_reply
(
struct
accept_socket_request
*
req
)
{
fprintf
(
stderr
,
" handle=%d"
,
req
->
handle
);
}
static
void
dump_set_socket_event_request
(
struct
set_socket_event_request
*
req
)
{
fprintf
(
stderr
,
" handle=%d,"
,
req
->
handle
);
fprintf
(
stderr
,
" mask=%08x,"
,
req
->
mask
);
fprintf
(
stderr
,
" event=%d"
,
req
->
event
);
}
static
void
dump_get_socket_event_request
(
struct
get_socket_event_request
*
req
)
{
fprintf
(
stderr
,
" handle=%d,"
,
req
->
handle
);
fprintf
(
stderr
,
" service=%d,"
,
req
->
service
);
fprintf
(
stderr
,
" s_event=%d"
,
req
->
s_event
);
}
static
void
dump_get_socket_event_reply
(
struct
get_socket_event_request
*
req
)
{
fprintf
(
stderr
,
" mask=%08x,"
,
req
->
mask
);
fprintf
(
stderr
,
" pmask=%08x,"
,
req
->
pmask
);
fprintf
(
stderr
,
" state=%08x,"
,
req
->
state
);
fprintf
(
stderr
,
" errors="
);
dump_varargs_get_socket_event
(
req
);
}
static
void
dump_enable_socket_event_request
(
struct
enable_socket_event_request
*
req
)
{
fprintf
(
stderr
,
" handle=%d,"
,
req
->
handle
);
fprintf
(
stderr
,
" mask=%08x,"
,
req
->
mask
);
fprintf
(
stderr
,
" sstate=%08x,"
,
req
->
sstate
);
fprintf
(
stderr
,
" cstate=%08x"
,
req
->
cstate
);
}
static
void
dump_alloc_console_request
(
struct
alloc_console_request
*
req
)
static
void
dump_alloc_console_request
(
struct
alloc_console_request
*
req
)
{
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
...
@@ -736,6 +802,11 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
...
@@ -736,6 +802,11 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_lock_file_request
,
(
dump_func
)
dump_lock_file_request
,
(
dump_func
)
dump_unlock_file_request
,
(
dump_func
)
dump_unlock_file_request
,
(
dump_func
)
dump_create_pipe_request
,
(
dump_func
)
dump_create_pipe_request
,
(
dump_func
)
dump_create_socket_request
,
(
dump_func
)
dump_accept_socket_request
,
(
dump_func
)
dump_set_socket_event_request
,
(
dump_func
)
dump_get_socket_event_request
,
(
dump_func
)
dump_enable_socket_event_request
,
(
dump_func
)
dump_alloc_console_request
,
(
dump_func
)
dump_alloc_console_request
,
(
dump_func
)
dump_free_console_request
,
(
dump_func
)
dump_free_console_request
,
(
dump_func
)
dump_open_console_request
,
(
dump_func
)
dump_open_console_request
,
...
@@ -804,6 +875,11 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
...
@@ -804,6 +875,11 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
0
,
(
dump_func
)
0
,
(
dump_func
)
0
,
(
dump_func
)
0
,
(
dump_func
)
dump_create_pipe_reply
,
(
dump_func
)
dump_create_pipe_reply
,
(
dump_func
)
dump_create_socket_reply
,
(
dump_func
)
dump_accept_socket_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_get_socket_event_reply
,
(
dump_func
)
0
,
(
dump_func
)
dump_alloc_console_reply
,
(
dump_func
)
dump_alloc_console_reply
,
(
dump_func
)
0
,
(
dump_func
)
0
,
(
dump_func
)
dump_open_console_reply
,
(
dump_func
)
dump_open_console_reply
,
...
@@ -872,6 +948,11 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
...
@@ -872,6 +948,11 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"lock_file"
,
"lock_file"
,
"unlock_file"
,
"unlock_file"
,
"create_pipe"
,
"create_pipe"
,
"create_socket"
,
"accept_socket"
,
"set_socket_event"
,
"get_socket_event"
,
"enable_socket_event"
,
"alloc_console"
,
"alloc_console"
,
"free_console"
,
"free_console"
,
"open_console"
,
"open_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