42{
54
56 {
57 skip(
"Failed to init WS2\n");
58 return;
59 }
60
64
67 {
68 skip(
"Cannot create socket\n");
70 }
71
76
78 {
79 skip(
"Cannot bind socket\n");
80 goto quit2;
81 }
82
84 {
85 skip(
"Cannot listen on socket\n");
86 goto quit2;
87 }
88
90 {
91 ok(TcpTable->dwNumEntries > 0,
"No TCP connections?!\n");
92
94 for (
i = 0;
i < TcpTable->dwNumEntries; ++
i)
95 {
97 TcpTable->table[
i].dwLocalAddr == 0 &&
98 TcpTable->table[
i].dwLocalPort ==
htons(9876) &&
99 TcpTable->table[
i].dwRemoteAddr == 0)
100 {
102 break;
103 }
104 }
105 ok(
Found,
"Our socket wasn't found!\n");
106
108 }
109 else
110 {
111 skip(
"GetExtendedTcpTableWithAlloc failure\n");
112 }
113
115 {
117 for (
i = 0;
i < TcpTable->dwNumEntries; ++
i)
118 {
120 TcpTable->table[
i].dwLocalAddr == 0 &&
121 TcpTable->table[
i].dwLocalPort ==
htons(9876) &&
122 TcpTable->table[
i].dwRemoteAddr == 0)
123 {
125 break;
126 }
127 }
129
131 }
132 else
133 {
134 skip(
"GetExtendedTcpTableWithAlloc failure\n");
135 }
136
138 {
139 ok(TcpTable->dwNumEntries > 0,
"No TCP connections?!\n");
140
142 for (
i = 0;
i < TcpTable->dwNumEntries; ++
i)
143 {
145 TcpTable->table[
i].dwLocalAddr == 0 &&
146 TcpTable->table[
i].dwLocalPort ==
htons(9876) &&
147 TcpTable->table[
i].dwRemoteAddr == 0)
148 {
150 break;
151 }
152 }
153 ok(
Found,
"Our socket wasn't found!\n");
154
156 }
157 else
158 {
159 skip(
"GetExtendedTcpTableWithAlloc failure\n");
160 }
161
163 {
164 ok(TcpTableOwner->dwNumEntries > 0,
"No TCP connections?!\n");
165
167 for (
i = 0;
i < TcpTableOwner->dwNumEntries; ++
i)
168 {
170 TcpTableOwner->table[
i].dwLocalAddr == 0 &&
171 TcpTableOwner->table[
i].dwLocalPort ==
htons(9876) &&
172 TcpTableOwner->table[
i].dwRemoteAddr == 0)
173 {
175 break;
176 }
177 }
178
180 {
181 skip(
"Our socket wasn't found!\n");
182 }
183 else
184 {
185 ok(TcpTableOwner->table[
i].dwOwningPid == Pid,
"Invalid owner\n");
186 }
187
189 }
190 else
191 {
192 skip(
"GetExtendedTcpTableWithAlloc failure\n");
193 }
194
196 {
198 for (
i = 0;
i < TcpTableOwner->dwNumEntries; ++
i)
199 {
201 TcpTableOwner->table[
i].dwLocalAddr == 0 &&
202 TcpTableOwner->table[
i].dwLocalPort ==
htons(9876) &&
203 TcpTableOwner->table[
i].dwRemoteAddr == 0)
204 {
206 break;
207 }
208 }
210
212 }
213 else
214 {
215 skip(
"GetExtendedTcpTableWithAlloc failure\n");
216 }
217
219 {
220 ok(TcpTableOwner->dwNumEntries > 0,
"No TCP connections?!\n");
221
223 for (
i = 0;
i < TcpTableOwner->dwNumEntries; ++
i)
224 {
226 TcpTableOwner->table[
i].dwLocalAddr == 0 &&
227 TcpTableOwner->table[
i].dwLocalPort ==
htons(9876) &&
228 TcpTableOwner->table[
i].dwRemoteAddr == 0)
229 {
231 break;
232 }
233 }
234
236 {
237 skip(
"Our socket wasn't found!\n");
238 }
239 else
240 {
241 ok(TcpTableOwner->table[
i].dwOwningPid == Pid,
"Invalid owner\n");
242 }
243
245 }
246 else
247 {
248 skip(
"GetExtendedTcpTableWithAlloc failure\n");
249 }
250
252 {
253 ok(TcpTableOwnerMod->dwNumEntries > 0,
"No TCP connections?!\n");
254
256 for (
i = 0;
i < TcpTableOwnerMod->dwNumEntries; ++
i)
257 {
259 TcpTableOwnerMod->table[
i].dwLocalAddr == 0 &&
260 TcpTableOwnerMod->table[
i].dwLocalPort ==
htons(9876) &&
261 TcpTableOwnerMod->table[
i].dwRemoteAddr == 0)
262 {
264 break;
265 }
266 }
267
269 {
270 skip(
"Our socket wasn't found!\n");
271 }
272 else
273 {
274 ok(TcpTableOwnerMod->table[
i].dwOwningPid == Pid,
"Invalid owner\n");
275
276
277 if (TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart != 0)
278 {
279 ok(TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart >= CreationTime.
QuadPart,
"Invalid time\n");
280 ok(TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart <= CreationTime.
QuadPart + 60000000000LL,
"Invalid time\n");
281 }
282 }
283
285 }
286 else
287 {
288 skip(
"GetExtendedTcpTableWithAlloc failure\n");
289 }
290
292 {
294 for (
i = 0;
i < TcpTableOwnerMod->dwNumEntries; ++
i)
295 {
297 TcpTableOwnerMod->table[
i].dwLocalAddr == 0 &&
298 TcpTableOwnerMod->table[
i].dwLocalPort ==
htons(9876) &&
299 TcpTableOwnerMod->table[
i].dwRemoteAddr == 0)
300 {
302 break;
303 }
304 }
306
308 }
309 else
310 {
311 skip(
"GetExtendedTcpTableWithAlloc failure\n");
312 }
313
315 {
316 ok(TcpTableOwnerMod->dwNumEntries > 0,
"No TCP connections?!\n");
317
319 for (
i = 0;
i < TcpTableOwnerMod->dwNumEntries; ++
i)
320 {
322 TcpTableOwnerMod->table[
i].dwLocalAddr == 0 &&
323 TcpTableOwnerMod->table[
i].dwLocalPort ==
htons(9876) &&
324 TcpTableOwnerMod->table[
i].dwRemoteAddr == 0)
325 {
327 break;
328 }
329 }
330
332 {
333 skip(
"Our socket wasn't found!\n");
334 }
335 else
336 {
337 ok(TcpTableOwnerMod->table[
i].dwOwningPid == Pid,
"Invalid owner\n");
338
339
340 if (TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart != 0)
341 {
342 ok(TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart >= CreationTime.
QuadPart,
"Invalid time\n");
343 ok(TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart <= CreationTime.
QuadPart + 60000000000LL,
"Invalid time\n");
344 }
345 }
346
348 }
349 else
350 {
351 skip(
"GetExtendedTcpTableWithAlloc failure\n");
352 }
353
354quit2:
358}
static DWORD GetExtendedTcpTableWithAlloc(PVOID *TcpTable, BOOL Order, DWORD Family, TCP_TABLE_CLASS Class)
void quit(int argc, const char *argv[])
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
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
@ TCP_TABLE_OWNER_MODULE_CONNECTIONS
@ TCP_TABLE_BASIC_CONNECTIONS
@ TCP_TABLE_BASIC_LISTENER
@ TCP_TABLE_OWNER_MODULE_ALL
@ TCP_TABLE_OWNER_PID_LISTENER
@ TCP_TABLE_OWNER_PID_ALL
@ TCP_TABLE_OWNER_PID_CONNECTIONS
@ TCP_TABLE_OWNER_MODULE_LISTENER
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
static rfbScreenInfoPtr server
DWORD WINAPI GetCurrentProcessId(void)
int PASCAL FAR WSACleanup(void)