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
687650db
Commit
687650db
authored
Jun 28, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jun 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsi: Add a stub implementation of NsiEnumerateObjectsAllParameters().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b56599d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
6 deletions
+82
-6
nsi.c
dlls/nsi/nsi.c
+10
-0
nsi.spec
dlls/nsi/nsi.spec
+1
-1
nsi.c
dlls/nsi/tests/nsi.c
+67
-5
nsi.h
include/wine/nsi.h
+4
-0
No files found.
dlls/nsi/nsi.c
View file @
687650db
...
@@ -38,6 +38,16 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
...
@@ -38,6 +38,16 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
return
ERROR_CALL_NOT_IMPLEMENTED
;
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
}
DWORD
WINAPI
NsiEnumerateObjectsAllParameters
(
DWORD
unk
,
DWORD
unk2
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
void
*
key_data
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
,
DWORD
*
count
)
{
FIXME
(
"%d %d %p %d %p %d %p %d %p %d %p %d %p: stub
\n
"
,
unk
,
unk2
,
module
,
table
,
key_data
,
key_size
,
rw_data
,
rw_size
,
dynamic_data
,
dynamic_size
,
static_data
,
static_size
,
count
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
void
WINAPI
NsiFreeTable
(
void
*
key_data
,
void
*
rw_data
,
void
*
dynamic_data
,
void
*
static_data
)
void
WINAPI
NsiFreeTable
(
void
*
key_data
,
void
*
rw_data
,
void
*
dynamic_data
,
void
*
static_data
)
{
{
FIXME
(
"%p %p %p %p: stub
\n
"
,
key_data
,
rw_data
,
dynamic_data
,
static_data
);
FIXME
(
"%p %p %p %p: stub
\n
"
,
key_data
,
rw_data
,
dynamic_data
,
static_data
);
...
...
dlls/nsi/nsi.spec
View file @
687650db
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
@ stub NsiCancelChangeNotification
@ stub NsiCancelChangeNotification
@ stub NsiDeregisterChangeNotification
@ stub NsiDeregisterChangeNotification
@ stub NsiDeregisterChangeNotificationEx
@ stub NsiDeregisterChangeNotificationEx
@ st
ub NsiEnumerateObjectsAllParameters
@ st
dcall NsiEnumerateObjectsAllParameters(long long ptr long ptr long ptr long ptr long ptr long ptr)
@ stub NsiEnumerateObjectsAllParametersEx
@ stub NsiEnumerateObjectsAllParametersEx
@ stub NsiEnumerateObjectsAllPersistentParametersWithMask
@ stub NsiEnumerateObjectsAllPersistentParametersWithMask
@ stub NsiFreePersistentDataWithMaskTable
@ stub NsiFreePersistentDataWithMaskTable
...
...
dlls/nsi/tests/nsi.c
View file @
687650db
...
@@ -37,11 +37,11 @@ static void test_nsi_api( void )
...
@@ -37,11 +37,11 @@ static void test_nsi_api( void )
{
{
DWORD
rw_sizes
[]
=
{
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
name2
),
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
unk
),
DWORD
rw_sizes
[]
=
{
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
name2
),
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
unk
),
sizeof
(
struct
nsi_ndis_ifinfo_rw
)
};
sizeof
(
struct
nsi_ndis_ifinfo_rw
)
};
struct
nsi_ndis_ifinfo_rw
*
rw_tbl
,
*
rw
,
get_rw
;
struct
nsi_ndis_ifinfo_rw
*
rw_tbl
,
*
rw
,
get_rw
,
*
enum_rw_tbl
,
*
enum_rw
;
struct
nsi_ndis_ifinfo_dynamic
*
dyn_tbl
,
*
dyn
,
get_dyn
;
struct
nsi_ndis_ifinfo_dynamic
*
dyn_tbl
,
*
dyn
,
get_dyn
,
*
enum_dyn_tbl
,
*
enum_dyn
;
struct
nsi_ndis_ifinfo_static
*
stat_tbl
,
*
stat
,
get_stat
;
struct
nsi_ndis_ifinfo_static
*
stat_tbl
,
*
stat
,
get_stat
,
*
enum_stat_tbl
,
*
enum_stat
;
DWORD
err
,
count
,
i
,
rw_size
;
DWORD
err
,
count
,
i
,
rw_size
,
enum_count
;
NET_LUID
*
luid_tbl
;
NET_LUID
*
luid_tbl
,
*
enum_luid_tbl
;
/* Use the NDIS ifinfo table to test various api */
/* Use the NDIS ifinfo table to test various api */
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
rw_sizes
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
rw_sizes
);
i
++
)
...
@@ -101,6 +101,68 @@ todo_wine
...
@@ -101,6 +101,68 @@ todo_wine
winetest_pop_context
();
winetest_pop_context
();
}
}
enum_count
=
0
;
err
=
NsiEnumerateObjectsAllParameters
(
1
,
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
&
enum_count
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
enum_count
==
count
,
"mismatch
\n
"
);
enum_luid_tbl
=
malloc
(
count
*
sizeof
(
*
enum_luid_tbl
)
);
enum_rw_tbl
=
malloc
(
count
*
rw_size
);
enum_dyn_tbl
=
malloc
(
count
*
sizeof
(
*
enum_dyn_tbl
)
);
enum_stat_tbl
=
malloc
(
count
*
sizeof
(
*
enum_stat_tbl
)
);
err
=
NsiEnumerateObjectsAllParameters
(
1
,
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
enum_luid_tbl
,
sizeof
(
*
enum_luid_tbl
),
enum_rw_tbl
,
rw_size
,
enum_dyn_tbl
,
sizeof
(
*
enum_dyn_tbl
),
enum_stat_tbl
,
sizeof
(
*
enum_stat_tbl
),
&
enum_count
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
ok
(
enum_count
==
count
,
"mismatch
\n
"
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
winetest_push_context
(
"%d"
,
i
);
rw
=
(
struct
nsi_ndis_ifinfo_rw
*
)((
BYTE
*
)
rw_tbl
+
i
*
rw_size
);
enum_rw
=
(
struct
nsi_ndis_ifinfo_rw
*
)((
BYTE
*
)
enum_rw_tbl
+
i
*
rw_size
);
dyn
=
dyn_tbl
+
i
;
enum_dyn
=
enum_dyn_tbl
+
i
;
stat
=
stat_tbl
+
i
;
enum_stat
=
enum_stat_tbl
+
i
;
/* test a selection of members */
ok
(
enum_luid_tbl
[
i
].
Value
==
luid_tbl
[
i
].
Value
,
"mismatch
\n
"
);
ok
(
IsEqualGUID
(
&
enum_rw
->
network_guid
,
&
rw
->
network_guid
),
"mismatch
\n
"
);
ok
(
enum_rw
->
alias
.
Length
==
rw
->
alias
.
Length
,
"mismatch
\n
"
);
ok
(
!
memcmp
(
enum_rw
->
alias
.
String
,
rw
->
alias
.
String
,
rw
->
alias
.
Length
),
"mismatch
\n
"
);
ok
(
enum_rw
->
phys_addr
.
Length
==
rw
->
phys_addr
.
Length
,
"mismatch
\n
"
);
ok
(
!
memcmp
(
enum_rw
->
phys_addr
.
Address
,
rw
->
phys_addr
.
Address
,
IF_MAX_PHYS_ADDRESS_LENGTH
),
"mismatch
\n
"
);
ok
(
enum_dyn
->
oper_status
==
dyn
->
oper_status
,
"mismatch
\n
"
);
ok
(
enum_stat
->
if_index
==
stat
->
if_index
,
"mismatch
\n
"
);
ok
(
IsEqualGUID
(
&
enum_stat
->
if_guid
,
&
stat
->
if_guid
),
"mismatch
\n
"
);
winetest_pop_context
();
}
if
(
count
>
0
)
{
enum_count
--
;
memset
(
enum_luid_tbl
,
0xcc
,
count
*
sizeof
(
*
enum_luid_tbl
)
);
err
=
NsiEnumerateObjectsAllParameters
(
1
,
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
enum_luid_tbl
,
sizeof
(
*
enum_luid_tbl
),
enum_rw_tbl
,
rw_size
,
enum_dyn_tbl
,
sizeof
(
*
enum_dyn_tbl
),
enum_stat_tbl
,
sizeof
(
*
enum_stat_tbl
),
&
enum_count
);
ok
(
err
==
ERROR_MORE_DATA
,
"got %d
\n
"
,
err
);
ok
(
enum_count
==
count
-
1
,
"mismatch
\n
"
);
for
(
i
=
0
;
i
<
enum_count
;
i
++
)
/* for simplicity just check the luids */
ok
(
enum_luid_tbl
[
i
].
Value
==
luid_tbl
[
i
].
Value
,
"%d: mismatch
\n
"
,
i
);
}
free
(
enum_luid_tbl
);
free
(
enum_rw_tbl
);
free
(
enum_dyn_tbl
);
free
(
enum_stat_tbl
);
NsiFreeTable
(
luid_tbl
,
rw_tbl
,
dyn_tbl
,
stat_tbl
);
NsiFreeTable
(
luid_tbl
,
rw_tbl
,
dyn_tbl
,
stat_tbl
);
}
}
...
...
include/wine/nsi.h
View file @
687650db
...
@@ -101,6 +101,10 @@ struct nsi_ndis_ifinfo_static
...
@@ -101,6 +101,10 @@ struct nsi_ndis_ifinfo_static
DWORD
WINAPI
NsiAllocateAndGetTable
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
void
**
key_data
,
DWORD
key_size
,
DWORD
WINAPI
NsiAllocateAndGetTable
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
void
**
key_data
,
DWORD
key_size
,
void
**
rw_data
,
DWORD
rw_size
,
void
**
dynamic_data
,
DWORD
dynamic_size
,
void
**
rw_data
,
DWORD
rw_size
,
void
**
dynamic_data
,
DWORD
dynamic_size
,
void
**
static_data
,
DWORD
static_size
,
DWORD
*
count
,
DWORD
unk2
);
void
**
static_data
,
DWORD
static_size
,
DWORD
*
count
,
DWORD
unk2
);
DWORD
WINAPI
NsiEnumerateObjectsAllParameters
(
DWORD
unk
,
DWORD
unk2
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
void
*
key_data
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
,
DWORD
*
count
);
void
WINAPI
NsiFreeTable
(
void
*
key_data
,
void
*
rw_data
,
void
*
dynamic_data
,
void
*
static_data
);
void
WINAPI
NsiFreeTable
(
void
*
key_data
,
void
*
rw_data
,
void
*
dynamic_data
,
void
*
static_data
);
DWORD
WINAPI
NsiGetAllParameters
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
const
void
*
key
,
DWORD
key_size
,
DWORD
WINAPI
NsiGetAllParameters
(
DWORD
unk
,
const
NPI_MODULEID
*
module
,
DWORD
table
,
const
void
*
key
,
DWORD
key_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
...
...
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