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
c8bfc8d6
Commit
c8bfc8d6
authored
Jun 30, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Fill out a few more MIB_IF_ROW2 entries.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9a7bf63b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+8
-3
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
c8bfc8d6
...
...
@@ -1781,7 +1781,7 @@ DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow)
*/
DWORD
WINAPI
GetIfEntry2
(
MIB_IF_ROW2
*
row2
)
{
DWORD
ret
,
len
=
ARRAY_SIZE
(
row2
->
Description
)
;
DWORD
ret
;
char
buf
[
MAX_ADAPTER_NAME
],
*
name
;
MIB_IFROW
row
;
...
...
@@ -1803,14 +1803,19 @@ DWORD WINAPI GetIfEntry2( MIB_IF_ROW2 *row2 )
ConvertInterfaceLuidToGuid
(
&
row2
->
InterfaceLuid
,
&
row2
->
InterfaceGuid
);
row2
->
Type
=
row
.
dwType
;
row2
->
Mtu
=
row
.
dwMtu
;
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
(
const
char
*
)
row
.
bDescr
,
-
1
,
row2
->
Description
,
len
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
(
const
char
*
)
row
.
bDescr
,
-
1
,
row2
->
Description
,
ARRAY_SIZE
(
row2
->
Description
)
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
(
const
char
*
)
row
.
bDescr
,
-
1
,
row2
->
Alias
,
ARRAY_SIZE
(
row2
->
Alias
)
);
row2
->
PhysicalAddressLength
=
row
.
dwPhysAddrLen
;
memcpy
(
&
row2
->
PhysicalAddress
,
&
row
.
bPhysAddr
,
row
.
dwPhysAddrLen
);
memcpy
(
&
row2
->
PermanentPhysicalAddress
,
&
row
.
bPhysAddr
,
row
.
dwPhysAddrLen
);
row2
->
OperStatus
=
IfOperStatusUp
;
row2
->
OperStatus
=
row
.
dwOperStatus
==
MIB_IF_OPER_STATUS_OPERATIONAL
?
IfOperStatusUp
:
IfOperStatusDown
;
row2
->
AdminStatus
=
NET_IF_ADMIN_STATUS_UP
;
row2
->
MediaConnectState
=
MediaConnectStateConnected
;
row2
->
ConnectionType
=
NET_IF_CONNECTION_DEDICATED
;
row2
->
TransmitLinkSpeed
=
row2
->
ReceiveLinkSpeed
=
row
.
dwSpeed
;
row2
->
AccessType
=
(
row2
->
Type
==
MIB_IF_TYPE_LOOPBACK
)
?
NET_IF_ACCESS_LOOPBACK
:
NET_IF_ACCESS_BROADCAST
;
row2
->
InterfaceAndOperStatusFlags
.
ConnectorPresent
=
row2
->
Type
!=
MIB_IF_TYPE_LOOPBACK
;
row2
->
InterfaceAndOperStatusFlags
.
HardwareInterface
=
row2
->
Type
!=
MIB_IF_TYPE_LOOPBACK
;
/* stats */
row2
->
InOctets
=
row
.
dwInOctets
;
...
...
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