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
f5095df9
Commit
f5095df9
authored
Oct 07, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Win64 printf format warning fixes.
parent
2abe8348
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
85 deletions
+83
-85
Makefile.in
dlls/iphlpapi/Makefile.in
+0
-1
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+43
-43
Makefile.in
dlls/iphlpapi/tests/Makefile.in
+0
-1
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+40
-40
No files found.
dlls/iphlpapi/Makefile.in
View file @
f5095df9
...
...
@@ -6,7 +6,6 @@ MODULE = iphlpapi.dll
IMPORTLIB
=
libiphlpapi.
$(IMPLIBEXT)
IMPORTS
=
advapi32 kernel32
EXTRALIBS
=
@RESOLVLIBS@
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
C_SRCS
=
\
ifenum.c
\
...
...
dlls/iphlpapi/iphlpapi_main.c
View file @
f5095df9
...
...
@@ -111,7 +111,7 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable,
{
DWORD
ret
;
TRACE
(
"ppIfTable %p, bOrder %d, heap %p, flags 0x%08
l
x
\n
"
,
ppIfTable
,
TRACE
(
"ppIfTable %p, bOrder %d, heap %p, flags 0x%08x
\n
"
,
ppIfTable
,
bOrder
,
heap
,
flags
);
if
(
!
ppIfTable
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -124,7 +124,7 @@ DWORD WINAPI AllocateAndGetIfTableFromStack(PMIB_IFTABLE *ppIfTable,
ret
=
GetIfTable
(
*
ppIfTable
,
&
dwSize
,
bOrder
);
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -163,13 +163,13 @@ DWORD WINAPI AllocateAndGetIpAddrTableFromStack(PMIB_IPADDRTABLE *ppIpAddrTable,
{
DWORD
ret
;
TRACE
(
"ppIpAddrTable %p, bOrder %d, heap %p, flags 0x%08
l
x
\n
"
,
TRACE
(
"ppIpAddrTable %p, bOrder %d, heap %p, flags 0x%08x
\n
"
,
ppIpAddrTable
,
bOrder
,
heap
,
flags
);
ret
=
getIPAddrTable
(
ppIpAddrTable
,
heap
,
flags
);
if
(
!
ret
&&
bOrder
)
qsort
((
*
ppIpAddrTable
)
->
table
,
(
*
ppIpAddrTable
)
->
dwNumEntries
,
sizeof
(
MIB_IPADDRROW
),
IpAddrTableSorter
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -220,13 +220,13 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *
{
DWORD
ret
;
TRACE
(
"ppIpForwardTable %p, bOrder %d, heap %p, flags 0x%08
l
x
\n
"
,
TRACE
(
"ppIpForwardTable %p, bOrder %d, heap %p, flags 0x%08x
\n
"
,
ppIpForwardTable
,
bOrder
,
heap
,
flags
);
ret
=
getRouteTable
(
ppIpForwardTable
,
heap
,
flags
);
if
(
!
ret
&&
bOrder
)
qsort
((
*
ppIpForwardTable
)
->
table
,
(
*
ppIpForwardTable
)
->
dwNumEntries
,
sizeof
(
MIB_IPFORWARDROW
),
IpForwardTableSorter
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -265,13 +265,13 @@ DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable,
{
DWORD
ret
;
TRACE
(
"ppIpNetTable %p, bOrder %d, heap %p, flags 0x%08
l
x
\n
"
,
TRACE
(
"ppIpNetTable %p, bOrder %d, heap %p, flags 0x%08x
\n
"
,
ppIpNetTable
,
bOrder
,
heap
,
flags
);
ret
=
getArpTable
(
ppIpNetTable
,
heap
,
flags
);
if
(
!
ret
&&
bOrder
)
qsort
((
*
ppIpNetTable
)
->
table
,
(
*
ppIpNetTable
)
->
dwNumEntries
,
sizeof
(
MIB_IPADDRROW
),
IpNetTableSorter
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -322,13 +322,13 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable,
{
DWORD
ret
;
TRACE
(
"ppTcpTable %p, bOrder %d, heap %p, flags 0x%08
l
x
\n
"
,
TRACE
(
"ppTcpTable %p, bOrder %d, heap %p, flags 0x%08x
\n
"
,
ppTcpTable
,
bOrder
,
heap
,
flags
);
ret
=
getTcpTable
(
ppTcpTable
,
heap
,
flags
);
if
(
!
ret
&&
bOrder
)
qsort
((
*
ppTcpTable
)
->
table
,
(
*
ppTcpTable
)
->
dwNumEntries
,
sizeof
(
MIB_TCPROW
),
TcpTableSorter
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -373,13 +373,13 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable,
{
DWORD
ret
;
TRACE
(
"ppUdpTable %p, bOrder %d, heap %p, flags 0x%08
l
x
\n
"
,
TRACE
(
"ppUdpTable %p, bOrder %d, heap %p, flags 0x%08x
\n
"
,
ppUdpTable
,
bOrder
,
heap
,
flags
);
ret
=
getUdpTable
(
ppUdpTable
,
heap
,
flags
);
if
(
!
ret
&&
bOrder
)
qsort
((
*
ppUdpTable
)
->
table
,
(
*
ppUdpTable
)
->
dwNumEntries
,
sizeof
(
MIB_UDPROW
),
UdpTableSorter
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -449,7 +449,7 @@ DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW pArpEntry)
*/
DWORD
WINAPI
CreateProxyArpEntry
(
DWORD
dwAddress
,
DWORD
dwMask
,
DWORD
dwIfIndex
)
{
FIXME
(
"(dwAddress 0x%08
lx, dwMask 0x%08lx, dwIfIndex 0x%08l
x): stub
\n
"
,
FIXME
(
"(dwAddress 0x%08
x, dwMask 0x%08x, dwIfIndex 0x%08
x): stub
\n
"
,
dwAddress
,
dwMask
,
dwIfIndex
);
return
ERROR_NOT_SUPPORTED
;
}
...
...
@@ -472,7 +472,7 @@ DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex)
*/
DWORD
WINAPI
DeleteIPAddress
(
ULONG
NTEContext
)
{
FIXME
(
"(NTEContext %
l
d): stub
\n
"
,
NTEContext
);
FIXME
(
"(NTEContext %d): stub
\n
"
,
NTEContext
);
return
ERROR_NOT_SUPPORTED
;
}
...
...
@@ -542,7 +542,7 @@ DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW pArpEntry)
*/
DWORD
WINAPI
DeleteProxyArpEntry
(
DWORD
dwAddress
,
DWORD
dwMask
,
DWORD
dwIfIndex
)
{
FIXME
(
"(dwAddress 0x%08
lx, dwMask 0x%08lx, dwIfIndex 0x%08l
x): stub
\n
"
,
FIXME
(
"(dwAddress 0x%08
x, dwMask 0x%08x, dwIfIndex 0x%08
x): stub
\n
"
,
dwAddress
,
dwMask
,
dwIfIndex
);
return
ERROR_NOT_SUPPORTED
;
}
...
...
@@ -591,7 +591,7 @@ DWORD WINAPI EnableRouter(HANDLE * pHandle, OVERLAPPED * pOverlapped)
*/
DWORD
WINAPI
FlushIpNetTable
(
DWORD
dwIfIndex
)
{
FIXME
(
"(dwIfIndex 0x%08
l
x): stub
\n
"
,
dwIfIndex
);
FIXME
(
"(dwIfIndex 0x%08x): stub
\n
"
,
dwIfIndex
);
/* this flushes the arp cache of the given index */
return
ERROR_NOT_SUPPORTED
;
}
...
...
@@ -761,7 +761,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
else
ret
=
ERROR_NO_DATA
;
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -793,7 +793,7 @@ DWORD WINAPI GetBestInterface(IPAddr dwDestAddr, PDWORD pdwBestIfIndex)
if
(
ret
==
ERROR_SUCCESS
)
*
pdwBestIfIndex
=
ipRow
.
dwForwardIfIndex
;
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -817,7 +817,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
PMIB_IPFORWARDTABLE
table
;
DWORD
ret
;
TRACE
(
"dwDestAddr 0x%08
lx, dwSourceAddr 0x%08l
x, pBestRoute %p
\n
"
,
dwDestAddr
,
TRACE
(
"dwDestAddr 0x%08
x, dwSourceAddr 0x%08
x, pBestRoute %p
\n
"
,
dwDestAddr
,
dwSourceAddr
,
pBestRoute
);
if
(
!
pBestRoute
)
return
ERROR_INVALID_PARAMETER
;
...
...
@@ -853,7 +853,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
}
else
ret
=
ERROR_OUTOFMEMORY
;
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -876,7 +876,7 @@ DWORD WINAPI GetFriendlyIfIndex(DWORD IfIndex)
/* windows doesn't validate these, either, just makes sure the top byte is
cleared. I assume my ifenum module never gives an index with the top
byte set. */
TRACE
(
"returning %
l
d
\n
"
,
IfIndex
);
TRACE
(
"returning %d
\n
"
,
IfIndex
);
return
IfIndex
;
}
...
...
@@ -899,7 +899,7 @@ DWORD WINAPI GetIcmpStatistics(PMIB_ICMP pStats)
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getICMPStats
(
pStats
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -935,7 +935,7 @@ DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow)
}
else
ret
=
ERROR_INVALID_DATA
;
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -976,7 +976,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder)
{
DWORD
ret
;
TRACE
(
"pIfTable %p, pdwSize %p, bOrder %
l
d
\n
"
,
pdwSize
,
pdwSize
,
TRACE
(
"pIfTable %p, pdwSize %p, bOrder %d
\n
"
,
pdwSize
,
pdwSize
,
(
DWORD
)
bOrder
);
if
(
!
pdwSize
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -1019,7 +1019,7 @@ DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder)
ret
=
ERROR_OUTOFMEMORY
;
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1094,7 +1094,7 @@ DWORD WINAPI GetInterfaceInfo(PIP_INTERFACE_INFO pIfTable, PULONG dwOutBufLen)
ret
=
ERROR_OUTOFMEMORY
;
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1124,7 +1124,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL
{
DWORD
ret
;
TRACE
(
"pIpAddrTable %p, pdwSize %p, bOrder %
l
d
\n
"
,
pIpAddrTable
,
pdwSize
,
TRACE
(
"pIpAddrTable %p, pdwSize %p, bOrder %d
\n
"
,
pIpAddrTable
,
pdwSize
,
(
DWORD
)
bOrder
);
if
(
!
pdwSize
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -1153,7 +1153,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1183,7 +1183,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi
{
DWORD
ret
;
TRACE
(
"pIpForwardTable %p, pdwSize %p, bOrder %
l
d
\n
"
,
pIpForwardTable
,
TRACE
(
"pIpForwardTable %p, pdwSize %p, bOrder %d
\n
"
,
pIpForwardTable
,
pdwSize
,
(
DWORD
)
bOrder
);
if
(
!
pdwSize
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -1219,7 +1219,7 @@ DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable, PULONG pdwSi
}
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1248,7 +1248,7 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr
{
DWORD
ret
;
TRACE
(
"pIpNetTable %p, pdwSize %p, bOrder %
l
d
\n
"
,
pIpNetTable
,
pdwSize
,
TRACE
(
"pIpNetTable %p, pdwSize %p, bOrder %d
\n
"
,
pIpNetTable
,
pdwSize
,
(
DWORD
)
bOrder
);
if
(
!
pdwSize
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -1284,7 +1284,7 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOr
}
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1307,7 +1307,7 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS pStats)
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getIPStats
(
pStats
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1387,7 +1387,7 @@ DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen)
/* FIXME: can check whether routing's enabled in /proc/sys/net/ipv4/ip_forward
I suppose could also check for a listener on port 53 to set EnableDns */
ret
=
NO_ERROR
;
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1414,7 +1414,7 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf)
*
pdwNumIf
=
getNumInterfaces
();
ret
=
NO_ERROR
;
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1438,7 +1438,7 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf)
*/
DWORD
WINAPI
GetPerAdapterInfo
(
ULONG
IfIndex
,
PIP_PER_ADAPTER_INFO
pPerAdapterInfo
,
PULONG
pOutBufLen
)
{
TRACE
(
"(IfIndex %
l
d, pPerAdapterInfo %p, pOutBufLen %p)
\n
"
,
IfIndex
,
TRACE
(
"(IfIndex %d, pPerAdapterInfo %p, pOutBufLen %p)
\n
"
,
IfIndex
,
pPerAdapterInfo
,
pOutBufLen
);
return
ERROR_NOT_SUPPORTED
;
}
...
...
@@ -1465,7 +1465,7 @@ DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterIn
*/
BOOL
WINAPI
GetRTTAndHopCount
(
IPAddr
DestIpAddress
,
PULONG
HopCount
,
ULONG
MaxHops
,
PULONG
RTT
)
{
FIXME
(
"(DestIpAddress 0x%08lx, HopCount %p, MaxHops %
l
d, RTT %p): stub
\n
"
,
FIXME
(
"(DestIpAddress 0x%08lx, HopCount %p, MaxHops %d, RTT %p): stub
\n
"
,
DestIpAddress
,
HopCount
,
MaxHops
,
RTT
);
return
FALSE
;
}
...
...
@@ -1489,7 +1489,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS pStats)
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getTCPStats
(
pStats
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1520,7 +1520,7 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
{
DWORD
ret
;
TRACE
(
"pTcpTable %p, pdwSize %p, bOrder %
l
d
\n
"
,
pTcpTable
,
pdwSize
,
TRACE
(
"pTcpTable %p, pdwSize %p, bOrder %d
\n
"
,
pTcpTable
,
pdwSize
,
(
DWORD
)
bOrder
);
if
(
!
pdwSize
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -1557,7 +1557,7 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
ret
=
ERROR_OUTOFMEMORY
;
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1580,7 +1580,7 @@ DWORD WINAPI GetUdpStatistics(PMIB_UDPSTATS pStats)
TRACE
(
"pStats %p
\n
"
,
pStats
);
ret
=
getUDPStats
(
pStats
);
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -1610,7 +1610,7 @@ DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder)
{
DWORD
ret
;
TRACE
(
"pUdpTable %p, pdwSize %p, bOrder %
l
d
\n
"
,
pUdpTable
,
pdwSize
,
TRACE
(
"pUdpTable %p, pdwSize %p, bOrder %d
\n
"
,
pUdpTable
,
pdwSize
,
(
DWORD
)
bOrder
);
if
(
!
pdwSize
)
ret
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -1647,7 +1647,7 @@ DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder)
ret
=
ERROR_OUTOFMEMORY
;
}
}
TRACE
(
"returning %
l
d
\n
"
,
ret
);
TRACE
(
"returning %d
\n
"
,
ret
);
return
ret
;
}
...
...
dlls/iphlpapi/tests/Makefile.in
View file @
f5095df9
...
...
@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
iphlpapi.dll
IMPORTS
=
iphlpapi kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
CTESTS
=
\
iphlpapi.c
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
f5095df9
...
...
@@ -158,11 +158,11 @@ static void testGetNumberOfInterfaces(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetNumberOfInterfaces(NULL) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetNumberOfInterfaces(NULL) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetNumberOfInterfaces
(
&
numInterfaces
);
ok
(
apiReturn
==
NO_ERROR
,
"GetNumberOfInterfaces returned %
l
d, expected 0
\n
"
,
apiReturn
);
"GetNumberOfInterfaces returned %d, expected 0
\n
"
,
apiReturn
);
}
}
...
...
@@ -177,17 +177,17 @@ static void testGetIfEntry(DWORD index)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIfEntry(NULL) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIfEntry(NULL) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
row
.
dwIndex
=
-
1
;
/* hope that's always bogus! */
apiReturn
=
gGetIfEntry
(
&
row
);
ok
(
apiReturn
==
ERROR_INVALID_DATA
,
"GetIfEntry(bogus row) returned %
l
d, expected ERROR_INVALID_DATA
\n
"
,
"GetIfEntry(bogus row) returned %d, expected ERROR_INVALID_DATA
\n
"
,
apiReturn
);
row
.
dwIndex
=
index
;
apiReturn
=
gGetIfEntry
(
&
row
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIfEntry returned %
l
d, expected NO_ERROR
\n
"
,
apiReturn
);
"GetIfEntry returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
}
}
...
...
@@ -201,18 +201,18 @@ static void testGetIpAddrTable(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIpAddrTable(NULL, NULL, FALSE) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIpAddrTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetIpAddrTable
(
NULL
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetIpAddrTable(NULL, &dwSize, FALSE) returned %
l
d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetIpAddrTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
)
{
PMIB_IPADDRTABLE
buf
=
(
PMIB_IPADDRTABLE
)
malloc
(
dwSize
);
apiReturn
=
gGetIpAddrTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIpAddrTable(buf, &dwSize, FALSE) returned %
l
d, expected NO_ERROR
\n
"
,
"GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
if
(
apiReturn
==
NO_ERROR
&&
buf
->
dwNumEntries
)
testGetIfEntry
(
buf
->
table
[
0
].
dwIndex
);
...
...
@@ -231,18 +231,18 @@ static void testGetIfTable(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIfTable(NULL, NULL, FALSE) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIfTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetIfTable
(
NULL
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetIfTable(NULL, &dwSize, FALSE) returned %
l
d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetIfTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
)
{
PMIB_IFTABLE
buf
=
(
PMIB_IFTABLE
)
malloc
(
dwSize
);
apiReturn
=
gGetIfTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIfTable(buf, &dwSize, FALSE) returned %
l
d, expected NO_ERROR
\n\n
"
,
"GetIfTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -259,18 +259,18 @@ static void testGetIpForwardTable(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIpForwardTable(NULL, NULL, FALSE) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIpForwardTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetIpForwardTable
(
NULL
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetIpForwardTable(NULL, &dwSize, FALSE) returned %
l
d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetIpForwardTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
)
{
PMIB_IPFORWARDTABLE
buf
=
(
PMIB_IPFORWARDTABLE
)
malloc
(
dwSize
);
apiReturn
=
gGetIpForwardTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIpForwardTable(buf, &dwSize, FALSE) returned %
l
d, expected NO_ERROR
\n
"
,
"GetIpForwardTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -287,11 +287,11 @@ static void testGetIpNetTable(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIpNetTable(NULL, NULL, FALSE) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIpNetTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetIpNetTable
(
NULL
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
ERROR_NO_DATA
||
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetIpNetTable(NULL, &dwSize, FALSE) returned %
l
d, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetIpNetTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_NO_DATA
)
;
/* empty ARP table's okay */
...
...
@@ -300,7 +300,7 @@ static void testGetIpNetTable(void)
apiReturn
=
gGetIpNetTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIpNetTable(buf, &dwSize, FALSE) returned %
l
d, expected NO_ERROR
\n
"
,
"GetIpNetTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -317,11 +317,11 @@ static void testGetIcmpStatistics(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIcmpStatistics(NULL) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIcmpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetIcmpStatistics
(
&
stats
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIcmpStatistics returned %
l
d, expected NO_ERROR
\n
"
,
apiReturn
);
"GetIcmpStatistics returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
}
}
...
...
@@ -335,11 +335,11 @@ static void testGetIpStatistics(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetIpStatistics(NULL) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetIpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetIpStatistics
(
&
stats
);
ok
(
apiReturn
==
NO_ERROR
,
"GetIpStatistics returned %
l
d, expected NO_ERROR
\n
"
,
apiReturn
);
"GetIpStatistics returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
}
}
...
...
@@ -353,11 +353,11 @@ static void testGetTcpStatistics(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetTcpStatistics(NULL) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetTcpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetTcpStatistics
(
&
stats
);
ok
(
apiReturn
==
NO_ERROR
,
"GetTcpStatistics returned %
l
d, expected NO_ERROR
\n
"
,
apiReturn
);
"GetTcpStatistics returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
}
}
...
...
@@ -371,11 +371,11 @@ static void testGetUdpStatistics(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetUdpStatistics(NULL) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetUdpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetUdpStatistics
(
&
stats
);
ok
(
apiReturn
==
NO_ERROR
,
"GetUdpStatistics returned %
l
d, expected NO_ERROR
\n
"
,
apiReturn
);
"GetUdpStatistics returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
}
}
...
...
@@ -389,18 +389,18 @@ static void testGetTcpTable(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetTcpTable(NULL, NULL, FALSE) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetTcpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetTcpTable
(
NULL
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetTcpTable(NULL, &dwSize, FALSE) returned %
l
d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetTcpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
)
{
PMIB_TCPTABLE
buf
=
(
PMIB_TCPTABLE
)
malloc
(
dwSize
);
apiReturn
=
gGetTcpTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
,
"GetTcpTable(buf, &dwSize, FALSE) returned %
l
d, expected NO_ERROR
\n
"
,
"GetTcpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -417,18 +417,18 @@ static void testGetUdpTable(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetUdpTable(NULL, NULL, FALSE) returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetUdpTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetUdpTable
(
NULL
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetUdpTable(NULL, &dwSize, FALSE) returned %
l
d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetUdpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
!=
ERROR_INSUFFICIENT_BUFFER
)
{
PMIB_UDPTABLE
buf
=
(
PMIB_UDPTABLE
)
malloc
(
dwSize
);
apiReturn
=
gGetUdpTable
(
buf
,
&
dwSize
,
FALSE
);
ok
(
apiReturn
==
NO_ERROR
,
"GetUdpTable(buf, &dwSize, FALSE) returned %
l
d, expected NO_ERROR
\n
"
,
"GetUdpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -475,18 +475,18 @@ static void testGetInterfaceInfo(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetInterfaceInfo returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetInterfaceInfo returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetInterfaceInfo
(
NULL
,
&
len
);
ok
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
,
"GetInterfaceInfo returned %
l
d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
"GetInterfaceInfo returned %d, expected ERROR_INSUFFICIENT_BUFFER
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_INSUFFICIENT_BUFFER
)
{
PIP_INTERFACE_INFO
buf
=
(
PIP_INTERFACE_INFO
)
malloc
(
len
);
apiReturn
=
gGetInterfaceInfo
(
buf
,
&
len
);
ok
(
apiReturn
==
NO_ERROR
,
"GetInterfaceInfo(buf, &dwSize) returned %
l
d, expected NO_ERROR
\n
"
,
"GetInterfaceInfo(buf, &dwSize) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -503,11 +503,11 @@ static void testGetAdaptersInfo(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetAdaptersInfo returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetAdaptersInfo returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetAdaptersInfo
(
NULL
,
&
len
);
ok
(
apiReturn
==
ERROR_NO_DATA
||
apiReturn
==
ERROR_BUFFER_OVERFLOW
,
"GetAdaptersInfo returned %
l
d, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW
\n
"
,
"GetAdaptersInfo returned %d, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_NO_DATA
)
;
/* no adapter's, that's okay */
...
...
@@ -516,7 +516,7 @@ static void testGetAdaptersInfo(void)
apiReturn
=
gGetAdaptersInfo
(
buf
,
&
len
);
ok
(
apiReturn
==
NO_ERROR
,
"GetAdaptersInfo(buf, &dwSize) returned %
l
d, expected NO_ERROR
\n
"
,
"GetAdaptersInfo(buf, &dwSize) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
buf
);
}
...
...
@@ -533,18 +533,18 @@ static void testGetNetworkParams(void)
if
(
apiReturn
==
ERROR_NOT_SUPPORTED
)
return
;
ok
(
apiReturn
==
ERROR_INVALID_PARAMETER
,
"GetNetworkParams returned %
l
d, expected ERROR_INVALID_PARAMETER
\n
"
,
"GetNetworkParams returned %d, expected ERROR_INVALID_PARAMETER
\n
"
,
apiReturn
);
apiReturn
=
gGetNetworkParams
(
NULL
,
&
len
);
ok
(
apiReturn
==
ERROR_BUFFER_OVERFLOW
,
"GetNetworkParams returned %
l
d, expected ERROR_BUFFER_OVERFLOW
\n
"
,
"GetNetworkParams returned %d, expected ERROR_BUFFER_OVERFLOW
\n
"
,
apiReturn
);
if
(
apiReturn
==
ERROR_BUFFER_OVERFLOW
)
{
PFIXED_INFO
buf
=
(
PFIXED_INFO
)
malloc
(
len
);
apiReturn
=
gGetNetworkParams
(
buf
,
&
len
);
ok
(
apiReturn
==
NO_ERROR
,
"GetNetworkParams(buf, &dwSize) returned %
l
d, expected NO_ERROR
\n
"
,
"GetNetworkParams(buf, &dwSize) returned %d, expected NO_ERROR
\n
"
,
apiReturn
);
free
(
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