59static DWORD (
WINAPI *pGetIfTable2)(PMIB_IF_TABLE2*);
161 static char string[17];
162 if (
sizeof(
ll) >
sizeof(
unsigned long) &&
ll >> 32)
163 sprintf(
string,
"%lx%08lx", (
unsigned long)(
ll >> 32), (
unsigned long)
ll);
165 sprintf(
string,
"%lx", (
unsigned long)
ll);
179 if (pGetNumberOfInterfaces) {
180 DWORD apiReturn, numInterfaces;
184 apiReturn = pGetNumberOfInterfaces(
NULL);
188 "GetNumberOfInterfaces(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
192 apiReturn = pGetNumberOfInterfaces(&numInterfaces);
194 skip(
"GetNumberOfInterfaces is not supported\n");
198 "GetNumberOfInterfaces returned %d, expected 0\n", apiReturn);
209 apiReturn = pGetIfEntry(
NULL);
211 skip(
"GetIfEntry is not supported\n");
215 "GetIfEntry(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
218 apiReturn = pGetIfEntry(&
row);
221 "GetIfEntry(bogus row) returned %d, expected ERROR_INVALID_DATA or ERROR_FILE_NOT_FOUND\n",
224 apiReturn = pGetIfEntry(&
row);
226 "GetIfEntry returned %d, expected NO_ERROR\n", apiReturn);
232 if (pGetIpAddrTable) {
238 skip(
"GetIpAddrTable is not supported\n");
242 "GetIpAddrTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
246 "GetIpAddrTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
253 "GetIpAddrTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
259 for (
i = 0;
i <
buf->dwNumEntries;
i++)
261 ok (
buf->table[
i].wType != 0,
"Test[%d]: expected wType > 0\n",
i);
262 trace(
"Entry[%d]: addr %s, dwIndex %u, wType 0x%x\n",
i,
279 skip(
"GetIfTable is not supported\n");
283 "GetIfTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
287 "GetIfTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
294 "GetIfTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n\n",
302 trace(
"interface table: %u entries\n",
buf->dwNumEntries );
303 for (
i = 0;
i <
buf->dwNumEntries;
i++)
307 trace(
"%u: '%s' type %u mtu %u speed %u phys",
309 for (
j = 0;
j <
row->dwPhysAddrLen;
j++)
312 trace(
" in: bytes %u upkts %u nupkts %u disc %u err %u unk %u\n",
313 row->dwInOctets,
row->dwInUcastPkts,
row->dwInNUcastPkts,
314 row->dwInDiscards,
row->dwInErrors,
row->dwInUnknownProtos );
315 trace(
" out: bytes %u upkts %u nupkts %u disc %u err %u\n",
316 row->dwOutOctets,
row->dwOutUcastPkts,
row->dwOutNUcastPkts,
317 row->dwOutDiscards,
row->dwOutErrors );
327 if (pGetIpForwardTable) {
333 skip(
"GetIpForwardTable is not supported\n");
337 "GetIpForwardTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
341 "GetIpForwardTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
348 "GetIpForwardTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
355 trace(
"IP forward table: %u entries\n",
buf->dwNumEntries );
356 for (
i = 0;
i <
buf->dwNumEntries;
i++)
362 ntoa(
buf->table[
i].dwForwardNextHop ),
363 buf->table[
i].dwForwardIfIndex,
U1(
buf->table[
i]).dwForwardType );
373 if (pGetIpNetTable) {
379 skip(
"GetIpNetTable is not supported\n");
383 "GetIpNetTable(NULL, NULL, FALSE) returned %d, expected ERROR_INVALID_PARAMETER\n",
387 "GetIpNetTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_NO_DATA or ERROR_INSUFFICIENT_BUFFER\n",
397 "GetIpNetTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
404 trace(
"IP net table: %u entries\n",
buf->dwNumEntries );
405 for (
i = 0;
i <
buf->dwNumEntries;
i++)
407 trace(
"%u: idx %u type %u addr %s phys",
409 for (
j = 0;
j <
buf->table[
i].dwPhysAddrLen;
j++)
421 if (pGetIcmpStatistics) {
427 apiReturn = pGetIcmpStatistics(
NULL);
431 "GetIcmpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
435 apiReturn = pGetIcmpStatistics(&stats);
438 skip(
"GetIcmpStatistics is not supported\n");
442 "GetIcmpStatistics returned %d, expected NO_ERROR\n", apiReturn);
445 trace(
"ICMP stats: %8s %8s\n",
"in",
"out" );
465 if (pGetIpStatistics) {
469 apiReturn = pGetIpStatistics(
NULL);
471 skip(
"GetIpStatistics is not supported\n");
475 "GetIpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
477 apiReturn = pGetIpStatistics(&stats);
479 "GetIpStatistics returned %d, expected NO_ERROR\n", apiReturn);
482 trace(
"IP stats:\n" );
483 trace(
" dwForwarding: %u\n",
U(stats).dwForwarding );
512 if (pGetTcpStatistics) {
516 apiReturn = pGetTcpStatistics(
NULL);
518 skip(
"GetTcpStatistics is not supported\n");
522 "GetTcpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
524 apiReturn = pGetTcpStatistics(&stats);
526 "GetTcpStatistics returned %d, expected NO_ERROR\n", apiReturn);
529 trace(
"TCP stats:\n" );
530 trace(
" dwRtoAlgorithm: %u\n",
U(stats).dwRtoAlgorithm );
551 if (pGetUdpStatistics) {
555 apiReturn = pGetUdpStatistics(
NULL);
557 skip(
"GetUdpStatistics is not supported\n");
561 "GetUdpStatistics(NULL) returned %d, expected ERROR_INVALID_PARAMETER\n",
563 apiReturn = pGetUdpStatistics(&stats);
565 "GetUdpStatistics returned %d, expected NO_ERROR\n", apiReturn);
568 trace(
"UDP stats:\n" );
583 if (!pGetIcmpStatisticsEx)
585 win_skip(
"GetIcmpStatisticsEx not available\n" );
593 "GetIcmpStatisticsEx(NULL, AF_INET) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
596 apiReturn = pGetIcmpStatisticsEx(&stats,
AF_BAN);
598 "GetIcmpStatisticsEx(&stats, AF_BAN) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
600 apiReturn = pGetIcmpStatisticsEx(&stats,
AF_INET);
601 ok(apiReturn ==
NO_ERROR,
"GetIcmpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
605 trace(
"ICMP IPv4 Ex stats: %8s %8s\n",
"in",
"out" );
608 for (
i = 0;
i < 256;
i++)
612 apiReturn = pGetIcmpStatisticsEx(&stats,
AF_INET6);
614 "GetIcmpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
618 trace(
"ICMP IPv6 Ex stats: %8s %8s\n",
"in",
"out" );
621 for (
i = 0;
i < 256;
i++)
631 if (!pGetIpStatisticsEx)
633 win_skip(
"GetIpStatisticsEx not available\n" );
639 "GetIpStatisticsEx(NULL, AF_INET) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
641 apiReturn = pGetIpStatisticsEx(&stats,
AF_BAN);
643 "GetIpStatisticsEx(&stats, AF_BAN) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
645 apiReturn = pGetIpStatisticsEx(&stats,
AF_INET);
646 ok(apiReturn ==
NO_ERROR,
"GetIpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
649 trace(
"IP IPv4 Ex stats:\n" );
650 trace(
" dwForwarding: %u\n",
U(stats).dwForwarding );
675 apiReturn = pGetIpStatisticsEx(&stats,
AF_INET6);
677 "GetIpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
680 trace(
"IP IPv6 Ex stats:\n" );
681 trace(
" dwForwarding: %u\n",
U(stats).dwForwarding );
712 if (!pGetTcpStatisticsEx)
714 win_skip(
"GetTcpStatisticsEx not available\n" );
720 "GetTcpStatisticsEx(NULL, AF_INET); returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
722 apiReturn = pGetTcpStatisticsEx(&stats,
AF_BAN);
724 "GetTcpStatisticsEx(&stats, AF_BAN) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
726 apiReturn = pGetTcpStatisticsEx(&stats,
AF_INET);
727 ok(apiReturn ==
NO_ERROR,
"GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
730 trace(
"TCP IPv4 Ex stats:\n" );
731 trace(
" dwRtoAlgorithm: %u\n",
U(stats).dwRtoAlgorithm );
748 apiReturn = pGetTcpStatisticsEx(&stats,
AF_INET6);
750 "GetTcpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
753 trace(
"TCP IPv6 Ex stats:\n" );
754 trace(
" dwRtoAlgorithm: %u\n",
U(stats).dwRtoAlgorithm );
777 if (!pGetUdpStatisticsEx)
779 win_skip(
"GetUdpStatisticsEx not available\n" );
785 "GetUdpStatisticsEx(NULL, AF_INET); returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
787 apiReturn = pGetUdpStatisticsEx(&stats,
AF_BAN);
789 "GetUdpStatisticsEx(&stats, AF_BAN) returned %d, expected ERROR_INVALID_PARAMETER\n", apiReturn);
791 apiReturn = pGetUdpStatisticsEx(&stats,
AF_INET);
792 ok(apiReturn ==
NO_ERROR,
"GetUdpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
795 trace(
"UDP IPv4 Ex stats:\n" );
803 apiReturn = pGetUdpStatisticsEx(&stats,
AF_INET6);
805 "GetUdpStatisticsEx returned %d, expected NO_ERROR\n", apiReturn);
808 trace(
"UDP IPv6 Ex stats:\n" );
825 skip(
"GetTcpTable is not supported\n");
830 "GetTcpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
837 "GetTcpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
843 trace(
"TCP table: %u entries\n",
buf->dwNumEntries );
844 for (
i = 0;
i <
buf->dwNumEntries;
i++)
849 trace(
"%u: %s remote %s:%u state %u\n",
867 skip(
"GetUdpTable is not supported\n");
871 "GetUdpTable(NULL, &dwSize, FALSE) returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
878 "GetUdpTable(buf, &dwSize, FALSE) returned %d, expected NO_ERROR\n",
884 trace(
"UDP table: %u entries\n",
buf->dwNumEntries );
885 for (
i = 0;
i <
buf->dwNumEntries;
i++)
886 trace(
"%u: %s:%u\n",
909 win_skip(
"SetTcpEntry failed with access error. Skipping test.\n");
923 char senddata[32], replydata[
sizeof(senddata) +
sizeof(
ICMP_ECHO_REPLY)];
927 if (!pIcmpSendEcho || !pIcmpCreateFile)
929 win_skip(
"IcmpSendEcho or IcmpCreateFile not available\n" );
932 memset(senddata, 0,
sizeof(senddata));
938 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
942 "expected 87, got %d\n",
error);
944 icmp = pIcmpCreateFile();
950 skip (
"ICMP is not available.\n");
958 ret = pIcmpSendEcho(
icmp,
address, senddata,
sizeof(senddata),
NULL, replydata, replysz, 1000);
960 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
963 "expected 1214, got %d\n",
error);
969 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
975 ok (
ret,
"IcmpSendEcho failed unexpectedly with error %d\n",
error);
980 ok (
ret,
"IcmpSendEcho failed unexpectedly with error %d\n",
error);
987 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
992 ret = pIcmpSendEcho(
icmp,
address, senddata,
sizeof(senddata),
NULL, replydata, 0, 1000);
994 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
998 "expected 87, got %d\n",
error);
1003 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
1007 "expected 87, got %d\n",
error);
1010 replysz =
sizeof(replydata) - 1;
1011 ret = pIcmpSendEcho(
icmp,
address, senddata,
sizeof(senddata),
NULL, replydata, replysz, 1000);
1014 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
1017 "expected 11050, got %d\n",
error);
1025 ok (
ret,
"IcmpSendEcho failed unexpectedly with error %d\n",
error);
1031 ok (
ret,
"IcmpSendEcho failed unexpectedly with error %d\n",
error);
1038 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
1042 "expected 11050, got %d\n",
error);
1047 ok (!
ret,
"IcmpSendEcho succeeded unexpectedly\n");
1051 "expected 11050, got %d\n",
error);
1055 replysz =
sizeof(replydata);
1056 ret = pIcmpSendEcho(
icmp,
address, senddata,
sizeof(senddata),
NULL, replydata, replysz, 0);
1061 ret = pIcmpSendEcho(
icmp,
address, senddata,
sizeof(senddata),
NULL, replydata, replysz, -1);
1068 ret = pIcmpSendEcho(
icmp,
address, senddata,
sizeof(senddata),
NULL, replydata, replysz, 1000);
1075 trace (
"reply size : %u\n", replysz);
1084 skip (
"Failed to ping with error %d, is lo interface down?.\n",
error);
1125 if (pGetInterfaceInfo) {
1129 apiReturn = pGetInterfaceInfo(
NULL,
NULL);
1131 skip(
"GetInterfaceInfo is not supported\n");
1135 "GetInterfaceInfo returned %d, expected ERROR_INVALID_PARAMETER\n",
1137 apiReturn = pGetInterfaceInfo(
NULL, &
len);
1139 "GetInterfaceInfo returned %d, expected ERROR_INSUFFICIENT_BUFFER\n",
1144 apiReturn = pGetInterfaceInfo(
buf, &
len);
1146 "GetInterfaceInfo(buf, &dwSize) returned %d, expected NO_ERROR\n",
1155 if (pGetAdaptersInfo) {
1159 apiReturn = pGetAdaptersInfo(
NULL,
NULL);
1161 skip(
"GetAdaptersInfo is not supported\n");
1165 "GetAdaptersInfo returned %d, expected ERROR_INVALID_PARAMETER\n",
1167 apiReturn = pGetAdaptersInfo(
NULL, &
len);
1169 "GetAdaptersInfo returned %d, expected ERROR_NO_DATA or ERROR_BUFFER_OVERFLOW\n",
1176 apiReturn = pGetAdaptersInfo(
buf, &
len);
1178 "GetAdaptersInfo(buf, &dwSize) returned %d, expected NO_ERROR\n",
1182 ok(
ptr->IpAddressList.IpAddress.String[0],
"A valid IP must be present\n");
1183 ok(
ptr->IpAddressList.IpMask.String[0],
"A valid mask must be present\n");
1184 trace(
"Adapter '%s', IP %s, Mask %s\n",
ptr->AdapterName,
1185 ptr->IpAddressList.IpAddress.String,
ptr->IpAddressList.IpMask.String);
1195 if (pGetNetworkParams) {
1199 apiReturn = pGetNetworkParams(
NULL,
NULL);
1201 skip(
"GetNetworkParams is not supported\n");
1205 "GetNetworkParams returned %d, expected ERROR_INVALID_PARAMETER\n",
1207 apiReturn = pGetNetworkParams(
NULL, &
len);
1209 "GetNetworkParams returned %d, expected ERROR_BUFFER_OVERFLOW\n",
1214 apiReturn = pGetNetworkParams(
buf, &
len);
1216 "GetNetworkParams(buf, &dwSize) returned %d, expected NO_ERROR\n",
1243 if (!pGetPerAdapterInfo)
return;
1246 skip(
"GetPerAdapterInfo is not supported\n");
1250 needed = 0xdeadbeef;
1251 ret = pGetPerAdapterInfo(1,
NULL, &needed);
1254 ok( needed != 0xdeadbeef,
"needed not set\n" );
1256 ret = pGetPerAdapterInfo(1,
buffer, &needed);
1268 if (!pNotifyAddrChange)
1270 win_skip(
"NotifyAddrChange not present\n");
1273 if (!pCancelIPChangeNotify)
1275 win_skip(
"CancelIPChangeNotify not present\n");
1284 win_skip(
"NotifyAddrChange is not supported\n");
1295 ok(
success ==
FALSE,
"CancelIPChangeNotify returned TRUE, expected FALSE\n");
1304 ok(
success ==
FALSE,
"GetOverlappedResult returned TRUE, expected FALSE\n");
1315 trace(
"Testing asynchronous ipv4 address change notification. Please "
1316 "change the ipv4 address of one of your network interfaces\n");
1320 ok(
success ==
TRUE,
"GetOverlappedResult returned FALSE, expected TRUE\n");
1326 trace(
"Testing synchronous ipv4 address change notification. Please "
1327 "change the ipv4 address of one of your network interfaces\n");
1355 IP_ADAPTER_ADDRESSES *aa, *
ptr;
1356 IP_ADAPTER_UNICAST_ADDRESS *ua;
1358 if (!pGetAdaptersAddresses)
1360 win_skip(
"GetAdaptersAddresses not present\n");
1375 ok(!
ret,
"expected ERROR_SUCCESS got %u\n",
ret);
1383 ok(!
ret,
"expected ERROR_SUCCESS got %u\n",
ret);
1384 ok(osize ==
size,
"expected %d, got %d\n",
size, osize);
1386 for (aa =
ptr; !
ret && aa; aa = aa->Next)
1389 IP_ADAPTER_PREFIX *prefix;
1391 ok(
S(
U(*aa)).
Length ==
sizeof(IP_ADAPTER_ADDRESSES_LH) ||
1392 S(
U(*aa)).
Length ==
sizeof(IP_ADAPTER_ADDRESSES_XP),
1393 "Unknown structure size of %u bytes\n",
S(
U(*aa)).
Length);
1394 ok(aa->DnsSuffix !=
NULL,
"DnsSuffix is not a valid pointer\n");
1395 ok(aa->Description !=
NULL,
"Description is not a valid pointer\n");
1396 ok(aa->FriendlyName !=
NULL,
"FriendlyName is not a valid pointer\n");
1400 trace(
"IfIndex: %u\n",
S(
U(*aa)).IfIndex);
1401 trace(
"Next: %p\n", aa->Next);
1402 trace(
"AdapterName: %s\n", aa->AdapterName);
1403 trace(
"FirstUnicastAddress: %p\n", aa->FirstUnicastAddress);
1404 ua = aa->FirstUnicastAddress;
1408 "bad address config value %d\n", ua->PrefixOrigin);
1410 "bad address config value %d\n", ua->PrefixOrigin);
1415 ok(ua->ValidLifetime,
"expected non-zero value\n");
1416 ok(ua->PreferredLifetime,
"expected non-zero value\n");
1417 ok(ua->LeaseLifetime,
"expected non-zero\n");
1421 "bad address duplication value %d\n", ua->DadState);
1424 trace(
"\tNext: %p\n", ua->Next);
1425 trace(
"\tAddress.lpSockaddr: %p\n", ua->Address.lpSockaddr);
1426 trace(
"\tAddress.iSockaddrLength: %d\n", ua->Address.iSockaddrLength);
1427 trace(
"\tPrefixOrigin: %u\n", ua->PrefixOrigin);
1428 trace(
"\tSuffixOrigin: %u\n", ua->SuffixOrigin);
1429 trace(
"\tDadState: %u\n", ua->DadState);
1430 trace(
"\tValidLifetime: %u seconds\n", ua->ValidLifetime);
1431 trace(
"\tPreferredLifetime: %u seconds\n", ua->PreferredLifetime);
1432 trace(
"\tLeaseLifetime: %u seconds\n", ua->LeaseLifetime);
1436 trace(
"FirstAnycastAddress: %p\n", aa->FirstAnycastAddress);
1437 trace(
"FirstMulticastAddress: %p\n", aa->FirstMulticastAddress);
1438 trace(
"FirstDnsServerAddress: %p\n", aa->FirstDnsServerAddress);
1442 trace(
"PhysicalAddressLength: %u\n", aa->PhysicalAddressLength);
1443 for (
i = 0;
i < aa->PhysicalAddressLength;
i++)
1445 temp[
i ?
i * 3 - 1 : 0] =
'\0';
1447 trace(
"Flags: 0x%08x\n", aa->Flags);
1448 trace(
"Mtu: %u\n", aa->Mtu);
1449 trace(
"IfType: %u\n", aa->IfType);
1450 trace(
"OperStatus: %u\n", aa->OperStatus);
1451 trace(
"Ipv6IfIndex: %u\n", aa->Ipv6IfIndex);
1452 for (
i = 0,
temp[0] =
'\0';
i <
sizeof(aa->ZoneIndices) /
sizeof(aa->ZoneIndices[0]);
i++)
1455 trace(
"FirstPrefix: %p\n", aa->FirstPrefix);
1456 prefix = aa->FirstPrefix;
1461 trace(
"\tNext: %p\n", prefix->Next);
1462 trace(
"\tAddress.lpSockaddr: %p\n", prefix->Address.lpSockaddr);
1463 trace(
"\tAddress.iSockaddrLength: %d\n", prefix->Address.iSockaddrLength);
1464 trace(
"\tPrefixLength: %u\n", prefix->PrefixLength);
1466 prefix = prefix->Next;
1469 if (
S(
U(*aa)).
Length <
sizeof(IP_ADAPTER_ADDRESSES_LH))
continue;
1473 trace(
"FirstWinsServerAddress:%p\n", aa->FirstWinsServerAddress);
1474 trace(
"FirstGatewayAddress: %p\n", aa->FirstGatewayAddress);
1475 trace(
"Ipv4Metric: %u\n", aa->Ipv4Metric);
1476 trace(
"Ipv6Metric: %u\n", aa->Ipv6Metric);
1477 trace(
"Luid: %p\n", &aa->Luid);
1478 trace(
"Dhcpv4Server: %p\n", &aa->Dhcpv4Server);
1479 trace(
"CompartmentId: %u\n", aa->CompartmentId);
1481 trace(
"ConnectionType: %u\n", aa->ConnectionType);
1482 trace(
"TunnelType: %u\n", aa->TunnelType);
1483 trace(
"Dhcpv6Server: %p\n", &aa->Dhcpv6Server);
1484 trace(
"Dhcpv6ClientDuidLength:%u\n", aa->Dhcpv6ClientDuidLength);
1485 trace(
"Dhcpv6ClientDuid: %p\n", aa->Dhcpv6ClientDuid);
1486 trace(
"Dhcpv6Iaid: %u\n", aa->Dhcpv6Iaid);
1487 trace(
"FirstDnsSuffix: %p\n", aa->FirstDnsSuffix);
1501 if (!pGetExtendedTcpTable)
1503 win_skip(
"GetExtendedTcpTable not available\n");
1571 if (!pGetExtendedUdpTable)
1573 win_skip(
"GetExtendedUdpTable not available\n");
1614 if (!pCreateSortedAddressPairs)
1616 win_skip(
"CreateSortedAddressPairs not available\n" );
1622 dst[0].sin6_addr.u.Word[5] = 0xffff;
1623 dst[0].sin6_addr.u.Word[6] = 0x0808;
1624 dst[0].sin6_addr.u.Word[7] = 0x0808;
1626 pair_count = 0xdeadbeef;
1627 ret = pCreateSortedAddressPairs(
NULL, 0,
dst, 1, 0,
NULL, &pair_count );
1629 ok( pair_count == 0xdeadbeef,
"got %u\n", pair_count );
1632 pair_count = 0xdeadbeef;
1633 ret = pCreateSortedAddressPairs(
NULL, 0,
NULL, 1, 0, &
pair, &pair_count );
1636 ok( pair_count == 0xdeadbeef,
"got %u\n", pair_count );
1639 pair_count = 0xdeadbeef;
1640 ret = pCreateSortedAddressPairs(
NULL, 0,
dst, 1, 0, &
pair, &pair_count );
1643 ok( pair_count >= 1,
"got %u\n", pair_count );
1646 pFreeMibTable(
pair );
1649 dst[1].sin6_addr.u.Word[5] = 0xffff;
1650 dst[1].sin6_addr.u.Word[6] = 0x0404;
1651 dst[1].sin6_addr.u.Word[7] = 0x0808;
1654 pair_count = 0xdeadbeef;
1655 ret = pCreateSortedAddressPairs(
NULL, 0,
dst, 2, 0, &
pair, &pair_count );
1658 ok( pair_count >= 2,
"got %u\n", pair_count );
1663 pFreeMibTable(
pair );
1669 IP_ADAPTER_ADDRESSES *
buf, *aa;
1676 for (aa =
buf; aa; aa = aa->Next)
1698 if (!pConvertInterfaceIndexToLuid)
1700 win_skip(
"ConvertInterfaceIndexToLuid not available\n" );
1705 skip(
"no suitable interface found\n" );
1710 ret = pConvertInterfaceIndexToLuid( 0,
NULL );
1713 memset( &luid, 0xff,
sizeof(luid) );
1714 ret = pConvertInterfaceIndexToLuid( 0, &luid );
1716 ok( !luid.
Info.Reserved,
"got %x\n", luid.
Info.Reserved );
1717 ok( !luid.
Info.NetLuidIndex,
"got %u\n", luid.
Info.NetLuidIndex );
1718 ok( !luid.
Info.IfType,
"got %u\n", luid.
Info.IfType );
1720 luid.
Info.Reserved = luid.
Info.NetLuidIndex = luid.
Info.IfType = 0xdead;
1721 ret = pConvertInterfaceIndexToLuid(
index, &luid );
1723 ok( !luid.
Info.Reserved,
"got %x\n", luid.
Info.Reserved );
1724 ok( luid.
Info.NetLuidIndex != 0xdead,
"index not set\n" );
1734 ret = pConvertInterfaceLuidToIndex( &luid,
NULL );
1737 ret = pConvertInterfaceLuidToIndex( &luid, &
index );
1747 ok(
guid.Data1 == 0xffffffff,
"got %x\n",
guid.Data1 );
1749 ret = pConvertInterfaceLuidToGuid( &luid,
NULL );
1753 ret = pConvertInterfaceLuidToGuid( &luid, &
guid );
1761 luid.
Info.NetLuidIndex = 1;
1762 ret = pConvertInterfaceGuidToLuid(
NULL, &luid );
1764 ok( luid.
Info.NetLuidIndex == 1,
"got %u\n", luid.
Info.NetLuidIndex );
1769 luid.
Info.Reserved = luid.
Info.NetLuidIndex = luid.
Info.IfType = 0xdead;
1770 ret = pConvertInterfaceGuidToLuid( &
guid, &luid );
1772 ok( !luid.
Info.Reserved,
"got %x\n", luid.
Info.Reserved );
1773 ok( luid.
Info.NetLuidIndex != 0xdead,
"index not set\n" );
1777 ret = pConvertInterfaceLuidToNameW(
NULL,
NULL, 0 );
1780 ret = pConvertInterfaceLuidToNameW( &luid,
NULL, 0 );
1786 ret = pConvertInterfaceLuidToNameW( &luid,
nameW, 0 );
1791 ret = pConvertInterfaceLuidToNameW( &luid,
nameW,
len );
1793 ok(
nameW[0],
"name not set\n" );
1796 ret = pConvertInterfaceLuidToNameA(
NULL,
NULL, 0 );
1799 ret = pConvertInterfaceLuidToNameA( &luid,
NULL, 0 );
1802 ret = pConvertInterfaceLuidToNameA(
NULL, nameA, 0 );
1805 ret = pConvertInterfaceLuidToNameA( &luid, nameA, 0 );
1809 len =
sizeof(nameA)/
sizeof(nameA[0]);
1810 ret = pConvertInterfaceLuidToNameA( &luid, nameA,
len );
1812 ok( nameA[0],
"name not set\n" );
1818 luid.
Info.Reserved = luid.
Info.NetLuidIndex = luid.
Info.IfType = 0xdead;
1819 ret = pConvertInterfaceNameToLuidW(
NULL, &luid );
1821 ok( !luid.
Info.Reserved,
"got %x\n", luid.
Info.Reserved );
1822 ok( luid.
Info.NetLuidIndex != 0xdead,
"index not set\n" );
1823 ok( !luid.
Info.IfType,
"got %u\n", luid.
Info.IfType );
1828 luid.
Info.Reserved = luid.
Info.NetLuidIndex = luid.
Info.IfType = 0xdead;
1829 ret = pConvertInterfaceNameToLuidW(
nameW, &luid );
1831 ok( !luid.
Info.Reserved,
"got %x\n", luid.
Info.Reserved );
1832 ok( luid.
Info.NetLuidIndex != 0xdead,
"index not set\n" );
1839 luid.
Info.Reserved = luid.
Info.NetLuidIndex = luid.
Info.IfType = 0xdead;
1840 ret = pConvertInterfaceNameToLuidA(
NULL, &luid );
1842 ok( luid.
Info.Reserved == 0xdead,
"reserved set\n" );
1843 ok( luid.
Info.NetLuidIndex == 0xdead,
"index set\n" );
1844 ok( luid.
Info.IfType == 0xdead,
"type set\n" );
1846 ret = pConvertInterfaceNameToLuidA( nameA,
NULL );
1849 luid.
Info.Reserved = luid.
Info.NetLuidIndex = luid.
Info.IfType = 0xdead;
1850 ret = pConvertInterfaceNameToLuidA( nameA, &luid );
1852 ok( !luid.
Info.Reserved,
"got %x\n", luid.
Info.Reserved );
1853 ok( luid.
Info.NetLuidIndex != 0xdead,
"index not set\n" );
1865 win_skip(
"GetIfEntry2 not available\n" );
1870 skip(
"no suitable interface found\n" );
1878 ret = pGetIfEntry2( &
row );
1883 ret = pGetIfEntry2( &
row );
1891 MIB_IF_TABLE2 *
table;
1895 win_skip(
"GetIfTable2 not available\n" );
1903 pFreeMibTable(
table );
ACPI_SIZE strlen(const char *String)
static unsigned char bytes[4]
static const WCHAR nameW[]
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define ERROR_NOT_SUPPORTED
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define WideCharToMultiByte
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define IF_MAX_STRING_SIZE
struct _MIB_IFTABLE * PMIB_IFTABLE
struct _MIB_IFROW * PMIB_IFROW
#define MAX_INTERFACE_NAME_LEN
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
#define IP_BAD_DESTINATION
struct icmp_echo_reply * PICMP_ECHO_REPLY
struct _IP_INTERFACE_INFO * PIP_INTERFACE_INFO
struct icmp_echo_reply ICMP_ECHO_REPLY
#define IP_GENERAL_FAILURE
static PIP_ADAPTER_ADDRESSES
static const char * ntoa(DWORD ip)
static const PSOCKADDR_IN6
static void test_interface_identifier_conversion(void)
static DWORD CALLBACK testWin98Functions(void *p)
static void testGetIfTable(void)
static void testGetTcpStatistics(void)
static void testNotifyAddrChange(void)
static void testWin98OnlyFunctions(void)
static void testGetUdpTable(void)
static NET_LUID *static NET_LUID *static void loadIPHlpApi(void)
static void test_GetAdaptersAddresses(void)
static void testGetInterfaceInfo(void)
static void test_GetExtendedTcpTable(void)
static void testSetTcpEntry(void)
static void testGetNetworkParams(void)
static void testIcmpSendEcho(void)
static void testGetTcpTable(void)
static NET_LUID *static NET_LUID *static GUID *static NET_IFINDEX *static WCHAR SIZE_T
static PIP_PER_ADAPTER_INFO
static void testGetPerAdapterInfo(void)
static PIP_OPTION_INFORMATION
static void testGetIpStatistics(void)
static void testGetIpStatisticsEx(void)
static void testGetIpForwardTable(void)
static void test_GetIfEntry2(void)
static void testGetIcmpStatistics(void)
static void testGetUdpStatistics(void)
static void testGetIpNetTable(void)
static const char * debugstr_longlong(ULONGLONG ll)
static void testGetAdaptersInfo(void)
static void testGetIpAddrTable(void)
static void testGetIcmpStatisticsEx(void)
static void test_GetExtendedUdpTable(void)
static void freeIPHlpApi(void)
static void test_CreateSortedAddressPairs(void)
static void testGetIfEntry(DWORD index)
static void testGetTcpStatisticsEx(void)
static void testGetNumberOfInterfaces(void)
static void testWinNT4Functions(void)
static DWORD get_interface_index(void)
static void testWin2KFunctions(void)
static void test_GetIfTable2(void)
static void testGetUdpStatisticsEx(void)
#define IF_TYPE_ETHERNET_CSMACD
struct _MIB_ICMP * PMIB_ICMP
struct _MIB_IPFORWARDTABLE * PMIB_IPFORWARDTABLE
struct _MIB_IPNETTABLE * PMIB_IPNETTABLE
struct _MIB_ICMP_EX * PMIB_ICMP_EX
struct _MIB_IPSTATS * PMIB_IPSTATS
struct _MIB_IPADDRTABLE * PMIB_IPADDRTABLE
@ TCP_TABLE_BASIC_LISTENER
@ TCP_TABLE_OWNER_MODULE_ALL
@ TCP_TABLE_OWNER_PID_LISTENER
@ TCP_TABLE_OWNER_PID_ALL
@ TCP_TABLE_OWNER_MODULE_LISTENER
struct _IP_ADAPTER_INFO * PIP_ADAPTER_INFO
struct FIXED_INFO * PFIXED_INFO
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define sprintf(buf, format,...)
_In_ ULONG _In_ ULONG _In_ ULONG Length
static __inline const char * wine_dbgstr_guid(const GUID *id)
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
MIBICMPSTATS icmpOutStats
MIBICMPSTATS_EX icmpOutStats
MIBICMPSTATS_EX icmpInStats
IP_OPTION_INFORMATION Options
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
struct _MIB_TCPROW * PMIB_TCPROW
struct _MIB_TCPTABLE * PMIB_TCPTABLE
@ MIB_TCP_STATE_DELETE_TCB
struct _MIB_TCPSTATS * PMIB_TCPSTATS
struct _MIB_UDPSTATS * PMIB_UDPSTATS
struct _MIB_UDPTABLE * PMIB_UDPTABLE
struct _NET_LUID_LH::@2989 Info
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
#define ERROR_BUFFER_OVERFLOW
#define ERROR_IO_INCOMPLETE
#define ERROR_MR_MID_NOT_FOUND
#define ERROR_NETWORK_ACCESS_DENIED
#define ERROR_INVALID_DATA
#define ERROR_INVALID_NETNAME
_Must_inspect_result_ _In_ ULONG Flags
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Out_ PPHYSICAL_ADDRESS DestinationAddress
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS SourceAddress