Lines Matching defs:socket
40 #include <sys/socket.h>
59 #define socket rump_sys_socket
186 * Given a domain and sockaddr, open a listening socket with automatic port
187 * selection. Then, try to connect 64K times. Ensure the connected socket never
206 * port on which we have a listening socket.
210 /* Setup the listen socket. */
211 lsock = socket(domain, SOCK_STREAM, 0);
212 ATF_REQUIRE_MSG(lsock >= 0, "socket() for listen socket failed: %s",
220 * Get the address of the listen socket, which will be the destination
226 "getsockname() for listen socket failed: %s",
237 csock = socket(domain, SOCK_STREAM, 0);
239 "socket() for client socket %d failed: %s",
244 "connect() for client socket %d failed: %s",
250 "Setting linger for client socket %d failed: %s",
253 /* Ascertain the client socket address. */
257 "getsockname() for client socket %d failed: %s",
261 "unexpected sockaddr size for client socket %d", i);
268 "client socket %d using the same port as server",
274 "client socket %d using the same port as server",
279 /* Accept the socket and close both ends. */
282 "accept() failed for client socket %d: %s",
287 "close() failed for accepted socket %d: %s",
292 "close() failed for client socket %d: %s",