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
d4db504a
Commit
d4db504a
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 NsiGetAllParameters().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f0e91f5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
1 deletion
+63
-1
nsi.c
dlls/nsi/nsi.c
+9
-0
nsi.spec
dlls/nsi/nsi.spec
+1
-1
nsi.c
dlls/nsi/tests/nsi.c
+50
-0
nsi.h
include/wine/nsi.h
+3
-0
No files found.
dlls/nsi/nsi.c
View file @
d4db504a
...
...
@@ -42,3 +42,12 @@ void WINAPI NsiFreeTable( void *key_data, void *rw_data, void *dynamic_data, voi
{
FIXME
(
"%p %p %p %p: stub
\n
"
,
key_data
,
rw_data
,
dynamic_data
,
static_data
);
}
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
*
static_data
,
DWORD
static_size
)
{
FIXME
(
"%d %p %d %p %d %p %d %p %d %p %d: stub
\n
"
,
unk
,
module
,
table
,
key
,
key_size
,
rw_data
,
rw_size
,
dynamic_data
,
dynamic_size
,
static_data
,
static_size
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
dlls/nsi/nsi.spec
View file @
d4db504a
...
...
@@ -8,7 +8,7 @@
@ stub NsiEnumerateObjectsAllPersistentParametersWithMask
@ stub NsiFreePersistentDataWithMaskTable
@ stdcall NsiFreeTable(ptr ptr ptr ptr)
@ st
ub NsiGetAllParameters
@ st
dcall NsiGetAllParameters(long ptr long ptr long ptr long ptr long ptr long)
@ stub NsiGetAllParametersEx
@ stub NsiGetAllPersistentParametersWithMask
@ stub NsiObjectSecurity
...
...
dlls/nsi/tests/nsi.c
View file @
d4db504a
...
...
@@ -33,6 +33,54 @@ static int bounded( ULONG64 val, ULONG64 lo, ULONG64 hi )
return
lo
<=
val
&&
val
<=
hi
;
}
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
),
sizeof
(
struct
nsi_ndis_ifinfo_rw
)
};
struct
nsi_ndis_ifinfo_rw
*
rw_tbl
,
*
rw
,
get_rw
;
struct
nsi_ndis_ifinfo_dynamic
*
dyn_tbl
,
*
dyn
,
get_dyn
;
struct
nsi_ndis_ifinfo_static
*
stat_tbl
,
*
stat
,
get_stat
;
DWORD
err
,
count
,
i
,
rw_size
;
NET_LUID
*
luid_tbl
;
/* Use the NDIS ifinfo table to test various api */
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
rw_sizes
);
i
++
)
{
err
=
NsiAllocateAndGetTable
(
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
(
void
**
)
&
luid_tbl
,
sizeof
(
*
luid_tbl
),
(
void
**
)
&
rw_tbl
,
rw_sizes
[
i
],
(
void
**
)
&
dyn_tbl
,
sizeof
(
*
dyn_tbl
),
(
void
**
)
&
stat_tbl
,
sizeof
(
*
stat_tbl
),
&
count
,
0
);
if
(
!
err
)
break
;
}
todo_wine
ok
(
!
err
,
"got %d
\n
"
,
err
);
if
(
err
)
return
;
rw_size
=
rw_sizes
[
i
];
for
(
i
=
0
;
i
<
count
;
i
++
)
{
winetest_push_context
(
"%d"
,
i
);
rw
=
(
struct
nsi_ndis_ifinfo_rw
*
)((
BYTE
*
)
rw_tbl
+
i
*
rw_size
);
dyn
=
dyn_tbl
+
i
;
stat
=
stat_tbl
+
i
;
err
=
NsiGetAllParameters
(
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
luid_tbl
+
i
,
sizeof
(
*
luid_tbl
),
&
get_rw
,
rw_size
,
&
get_dyn
,
sizeof
(
get_dyn
),
&
get_stat
,
sizeof
(
get_stat
)
);
ok
(
!
err
,
"got %d
\n
"
,
err
);
/* test a selection of members */
ok
(
IsEqualGUID
(
&
get_rw
.
network_guid
,
&
rw
->
network_guid
),
"mismatch
\n
"
);
ok
(
get_rw
.
alias
.
Length
==
rw
->
alias
.
Length
,
"mismatch
\n
"
);
ok
(
!
memcmp
(
get_rw
.
alias
.
String
,
rw
->
alias
.
String
,
rw
->
alias
.
Length
),
"mismatch
\n
"
);
ok
(
get_rw
.
phys_addr
.
Length
==
rw
->
phys_addr
.
Length
,
"mismatch
\n
"
);
ok
(
!
memcmp
(
get_rw
.
phys_addr
.
Address
,
rw
->
phys_addr
.
Address
,
IF_MAX_PHYS_ADDRESS_LENGTH
),
"mismatch
\n
"
);
ok
(
get_dyn
.
oper_status
==
dyn
->
oper_status
,
"mismatch
\n
"
);
ok
(
get_stat
.
if_index
==
stat
->
if_index
,
"mismatch
\n
"
);
ok
(
IsEqualGUID
(
&
get_stat
.
if_guid
,
&
stat
->
if_guid
),
"mismatch
\n
"
);
winetest_pop_context
();
}
NsiFreeTable
(
luid_tbl
,
rw_tbl
,
dyn_tbl
,
stat_tbl
);
}
static
void
test_ndis_ifinfo
(
void
)
{
DWORD
rw_sizes
[]
=
{
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
name2
),
FIELD_OFFSET
(
struct
nsi_ndis_ifinfo_rw
,
unk
),
...
...
@@ -145,5 +193,7 @@ todo_wine
START_TEST
(
nsi
)
{
test_nsi_api
();
test_ndis_ifinfo
();
}
include/wine/nsi.h
View file @
d4db504a
...
...
@@ -97,5 +97,8 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
void
**
rw_data
,
DWORD
rw_size
,
void
**
dynamic_data
,
DWORD
dynamic_size
,
void
**
static_data
,
DWORD
static_size
,
DWORD
*
count
,
DWORD
unk2
);
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
,
void
*
rw_data
,
DWORD
rw_size
,
void
*
dynamic_data
,
DWORD
dynamic_size
,
void
*
static_data
,
DWORD
static_size
);
#endif
/* __WINE_NSI_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