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
07316882
Commit
07316882
authored
Sep 20, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Improved GetTcpStatisticsEx stub.
parent
6715b186
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
iphlpapi.spec
dlls/iphlpapi/iphlpapi.spec
+1
-1
ipstats.c
dlls/iphlpapi/ipstats.c
+27
-3
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+7
-3
No files found.
dlls/iphlpapi/iphlpapi.spec
View file @
07316882
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
#@ stub GetSessionCompartmentId
#@ stub GetSessionCompartmentId
@ stdcall GetTcp6Table( ptr ptr long )
@ stdcall GetTcp6Table( ptr ptr long )
@ stdcall GetTcp6Table2( ptr ptr long )
@ stdcall GetTcp6Table2( ptr ptr long )
#@ stub GetTcpStatisticsEx
@ stdcall GetTcpStatisticsEx( ptr long )
@ stdcall GetTcpStatistics( ptr )
@ stdcall GetTcpStatistics( ptr )
@ stub GetTcpStatsFromStack
@ stub GetTcpStatsFromStack
@ stdcall GetTcpTable( ptr ptr long )
@ stdcall GetTcpTable( ptr ptr long )
...
...
dlls/iphlpapi/ipstats.c
View file @
07316882
...
@@ -975,24 +975,32 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats)
...
@@ -975,24 +975,32 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats)
}
}
/******************************************************************
/******************************************************************
* GetTcpStatistics (IPHLPAPI.@)
* GetTcpStatistics
Ex
(IPHLPAPI.@)
*
*
* Get the TCP statistics for the local computer.
* Get the
IPv4 and IPv6
TCP statistics for the local computer.
*
*
* PARAMS
* PARAMS
* stats [Out] buffer for TCP statistics
* stats [Out] buffer for TCP statistics
* family [In] specifies wether IPv4 or IPv6 statistics are returned
*
*
* RETURNS
* RETURNS
* Success: NO_ERROR
* Success: NO_ERROR
* Failure: error code from winerror.h
* Failure: error code from winerror.h
*/
*/
DWORD
WINAPI
GetTcpStatistics
(
PMIB_TCPSTATS
stats
)
DWORD
WINAPI
GetTcpStatistics
Ex
(
PMIB_TCPSTATS
stats
,
DWORD
family
)
{
{
DWORD
ret
=
ERROR_NOT_SUPPORTED
;
DWORD
ret
=
ERROR_NOT_SUPPORTED
;
if
(
!
stats
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
stats
)
return
ERROR_INVALID_PARAMETER
;
if
(
family
!=
WS_AF_INET
&&
family
!=
WS_AF_INET6
)
return
ERROR_INVALID_PARAMETER
;
memset
(
stats
,
0
,
sizeof
(
*
stats
)
);
memset
(
stats
,
0
,
sizeof
(
*
stats
)
);
if
(
family
==
WS_AF_INET6
)
{
FIXME
(
"unimplemented for IPv6
\n
"
);
return
ret
;
}
#ifdef __linux__
#ifdef __linux__
{
{
FILE
*
fp
;
FILE
*
fp
;
...
@@ -1111,6 +1119,22 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
...
@@ -1111,6 +1119,22 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
return
ret
;
return
ret
;
}
}
/******************************************************************
* GetTcpStatistics (IPHLPAPI.@)
*
* Get the TCP statistics for the local computer.
*
* PARAMS
* stats [Out] buffer for TCP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetTcpStatistics
(
PMIB_TCPSTATS
stats
)
{
return
GetTcpStatisticsEx
(
stats
,
WS_AF_INET
);
}
/******************************************************************
/******************************************************************
* GetUdpStatistics (IPHLPAPI.@)
* GetUdpStatistics (IPHLPAPI.@)
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
07316882
...
@@ -659,7 +659,7 @@ static void testGetTcpStatisticsEx(void)
...
@@ -659,7 +659,7 @@ static void testGetTcpStatisticsEx(void)
if
(
!
pGetTcpStatisticsEx
)
if
(
!
pGetTcpStatisticsEx
)
{
{
skip
(
"GetTcpStatisticsEx not available
\n
"
);
win_
skip
(
"GetTcpStatisticsEx not available
\n
"
);
return
;
return
;
}
}
...
@@ -667,6 +667,10 @@ static void testGetTcpStatisticsEx(void)
...
@@ -667,6 +667,10 @@ static void testGetTcpStatisticsEx(void)
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetTcpStatisticsEx(NULL, AF_INET); returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
"GetTcpStatisticsEx(NULL, AF_INET); returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
pGetTcpStatisticsEx
(
&
stats
,
AF_BAN
);
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
||
apiReturn
==
ERROR_NOT_SUPPORTED
,
"GetTcpStatisticsEx(&stats, AF_BAN) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
pGetTcpStatisticsEx
(
&
stats
,
AF_INET
);
apiReturn
=
pGetTcpStatisticsEx
(
&
stats
,
AF_INET
);
ok
(
apiReturn
==
NO_ERROR
,
"GetTcpStatisticsEx returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
ok
(
apiReturn
==
NO_ERROR
,
"GetTcpStatisticsEx returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
if
(
apiReturn
==
NO_ERROR
&&
winetest_debug
>
1
)
if
(
apiReturn
==
NO_ERROR
&&
winetest_debug
>
1
)
...
@@ -690,8 +694,8 @@ static void testGetTcpStatisticsEx(void)
...
@@ -690,8 +694,8 @@ static void testGetTcpStatisticsEx(void)
}
}
apiReturn
=
pGetTcpStatisticsEx
(
&
stats
,
AF_INET6
);
apiReturn
=
pGetTcpStatisticsEx
(
&
stats
,
AF_INET6
);
ok
(
apiReturn
==
NO_ERROR
||
broken
(
apiReturn
==
ERROR_NOT_SUPPORTED
),
todo_wine
ok
(
apiReturn
==
NO_ERROR
||
broken
(
apiReturn
==
ERROR_NOT_SUPPORTED
),
"GetTcpStatisticsEx returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
"GetTcpStatisticsEx returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
if
(
apiReturn
==
NO_ERROR
&&
winetest_debug
>
1
)
if
(
apiReturn
==
NO_ERROR
&&
winetest_debug
>
1
)
{
{
trace
(
"TCP IPv6 Ex stats:
\n
"
);
trace
(
"TCP IPv6 Ex stats:
\n
"
);
...
...
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