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
084bcaa7
Commit
084bcaa7
authored
May 13, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
May 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Set MIB_IPADDR_PRIMARY as wType for GetIpAddrTable entries.
parent
e0fa7ff4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
ifenum.c
dlls/iphlpapi/ifenum.c
+5
-1
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+9
-0
ipmib.h
include/ipmib.h
+7
-0
No files found.
dlls/iphlpapi/ifenum.c
View file @
084bcaa7
...
@@ -807,7 +807,11 @@ static DWORD getIPAddrRowByName(PMIB_IPADDRROW ipAddrRow, const char *ifName,
...
@@ -807,7 +807,11 @@ static DWORD getIPAddrRowByName(PMIB_IPADDRROW ipAddrRow, const char *ifName,
/* FIXME: hardcoded reasm size, not sure where to get it */
/* FIXME: hardcoded reasm size, not sure where to get it */
ipAddrRow
->
dwReasmSize
=
65535
;
ipAddrRow
->
dwReasmSize
=
65535
;
ipAddrRow
->
unused1
=
0
;
ipAddrRow
->
unused1
=
0
;
ipAddrRow
->
wType
=
0
;
/* wType is a bit field composed of MIB_IPADDR_* flags. Windows <= XP seems
* to like returning undocumented values 0x20 + 0x02 but for our current
* needs returning MIB_IPADDR_PRIMARY is enough.
*/
ipAddrRow
->
wType
=
MIB_IPADDR_PRIMARY
;
return
ret
;
return
ret
;
}
}
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
084bcaa7
...
@@ -226,7 +226,16 @@ static void testGetIpAddrTable(void)
...
@@ -226,7 +226,16 @@ static void testGetIpAddrTable(void)
"GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
"GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
apiReturn
);
if
(
apiReturn
==
NO_ERROR
&&
buf
->
dwNumEntries
)
if
(
apiReturn
==
NO_ERROR
&&
buf
->
dwNumEntries
)
{
int
i
;
testGetIfEntry
(
buf
->
table
[
0
].
dwIndex
);
testGetIfEntry
(
buf
->
table
[
0
].
dwIndex
);
for
(
i
=
0
;
i
<
buf
->
dwNumEntries
;
i
++
)
{
ok
(
buf
->
table
[
i
].
wType
!=
0
,
"Test[%d]: expected wType > 0
\n
"
,
i
);
trace
(
"Entry[%d]: addr %s, dwIndex %u, wType 0x%x
\n
"
,
i
,
ntoa
(
buf
->
table
[
i
].
dwAddr
),
buf
->
table
[
i
].
dwIndex
,
buf
->
table
[
i
].
wType
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
}
}
}
...
...
include/ipmib.h
View file @
084bcaa7
...
@@ -21,6 +21,13 @@
...
@@ -21,6 +21,13 @@
#include <ifmib.h>
#include <ifmib.h>
#include <nldef.h>
#include <nldef.h>
/* Flags used in the wType field from MIB_IPADDRROW */
#define MIB_IPADDR_PRIMARY 0x0001
#define MIB_IPADDR_DYNAMIC 0x0004
#define MIB_IPADDR_DISCONNECTED 0x0008
#define MIB_IPADDR_DELETED 0x0040
#define MIB_IPADDR_TRANSIENT 0x0080
/* IPADDR table */
/* IPADDR table */
...
...
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