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
e62eadad
Commit
e62eadad
authored
Jul 07, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jul 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implement ConvertInterfaceAliasToLuid().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5b90e93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
1 deletion
+35
-1
iphlpapi.spec
dlls/iphlpapi/iphlpapi.spec
+1
-1
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+33
-0
netioapi.h
include/netioapi.h
+1
-0
No files found.
dlls/iphlpapi/iphlpapi.spec
View file @
e62eadad
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
@ stdcall CancelMibChangeNotify2( ptr )
@ stdcall CancelMibChangeNotify2( ptr )
#@ stub ConvertGuidToStringA
#@ stub ConvertGuidToStringA
#@ stub ConvertGuidToStringW
#@ stub ConvertGuidToStringW
#@ stub ConvertInterfaceAliasToLuid
@ stdcall ConvertInterfaceAliasToLuid( ptr ptr )
@ stdcall ConvertInterfaceGuidToLuid( ptr ptr )
@ stdcall ConvertInterfaceGuidToLuid( ptr ptr )
@ stdcall ConvertInterfaceIndexToLuid( long ptr )
@ stdcall ConvertInterfaceIndexToLuid( long ptr )
#@ stub ConvertInterfaceLuidToAlias
#@ stub ConvertInterfaceLuidToAlias
...
...
dlls/iphlpapi/iphlpapi_main.c
View file @
e62eadad
...
@@ -3160,6 +3160,39 @@ ULONG WINAPI GetTcp6Table2(PMIB_TCP6TABLE2 table, PULONG size, BOOL order)
...
@@ -3160,6 +3160,39 @@ ULONG WINAPI GetTcp6Table2(PMIB_TCP6TABLE2 table, PULONG size, BOOL order)
}
}
/******************************************************************
/******************************************************************
* ConvertInterfaceAliasToLuid (IPHLPAPI.@)
*/
DWORD
WINAPI
ConvertInterfaceAliasToLuid
(
const
WCHAR
*
alias
,
NET_LUID
*
luid
)
{
struct
nsi_ndis_ifinfo_rw
*
data
;
DWORD
err
,
count
,
i
,
len
;
NET_LUID
*
keys
;
TRACE
(
"(%s %p)
\n
"
,
debugstr_w
(
alias
),
luid
);
if
(
!
alias
||
!*
alias
||
!
luid
)
return
ERROR_INVALID_PARAMETER
;
luid
->
Value
=
0
;
len
=
strlenW
(
alias
);
err
=
NsiAllocateAndGetTable
(
1
,
&
NPI_MS_NDIS_MODULEID
,
NSI_NDIS_IFINFO_TABLE
,
(
void
**
)
&
keys
,
sizeof
(
*
keys
),
(
void
**
)
&
data
,
sizeof
(
*
data
),
NULL
,
0
,
NULL
,
0
,
&
count
,
0
);
if
(
err
)
return
err
;
err
=
ERROR_INVALID_PARAMETER
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
(
data
[
i
].
alias
.
Length
==
len
*
2
&&
!
memcmp
(
data
[
i
].
alias
.
String
,
alias
,
len
*
2
))
{
luid
->
Value
=
keys
[
i
].
Value
;
err
=
ERROR_SUCCESS
;
break
;
}
}
NsiFreeTable
(
keys
,
data
,
NULL
,
NULL
);
return
err
;
}
/******************************************************************
* ConvertInterfaceGuidToLuid (IPHLPAPI.@)
* ConvertInterfaceGuidToLuid (IPHLPAPI.@)
*/
*/
DWORD
WINAPI
ConvertInterfaceGuidToLuid
(
const
GUID
*
guid
,
NET_LUID
*
luid
)
DWORD
WINAPI
ConvertInterfaceGuidToLuid
(
const
GUID
*
guid
,
NET_LUID
*
luid
)
...
...
include/netioapi.h
View file @
e62eadad
...
@@ -238,6 +238,7 @@ typedef VOID (WINAPI *PUNICAST_IPADDRESS_CHANGE_CALLBACK)(PVOID, PMIB_UNICASTIPA
...
@@ -238,6 +238,7 @@ typedef VOID (WINAPI *PUNICAST_IPADDRESS_CHANGE_CALLBACK)(PVOID, PMIB_UNICASTIPA
typedef
VOID
(
WINAPI
*
PIPFORWARD_CHANGE_CALLBACK
)(
VOID
*
,
MIB_IPFORWARD_ROW2
*
,
MIB_NOTIFICATION_TYPE
);
typedef
VOID
(
WINAPI
*
PIPFORWARD_CHANGE_CALLBACK
)(
VOID
*
,
MIB_IPFORWARD_ROW2
*
,
MIB_NOTIFICATION_TYPE
);
DWORD
WINAPI
ConvertInterfaceAliasToLuid
(
const
WCHAR
*
,
NET_LUID
*
);
DWORD
WINAPI
ConvertInterfaceGuidToLuid
(
const
GUID
*
,
NET_LUID
*
);
DWORD
WINAPI
ConvertInterfaceGuidToLuid
(
const
GUID
*
,
NET_LUID
*
);
DWORD
WINAPI
ConvertInterfaceIndexToLuid
(
NET_IFINDEX
,
NET_LUID
*
);
DWORD
WINAPI
ConvertInterfaceIndexToLuid
(
NET_IFINDEX
,
NET_LUID
*
);
DWORD
WINAPI
ConvertInterfaceLuidToGuid
(
const
NET_LUID
*
,
GUID
*
);
DWORD
WINAPI
ConvertInterfaceLuidToGuid
(
const
NET_LUID
*
,
GUID
*
);
...
...
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