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
13e596b3
Commit
13e596b3
authored
Jul 06, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jul 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implement ConvertInterfaceGuidToLuid() on top of nsi.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4add1d79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+20
-9
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
13e596b3
...
...
@@ -3164,20 +3164,31 @@ ULONG WINAPI GetTcp6Table2(PMIB_TCP6TABLE2 table, PULONG size, BOOL order)
*/
DWORD
WINAPI
ConvertInterfaceGuidToLuid
(
const
GUID
*
guid
,
NET_LUID
*
luid
)
{
DWORD
ret
;
MIB_IFROW
row
;
struct
nsi_ndis_ifinfo_static
*
data
;
DWORD
err
,
count
,
i
;
NET_LUID
*
keys
;
TRACE
(
"(%s %p)
\n
"
,
debugstr_guid
(
guid
),
luid
);
TRACE
(
"(%s %p)
\n
"
,
debugstr_guid
(
guid
),
luid
);
if
(
!
guid
||
!
luid
)
return
ERROR_INVALID_PARAMETER
;
luid
->
Value
=
0
;
row
.
dwIndex
=
guid
->
Data1
;
if
((
ret
=
GetIfEntry
(
&
row
)))
return
ret
;
err
=
NsiAllocateAndGetTable
(
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
(
void
**
)
&
keys
,
sizeof
(
*
keys
),
NULL
,
0
,
NULL
,
0
,
(
void
**
)
&
data
,
sizeof
(
*
data
),
&
count
,
0
);
if
(
err
)
return
err
;
luid
->
Info
.
Reserved
=
0
;
luid
->
Info
.
NetLuidIndex
=
guid
->
Data1
;
luid
->
Info
.
IfType
=
row
.
dwType
;
return
NO_ERROR
;
err
=
ERROR_INVALID_PARAMETER
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
IsEqualGUID
(
&
data
[
i
].
if_guid
,
guid
))
{
luid
->
Value
=
keys
[
i
].
Value
;
err
=
ERROR_SUCCESS
;
break
;
}
}
NsiFreeTable
(
keys
,
NULL
,
NULL
,
data
);
return
err
;
}
/******************************************************************
...
...
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