70{
75 ULONG infoCount, i1, j1, iiFlagsExpected;
80
81
82
85
86
88 ok(iResult == 0,
"WSAStartup failed. iResult = %d\n", iResult);
89
90
94 {
95 skip(
"Failed to create socket!\n");
97 }
98
99
103 {
104 skip(
"Failed to allocate memory!\n");
106 }
110 ok(iResult == -1,
"WSAIoctl/SIO_GET_INTERFACE_LIST did not fail! iResult = %d.\n", iResult);
115
116
117
118
119
120 i1 = 0;
122 {
124 {
127 }
128
132 {
133 skip(
"Failed to allocate memory!\n");
135 }
139
141 break;
142
143
145 {
147 skip(
"WSAIoctl / SIO_GET_INTERFACE_LIST\n");
149 }
150
151 i1++;
152 }
153
155
156
158 ok(infoCount ==
pTable->dwNumEntries,
159 "Wrong count of entries! Got %ld, expected %ld.\n",
pTable->dwNumEntries, infoCount);
160
162 {
166 for (i1 = 0; i1 < infoCount; i1++)
167 {
168 trace(
"entry-index %ld\n", i1);
173 ifInfo++;
174 }
175 }
176
177
179 for (i1 = 0; i1 < infoCount; i1++)
180 {
182 trace(
"Entry %ld\n", i1);
183 for (j1 = 0; j1 <
pTable->dwNumEntries; j1++)
184 {
185 if (ifInfo[i1].iiAddress.AddressIn.sin_addr.s_addr ==
pTable->table[j1].dwAddr)
186 {
187 pRow = &
pTable->table[j1];
188 break;
189 }
190 }
191 if (j1 ==
pTable->dwNumEntries)
192 {
193 skip(
"Skipping interface\n");
194 continue;
195 }
196
197
198
201 iiFlagsExpected |=
IFF_UP;
203 {
205
206
207 }
208
209 ok_hex(ifInfo[i1].iiFlags, iiFlagsExpected);
210 ok_hex(ifInfo[i1].iiAddress.AddressIn.sin_addr.s_addr, pRow->
dwAddr);
211
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);
215 }
216
218 if (sck != 0)
225}
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 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
#define MIB_IPADDR_DISCONNECTED
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