Home
last modified time | relevance | path

Searched refs:server_fd (Results 1 – 20 of 20) sorted by relevance

/external/autotest/client/tests/ipv6connect/src/
Dipv6connect.c38 static void ConnectAndAccept(enum LoopbackAddr addr, int server_fd, int port) { in ConnectAndAccept() argument
88 if ((accepted_fd = accept(server_fd, in ConnectAndAccept()
98 static void CreateServer(int* server_fd, int* port) { in CreateServer() argument
103 if ((*server_fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP)) == -1) { in CreateServer()
111 if (bind(*server_fd, (struct sockaddr*)(&sa), sizeof(sa)) == -1) { in CreateServer()
115 if (getsockname(*server_fd, (struct sockaddr*)(&sa), &addr_len) == -1) { in CreateServer()
119 if (listen(*server_fd, 10) == -1) { in CreateServer()
130 int server_fd, client_fd, accepted_fd, connect_rc; in CreateServerConnectAndAccept() local
132 if ((server_fd = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP)) == -1) { in CreateServerConnectAndAccept()
141 if (bind(server_fd, (struct sockaddr*)(&sa), sizeof(sa)) == -1) { in CreateServerConnectAndAccept()
[all …]
/external/linux-kselftest/tools/testing/selftests/net/
Dtcp_inq.c61 int server_fd = (int)(unsigned long)arg; in start_server() local
71 fd = accept(server_fd, (struct sockaddr *)&addr, &addrlen); in start_server()
92 close(server_fd); in start_server()
105 int server_fd, fd; in main() local
124 server_fd = socket(family, SOCK_STREAM, 0); in main()
125 if (server_fd < 0) in main()
128 if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, in main()
131 if (bind(server_fd, (const struct sockaddr *)&listen_addr, in main()
134 if (listen(server_fd, 128) == -1) in main()
137 (void *)(unsigned long)server_fd) != 0) in main()
/external/linux-kselftest/tools/testing/selftests/bpf/prog_tests/
Dtcp_rtt.c90 static int connect_to_server(int server_fd) in connect_to_server() argument
102 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
119 static int run_test(int cgroup_fd, int server_fd) in run_test() argument
148 client_fd = connect_to_server(server_fd); in run_test()
250 int server_fd, cgroup_fd; in test_tcp_rtt() local
257 server_fd = start_server(); in test_tcp_rtt()
258 if (CHECK_FAIL(server_fd < 0)) in test_tcp_rtt()
262 (void *)&server_fd))) in test_tcp_rtt()
269 CHECK_FAIL(run_test(cgroup_fd, server_fd)); in test_tcp_rtt()
271 close(server_fd); in test_tcp_rtt()
Dsockopt_inherit.c10 static int connect_to_server(int server_fd) in connect_to_server() argument
22 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
173 int server_fd = -1, client_fd; in run_test() local
192 server_fd = start_server(); in run_test()
193 if (CHECK_FAIL(server_fd < 0)) in run_test()
197 (void *)&server_fd))) in run_test()
204 client_fd = connect_to_server(server_fd); in run_test()
220 close(server_fd); in run_test()
/external/google-breakpad/src/client/linux/crash_generation/
Dcrash_generation_client.cc48 explicit CrashGenerationClientImpl(int server_fd) : server_fd_(server_fd) {} in CrashGenerationClientImpl() argument
99 CrashGenerationClient* CrashGenerationClient::TryCreate(int server_fd) { in TryCreate() argument
100 if (server_fd < 0) in TryCreate()
102 return new CrashGenerationClientImpl(server_fd); in TryCreate()
Dcrash_generation_client.h57 static CrashGenerationClient* TryCreate(int server_fd);
Dcrash_generation_server.cc134 CrashGenerationServer::CreateReportChannel(int* server_fd, int* client_fd) in CreateReportChannel() argument
152 *server_fd = fds[1]; in CreateReportChannel()
Dcrash_generation_server.h90 static bool CreateReportChannel(int* server_fd, int* client_fd);
/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_socket_cookie.c61 static int connect_to_server(int server_fd) in connect_to_server() argument
73 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
137 int server_fd = -1; in run_test() local
167 server_fd = start_server(); in run_test()
168 if (server_fd == -1) in run_test()
171 client_fd = connect_to_server(server_fd); in run_test()
183 close(server_fd); in run_test()
Dtest_tcp_check_syncookie_user.c50 static int connect_to_server(int server_fd) in connect_to_server() argument
56 if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) { in connect_to_server()
119 static int run_test(int server_fd, int results_fd, bool xdp) in run_test() argument
145 client = connect_to_server(server_fd); in run_test()
149 srv_client = accept(server_fd, NULL, 0); in run_test()
/external/libese/tools/ese_relay/
Dese_relay.c72 int server_fd = setup_socket(LOG_TAG); in main() local
76 if (listen(server_fd, 4)) { in main()
78 close(server_fd); in main()
82 while (server_fd) { in main()
94 if ((client_fd = accept(server_fd, &client_info, &client_info_len)) == -1) { in main()
/external/grpc-grpc/test/core/iomgr/
Dtcp_server_posix_test.cc59 int server_fd; member
101 result->server_fd = -1; in on_connect_result_init()
109 result->server_fd = grpc_tcp_server_port_fd( in on_connect_result_set()
274 result->fd_index, result->server_fd); in tcp_connect()
370 result.server_fd >= 0 && result.server == s) { in test_connect()
402 GPR_ASSERT(result.server_fd == fd); in test_connect()
408 result.server_fd); in test_connect()
/external/grpc-grpc/test/core/network_benchmarks/
Dlow_level_ping_pong.cc420 int server_fd = -1; in create_sockets_tcp() local
441 server_fd = accept_server(listen_fd); in create_sockets_tcp()
442 if (server_fd == -1) { in create_sockets_tcp()
449 server_fds->read_fd = server_fd; in create_sockets_tcp()
450 server_fds->write_fd = server_fd; in create_sockets_tcp()
461 if (server_fd != -1) { in create_sockets_tcp()
462 close(server_fd); in create_sockets_tcp()
/external/libchrome/mojo/public/cpp/platform/
Dsocket_utils_posix.cc170 bool AcceptSocketConnection(base::PlatformFile server_fd, in AcceptSocketConnection() argument
173 DCHECK_GE(server_fd, 0); in AcceptSocketConnection()
179 base::ScopedFD accepted_handle(HANDLE_EINTR(accept(server_fd, nullptr, 0))); in AcceptSocketConnection()
Dsocket_utils_posix.h74 bool AcceptSocketConnection(base::PlatformFile server_fd,
/external/adhd/cras/src/libcras/
Dcras_client.c223 int server_fd; member
462 poll_fd->fd = client->server_fd; in server_fill_pollfd()
508 if (client->server_fd == -1) { in error_delay_next_action()
509 client->server_fd = timerfd_create(CLOCK_MONOTONIC, in error_delay_next_action()
511 if (client->server_fd == -1) { in error_delay_next_action()
522 rc = timerfd_settime(client->server_fd, 0, &timeout, NULL); in error_delay_next_action()
536 close(client->server_fd); in error_delay_next_action()
537 client->server_fd = -1; in error_delay_next_action()
576 if (client->server_fd == -1) { in wait_for_writable_next_action()
577 client->server_fd = socket(PF_UNIX, SOCK_SEQPACKET, 0); in wait_for_writable_next_action()
[all …]
/external/google-breakpad/src/client/linux/handler/
Dexception_handler.h132 const int server_fd);
Dexception_handler.cc224 const int server_fd) in ExceptionHandler() argument
230 if (server_fd >= 0) in ExceptionHandler()
231 crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd)); in ExceptionHandler()
/external/adhd/cras/src/tests/
Dcras_client_unittest.cc293 client_.server_fd = serv_fds[1]; in TEST_F()
/external/curl/lib/vtls/
Dmbedtls.c78 int server_fd; member