Commit e6f491aa authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Fixed the dwBCastAddr member of MIB_IPADDRROW, added a test program.

parent 502f6c56
......@@ -1515,6 +1515,7 @@ dlls/icmp/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/iphlpapi/Makefile
dlls/iphlpapi/tests/Makefile
dlls/kernel/Makefile
dlls/kernel/tests/Makefile
dlls/lzexpand/Makefile
......
......@@ -10,6 +10,8 @@ C_SRCS = \
iphlpapi_main.c \
ipstats.c
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:
......@@ -602,7 +602,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
memset(pAdapterInfo, 0, size);
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
"\\Software\\Wine\\Wine\\Config\\Network", 0, KEY_READ,
"Software\\Wine\\Wine\\Config\\Network", 0, KEY_READ,
&hKey) == ERROR_SUCCESS) {
DWORD size = sizeof(primaryWINS.String);
unsigned long addr;
......@@ -1042,7 +1042,7 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL
ret = ERROR_INSUFFICIENT_BUFFER;
}
else {
DWORD ndx;
DWORD ndx, bcast;
pIpAddrTable->dwNumEntries = 0;
for (ndx = 0; ndx < table->numIndexes; ndx++) {
......@@ -1051,8 +1051,13 @@ DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL
getInterfaceIPAddrByIndex(table->indexes[ndx]);
pIpAddrTable->table[ndx].dwMask =
getInterfaceMaskByIndex(table->indexes[ndx]);
/* the dwBCastAddr member isn't the broadcast address, it indicates
* whether the interface uses the 1's broadcast address (1) or the
* 0's broadcast address (0).
*/
bcast = getInterfaceBCastAddrByIndex(table->indexes[ndx]);
pIpAddrTable->table[ndx].dwBCastAddr =
getInterfaceBCastAddrByIndex(table->indexes[ndx]);
(bcast & pIpAddrTable->table[ndx].dwMask) ? 1 : 0;
/* FIXME: hardcoded reasm size, not sure where to get it */
pIpAddrTable->table[ndx].dwReasmSize = 65535;
pIpAddrTable->table[ndx].unused1 = 0;
......
Makefile
iphlpapi.ok
iphlpapi_test.exe.spec.c
testlist.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = iphlpapi.dll
IMPORTS = iphlpapi
CTESTS = \
iphlpapi.c
@MAKE_TEST_RULES@
### Dependencies:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment