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
a36e1c84
Commit
a36e1c84
authored
Mar 06, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
Mar 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi/tests: Test route type and protocol in GetIpForwardTable.
Signed-off-by:
Bruno Jesus
<
bjesus@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54c3f5c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+24
-4
No files found.
dlls/iphlpapi/tests/iphlpapi.c
View file @
a36e1c84
...
...
@@ -355,7 +355,7 @@ static void testGetIpForwardTable(void)
"GetIpForwardTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
if
(
apiReturn
==
NO_ERROR
&&
winetest_debug
>
1
)
if
(
apiReturn
==
NO_ERROR
)
{
DWORD
i
;
...
...
@@ -363,11 +363,31 @@ static void testGetIpForwardTable(void)
for
(
i
=
0
;
i
<
buf
->
dwNumEntries
;
i
++
)
{
char
buffer
[
100
];
if
(
!
U1
(
buf
->
table
[
i
]).
dwForwardDest
)
/* Default route */
{
todo_wine
ok
(
U1
(
buf
->
table
[
i
]).
dwForwardProto
==
MIB_IPPROTO_NETMGMT
,
"Unexpected dwForwardProto %d
\n
"
,
U1
(
buf
->
table
[
i
]).
dwForwardProto
);
ok
(
U1
(
buf
->
table
[
i
]).
dwForwardType
==
MIB_IPROUTE_TYPE_INDIRECT
,
"Unexpected dwForwardType %d
\n
"
,
U1
(
buf
->
table
[
i
]).
dwForwardType
);
}
else
{
/* In general we should get MIB_IPPROTO_LOCAL but does not work
* for Vista, 2008 and 7. */
ok
(
U1
(
buf
->
table
[
i
]).
dwForwardProto
==
MIB_IPPROTO_LOCAL
||
broken
(
U1
(
buf
->
table
[
i
]).
dwForwardProto
==
MIB_IPPROTO_NETMGMT
),
"Unexpected dwForwardProto %d
\n
"
,
U1
(
buf
->
table
[
i
]).
dwForwardProto
);
/* The forward type varies depending on the address and gateway
* value so it is not worth testing in this case. */
}
sprintf
(
buffer
,
"dest %s"
,
ntoa
(
buf
->
table
[
i
].
dwForwardDest
));
sprintf
(
buffer
+
strlen
(
buffer
),
" mask %s"
,
ntoa
(
buf
->
table
[
i
].
dwForwardMask
));
trace
(
"%u: %s gw %s if %u type %u
\n
"
,
i
,
buffer
,
ntoa
(
buf
->
table
[
i
].
dwForwardNextHop
),
buf
->
table
[
i
].
dwForwardIfIndex
,
U1
(
buf
->
table
[
i
]).
dwForwardType
);
trace
(
"%u: %s gw %s if %u type %u
proto %u
\n
"
,
i
,
buffer
,
ntoa
(
buf
->
table
[
i
].
dwForwardNextHop
),
buf
->
table
[
i
].
dwForwardIfIndex
,
U1
(
buf
->
table
[
i
]).
dwForwardType
,
U1
(
buf
->
table
[
i
]).
dwForwardProto
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
...
...
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