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
37097b96
Commit
37097b96
authored
Oct 01, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Oct 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsiproxy: Build with msvcrt.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f6917bad
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
14 deletions
+82
-14
configure
configure
+0
-1
configure.ac
configure.ac
+0
-1
Makefile.in
dlls/nsiproxy.sys/Makefile.in
+3
-2
device.c
dlls/nsiproxy.sys/device.c
+28
-8
ip.c
dlls/nsiproxy.sys/ip.c
+6
-0
ndis.c
dlls/nsiproxy.sys/ndis.c
+7
-2
nsi.c
dlls/nsiproxy.sys/nsi.c
+30
-0
tcp.c
dlls/nsiproxy.sys/tcp.c
+4
-0
udp.c
dlls/nsiproxy.sys/udp.c
+4
-0
No files found.
configure
View file @
37097b96
...
...
@@ -8343,7 +8343,6 @@ if test "x$ac_cv_cflags__Wl___disable_stdcall_fixup" = xyes; then :
fi
;;
esac
enable_iphlpapi
=
${
enable_iphlpapi
:-
no
}
enable_nsiproxy_sys
=
${
enable_nsiproxy_sys
:-
no
}
enable_loader
=
${
enable_loader
:-
no
}
enable_server
=
${
enable_server
:-
no
}
with_x
=
${
with_x
:-
no
}
...
...
configure.ac
View file @
37097b96
...
...
@@ -725,7 +725,6 @@ case $host_os in
esac
dnl Disable modules that can't be used on Windows
enable_iphlpapi=${enable_iphlpapi:-no}
enable_nsiproxy_sys=${enable_nsiproxy_sys:-no}
enable_loader=${enable_loader:-no}
enable_server=${enable_server:-no}
dnl Disable dependencies that are not useful on Windows
...
...
dlls/nsiproxy.sys/Makefile.in
View file @
37097b96
MODULE
=
nsiproxy.sys
IMPORTS
=
ntoskrnl uuid
UNIXLIB
=
nsiproxy.so
IMPORTS
=
ntoskrnl
EXTRALIBS
=
$(PROCSTAT_LIBS)
EXTRADLLFLAGS
=
-Wl
,--subsystem,native
-mcygwin
EXTRADLLFLAGS
=
-Wl
,--subsystem,native
C_SRCS
=
\
device.c
\
...
...
dlls/nsiproxy.sys/device.c
View file @
37097b96
...
...
@@ -32,10 +32,24 @@
#include "netiodef.h"
#include "wine/nsi.h"
#include "wine/debug.h"
#include "
nsiproxy_private
.h"
#include "
wine/unixlib
.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
nsi
);
static
unixlib_handle_t
nsiproxy_handle
;
static
NTSTATUS
nsiproxy_call
(
unsigned
int
code
,
void
*
args
)
{
return
__wine_unix_call
(
nsiproxy_handle
,
code
,
args
);
}
enum
unix_calls
{
nsi_enumerate_all_ex
,
nsi_get_all_parameters_ex
,
nsi_get_parameter_ex
,
};
static
void
nsiproxy_enumerate_all
(
IRP
*
irp
)
{
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
...
...
@@ -73,7 +87,7 @@ static void nsiproxy_enumerate_all( IRP *irp )
enum_all
.
static_size
=
in
->
static_size
;
enum_all
.
count
=
in
->
count
;
irp
->
IoStatus
.
u
.
Status
=
nsi
_enumerate_all_ex
(
&
enum_all
);
irp
->
IoStatus
.
u
.
Status
=
nsi
proxy_call
(
nsi_enumerate_all_ex
,
&
enum_all
);
if
(
irp
->
IoStatus
.
u
.
Status
==
STATUS_SUCCESS
||
irp
->
IoStatus
.
u
.
Status
==
STATUS_BUFFER_OVERFLOW
)
{
irp
->
IoStatus
.
Information
=
out_len
;
...
...
@@ -119,7 +133,7 @@ static void nsiproxy_get_all_parameters( IRP *irp )
get_all
.
static_data
=
out
+
in
->
rw_size
+
in
->
dynamic_size
;
get_all
.
static_size
=
in
->
static_size
;
irp
->
IoStatus
.
u
.
Status
=
nsi
_get_all_parameters_ex
(
&
get_all
);
irp
->
IoStatus
.
u
.
Status
=
nsi
proxy_call
(
nsi_get_all_parameters_ex
,
&
get_all
);
irp
->
IoStatus
.
Information
=
(
irp
->
IoStatus
.
u
.
Status
==
STATUS_SUCCESS
)
?
out_len
:
0
;
}
...
...
@@ -152,7 +166,7 @@ static void nsiproxy_get_parameter( IRP *irp )
get_param
.
data_size
=
out_len
;
get_param
.
data_offset
=
in
->
data_offset
;
irp
->
IoStatus
.
u
.
Status
=
nsi
_get_parameter_ex
(
&
get_param
);
irp
->
IoStatus
.
u
.
Status
=
nsi
proxy_call
(
nsi_get_parameter_ex
,
&
get_param
);
irp
->
IoStatus
.
Information
=
irp
->
IoStatus
.
u
.
Status
==
STATUS_SUCCESS
?
out_len
:
0
;
}
...
...
@@ -193,14 +207,12 @@ static NTSTATUS WINAPI nsi_ioctl( DEVICE_OBJECT *device, IRP *irp )
static
int
add_device
(
DRIVER_OBJECT
*
driver
)
{
static
const
WCHAR
name_str
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'N'
,
's'
,
'i'
,
0
};
static
const
WCHAR
link_str
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'N'
,
's'
,
'i'
,
0
};
UNICODE_STRING
name
,
link
;
DEVICE_OBJECT
*
device
;
NTSTATUS
status
;
RtlInitUnicodeString
(
&
name
,
name_str
);
RtlInitUnicodeString
(
&
link
,
link_str
);
RtlInitUnicodeString
(
&
name
,
L"
\\
Device
\\
Nsi"
);
RtlInitUnicodeString
(
&
link
,
L"
\\
??
\\
Nsi"
);
if
(
!
(
status
=
IoCreateDevice
(
driver
,
0
,
&
name
,
FILE_DEVICE_NETWORK
,
FILE_DEVICE_SECURE_OPEN
,
FALSE
,
&
device
)))
status
=
IoCreateSymbolicLink
(
&
link
,
&
name
);
...
...
@@ -215,8 +227,16 @@ static int add_device( DRIVER_OBJECT *driver )
NTSTATUS
WINAPI
DriverEntry
(
DRIVER_OBJECT
*
driver
,
UNICODE_STRING
*
path
)
{
HMODULE
instance
;
NTSTATUS
status
;
TRACE
(
"(%p, %s)
\n
"
,
driver
,
debugstr_w
(
path
->
Buffer
)
);
RtlPcToFileHeader
(
&
DriverEntry
,
(
void
*
)
&
instance
);
status
=
NtQueryVirtualMemory
(
GetCurrentProcess
(),
instance
,
MemoryWineUnixFuncs
,
&
nsiproxy_handle
,
sizeof
(
nsiproxy_handle
),
NULL
);
if
(
status
)
return
status
;
driver
->
MajorFunction
[
IRP_MJ_DEVICE_CONTROL
]
=
nsi_ioctl
;
add_device
(
driver
);
...
...
dlls/nsiproxy.sys/ip.c
View file @
37097b96
...
...
@@ -18,6 +18,12 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#define _NTSYSTEM_
#include "config.h"
#include <stdarg.h>
...
...
dlls/nsiproxy.sys/ndis.c
View file @
37097b96
...
...
@@ -18,6 +18,10 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <stdarg.h>
...
...
@@ -85,6 +89,7 @@
#include "wine/nsi.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unixlib.h"
#include "nsiproxy_private.h"
...
...
@@ -251,9 +256,9 @@ static WCHAR *strdupAtoW( const char *str )
DWORD
len
;
if
(
!
str
)
return
ret
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
str
,
-
1
,
NULL
,
0
)
;
len
=
strlen
(
str
)
+
1
;
ret
=
malloc
(
len
*
sizeof
(
WCHAR
)
);
if
(
ret
)
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
str
,
-
1
,
ret
,
len
);
if
(
ret
)
ntdll_umbstowcs
(
str
,
len
,
ret
,
len
);
return
ret
;
}
...
...
dlls/nsiproxy.sys/nsi.c
View file @
37097b96
...
...
@@ -17,6 +17,9 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include <stdarg.h>
...
...
@@ -28,9 +31,11 @@
#include "winioctl.h"
#include "ddk/wdm.h"
#include "ifdef.h"
#define __WINE_INIT_NPI_MODULEID
#include "netiodef.h"
#include "wine/nsi.h"
#include "wine/debug.h"
#include "wine/unixlib.h"
#include "nsiproxy_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
nsi
);
...
...
@@ -121,3 +126,28 @@ NTSTATUS nsi_get_parameter_ex( struct nsi_get_parameter_ex *params )
return
entry
->
get_parameter
(
params
->
key
,
params
->
key_size
,
params
->
param_type
,
params
->
data
,
params
->
data_size
,
params
->
data_offset
);
}
static
NTSTATUS
unix_nsi_enumerate_all_ex
(
void
*
args
)
{
struct
nsi_enumerate_all_ex
*
params
=
(
struct
nsi_enumerate_all_ex
*
)
args
;
return
nsi_enumerate_all_ex
(
params
);
}
static
NTSTATUS
unix_nsi_get_all_parameters_ex
(
void
*
args
)
{
struct
nsi_get_all_parameters_ex
*
params
=
(
struct
nsi_get_all_parameters_ex
*
)
args
;
return
nsi_get_all_parameters_ex
(
params
);
}
static
NTSTATUS
unix_nsi_get_parameter_ex
(
void
*
args
)
{
struct
nsi_get_parameter_ex
*
params
=
(
struct
nsi_get_parameter_ex
*
)
args
;
return
nsi_get_parameter_ex
(
params
);
}
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
unix_nsi_enumerate_all_ex
,
unix_nsi_get_all_parameters_ex
,
unix_nsi_get_parameter_ex
};
dlls/nsiproxy.sys/tcp.c
View file @
37097b96
...
...
@@ -19,6 +19,10 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <stdarg.h>
...
...
dlls/nsiproxy.sys/udp.c
View file @
37097b96
...
...
@@ -18,6 +18,10 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if 0
#pragma makedep unix
#endif
#include "config.h"
#include <stdarg.h>
#include <stddef.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