15 trace(
" %s.AddressIn.sin_family %x\n", txt,
a.AddressIn.sin_family);
16 trace(
" %s.AddressIn.sin_port %x\n", txt,
a.AddressIn.sin_port);
17 trace(
" %s.AddressIn.sin_addr.s_addr %lx\n", txt,
a.AddressIn.sin_addr.s_addr);
33 skip(
"GetIpAddrTable failed with %ld. Abort Testing.\n",
ret);
43 skip(
"GetIpAddrTable failed with %ld. Abort Testing.\n",
ret);
49 trace(
"Result of GetIpAddrTable:\n");
52 for (i1 = 0; i1 <
pTable->dwNumEntries; i1++)
54 trace(
"** Entry %ld **\n", i1);
75 ULONG infoCount, i1, j1, iiFlagsExpected;
88 ok(iResult == 0,
"WSAStartup failed. iResult = %d\n", iResult);
95 skip(
"Failed to create socket!\n");
104 skip(
"Failed to allocate memory!\n");
110 ok(iResult == -1,
"WSAIoctl/SIO_GET_INTERFACE_LIST did not fail! iResult = %d.\n", iResult);
133 skip(
"Failed to allocate memory!\n");
147 skip(
"WSAIoctl / SIO_GET_INTERFACE_LIST\n");
158 ok(infoCount ==
pTable->dwNumEntries,
159 "Wrong count of entries! Got %ld, expected %ld.\n",
pTable->dwNumEntries, infoCount);
166 for (i1 = 0; i1 < infoCount; i1++)
168 trace(
"entry-index %ld\n", i1);
179 for (i1 = 0; i1 < infoCount; i1++)
182 trace(
"Entry %ld\n", i1);
183 for (j1 = 0; j1 <
pTable->dwNumEntries; j1++)
185 if (ifInfo[i1].iiAddress.AddressIn.sin_addr.s_addr ==
pTable->table[j1].dwAddr)
187 pRow = &
pTable->table[j1];
191 if (j1 ==
pTable->dwNumEntries)
193 skip(
"Skipping interface\n");
201 iiFlagsExpected |=
IFF_UP;
209 ok_hex(ifInfo[i1].iiFlags, iiFlagsExpected);
210 ok_hex(ifInfo[i1].iiAddress.AddressIn.sin_addr.s_addr, pRow->
dwAddr);
213 ok_hex(ifInfo[i1].iiBroadcastAddress.AddressIn.sin_addr.s_addr, BCastAddr);
214 ok_hex(ifInfo[i1].iiNetmask.AddressIn.sin_addr.s_addr, pRow->
dwMask);
void Test_WSAIoctl_GetInterfaceList()
void traceaddr(char *txt, sockaddr_gen a)
BOOL Test_WSAIoctl_InitTest(OUT PMIB_IPADDRTABLE *ppTable)
#define ok_hex(expression, result)
#define ok_dec(expression, result)
#define ERROR_INSUFFICIENT_BUFFER
#define HeapFree(x, y, z)
static void cleanup(void)
INT WSAAPI WSAIoctl(IN SOCKET s, IN DWORD dwIoControlCode, IN LPVOID lpvInBuffer, IN DWORD cbInBuffer, OUT LPVOID lpvOutBuffer, IN DWORD cbOutBuffer, OUT LPDWORD lpcbBytesReturned, IN LPWSAOVERLAPPED lpOverlapped, IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLboolean GLboolean GLboolean a
DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize, BOOL bOrder)
#define MIB_IPADDR_DISCONNECTED
struct _MIB_IPADDRTABLE * PMIB_IPADDRTABLE
sockaddr_gen iiBroadcastAddress
static const EHCI_PERIOD pTable[]
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
int PASCAL FAR WSAGetLastError(void)
int PASCAL FAR WSACleanup(void)
#define SIO_GET_INTERFACE_LIST
struct _INTERFACE_INFO INTERFACE_INFO
struct _INTERFACE_INFO * LPINTERFACE_INFO
_Must_inspect_result_ typedef _Out_ PULONG TableSize