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
b35e43d9
Commit
b35e43d9
authored
Mar 03, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Move the ip/icmp/tcp/udp statistics functions to ipstats.c.
parent
566cb8c7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
116 deletions
+56
-116
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+0
-92
ipstats.c
dlls/iphlpapi/ipstats.c
+56
-4
ipstats.h
dlls/iphlpapi/ipstats.h
+0
-20
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
b35e43d9
...
...
@@ -733,29 +733,6 @@ DWORD WINAPI GetFriendlyIfIndex(DWORD IfIndex)
/******************************************************************
* GetIcmpStatistics (IPHLPAPI.@)
*
* Get the ICMP statistics for the local computer.
*
* PARAMS
* pStats [Out] buffer for ICMP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetIcmpStatistics
(
PMIB_ICMP
pStats
)
{
DWORD
ret
;
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getICMPStats
(
pStats
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
/******************************************************************
* GetIfEntry (IPHLPAPI.@)
*
* Get information about an interface.
...
...
@@ -1110,29 +1087,6 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr
/******************************************************************
* GetIpStatistics (IPHLPAPI.@)
*
* Get the IP statistics for the local computer.
*
* PARAMS
* pStats [Out] buffer for IP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetIpStatistics
(
PMIB_IPSTATS
pStats
)
{
DWORD
ret
;
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getIPStats
(
pStats
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
/******************************************************************
* GetNetworkParams (IPHLPAPI.@)
*
* Get the network parameters for the local computer.
...
...
@@ -1303,29 +1257,6 @@ BOOL WINAPI GetRTTAndHopCount(IPAddr DestIpAddress, PULONG HopCount, ULONG MaxHo
/******************************************************************
* GetTcpStatistics (IPHLPAPI.@)
*
* Get the TCP statistics for the local computer.
*
* PARAMS
* pStats [Out] buffer for TCP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetTcpStatistics
(
PMIB_TCPSTATS
pStats
)
{
DWORD
ret
;
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getTCPStats
(
pStats
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
/******************************************************************
* GetTcpTable (IPHLPAPI.@)
*
* Get the table of active TCP connections.
...
...
@@ -1375,29 +1306,6 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
/******************************************************************
* GetUdpStatistics (IPHLPAPI.@)
*
* Get the UDP statistics for the local computer.
*
* PARAMS
* pStats [Out] buffer for UDP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetUdpStatistics
(
PMIB_UDPSTATS
pStats
)
{
DWORD
ret
;
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getUDPStats
(
pStats
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
/******************************************************************
* GetUdpTable (IPHLPAPI.@)
*
* Get a table of active UDP connections.
...
...
dlls/iphlpapi/ipstats.c
View file @
b35e43d9
...
...
@@ -284,7 +284,20 @@ DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry)
#endif
}
DWORD
getICMPStats
(
MIB_ICMP
*
stats
)
/******************************************************************
* GetIcmpStatistics (IPHLPAPI.@)
*
* Get the ICMP statistics for the local computer.
*
* PARAMS
* stats [Out] buffer for ICMP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetIcmpStatistics
(
PMIB_ICMP
stats
)
{
#if defined(HAVE_SYS_SYSCTL_H) && defined(ICMPCTL_STATS)
int
mib
[]
=
{
CTL_NET
,
PF_INET
,
IPPROTO_ICMP
,
ICMPCTL_STATS
};
...
...
@@ -481,7 +494,20 @@ DWORD getICMPStats(MIB_ICMP *stats)
#endif
}
DWORD
getIPStats
(
PMIB_IPSTATS
stats
)
/******************************************************************
* GetIpStatistics (IPHLPAPI.@)
*
* Get the IP statistics for the local computer.
*
* PARAMS
* stats [Out] buffer for IP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetIpStatistics
(
PMIB_IPSTATS
stats
)
{
#if defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS)
int
mib
[]
=
{
CTL_NET
,
PF_INET
,
IPPROTO_IP
,
IPCTL_STATS
};
...
...
@@ -655,7 +681,20 @@ DWORD getIPStats(PMIB_IPSTATS stats)
#endif
}
DWORD
getTCPStats
(
MIB_TCPSTATS
*
stats
)
/******************************************************************
* 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
)
{
#if defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS)
#ifndef TCPTV_MIN
/* got removed in Mac OS X for some reason */
...
...
@@ -797,7 +836,20 @@ DWORD getTCPStats(MIB_TCPSTATS *stats)
#endif
}
DWORD
getUDPStats
(
MIB_UDPSTATS
*
stats
)
/******************************************************************
* GetUdpStatistics (IPHLPAPI.@)
*
* Get the UDP statistics for the local computer.
*
* PARAMS
* stats [Out] buffer for UDP statistics
*
* RETURNS
* Success: NO_ERROR
* Failure: error code from winerror.h
*/
DWORD
WINAPI
GetUdpStatistics
(
PMIB_UDPSTATS
stats
)
{
#if defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS)
int
mib
[]
=
{
CTL_NET
,
PF_INET
,
IPPROTO_UDP
,
UDPCTL_STATS
};
...
...
dlls/iphlpapi/ipstats.h
View file @
b35e43d9
...
...
@@ -32,26 +32,6 @@
*/
DWORD
getInterfaceStatsByName
(
const
char
*
name
,
PMIB_IFROW
entry
);
/* Gets ICMP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
* NULL, NO_ERROR otherwise.
*/
DWORD
getICMPStats
(
MIB_ICMP
*
stats
);
/* Gets IP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
* NULL, NO_ERROR otherwise.
*/
DWORD
getIPStats
(
PMIB_IPSTATS
stats
);
/* Gets TCP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
* NULL, NO_ERROR otherwise.
*/
DWORD
getTCPStats
(
MIB_TCPSTATS
*
stats
);
/* Gets UDP statistics into stats. Returns ERROR_INVALID_PARAMETER if stats is
* NULL, NO_ERROR otherwise.
*/
DWORD
getUDPStats
(
MIB_UDPSTATS
*
stats
);
DWORD
WINAPI
AllocateAndGetUdpTableFromStack
(
PMIB_UDPTABLE
*
ppUdpTable
,
BOOL
bOrder
,
HANDLE
heap
,
DWORD
flags
);
DWORD
WINAPI
AllocateAndGetTcpTableFromStack
(
PMIB_TCPTABLE
*
ppTcpTable
,
BOOL
bOrder
,
HANDLE
heap
,
DWORD
flags
);
DWORD
WINAPI
AllocateAndGetIpNetTableFromStack
(
PMIB_IPNETTABLE
*
ppIpNetTable
,
BOOL
bOrder
,
HANDLE
heap
,
DWORD
flags
);
...
...
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