Home
last modified time | relevance | path

Searched refs:SOCK_CLOEXEC (Results 1 – 25 of 50) sorted by relevance

12

/system/netd/tests/
Dnetd_client_test.cpp41 android::base::unique_fd sock(socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP)); in checkNetworkConnectivity()
49 sock.reset(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP)); in checkNetworkConnectivity()
61 android::base::unique_fd ipv4(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)), in expectHasNetworking()
62 ipv6(socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectHasNetworking()
80 android::base::unique_fd unixSocket(socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNoNetworking()
82 android::base::unique_fd ipv4(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNoNetworking()
85 android::base::unique_fd ipv6(socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNoNetworking()
Dbpf_base_test.cpp104 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
124 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
Dnetlink_listener_test.cpp120 fds[i] = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); in checkMassiveSocketDestroy()
/system/netd/client/
DNetdClientTest.cpp64 android::base::unique_fd ipv4(socketFuncPtr(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)), in expectAllowNetworkingForProcess()
65 ipv6(socketFuncPtr(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectAllowNetworkingForProcess()
76 android::base::unique_fd unixSocket(socketFuncPtr(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess()
78 android::base::unique_fd ipv4(socketFuncPtr(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess()
81 android::base::unique_fd ipv6(socketFuncPtr(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0)); in expectNotAllowNetworkingForProcess()
122 int s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST()
129 int s = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST()
DFwmarkClient.cpp74 mChannel = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); in send()
/system/core/libcutils/
Dandroid_get_control_socket_test.cpp31 #ifndef SOCK_CLOEXEC
32 #define SOCK_CLOEXEC 0 macro
43 ASSERT_GE(fd = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0), 0); in TEST()
Duevent.cpp107 s = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT); in uevent_open_socket()
/system/netd/tests/benchmarks/
Dconnect_benchmark.cpp100 const int listensocket = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in ipv4_loopback()
112 int sock = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); in ipv4_loopback()
136 int accepted = accept4(listensocket, (sockaddr*) &client, &clientlen, SOCK_CLOEXEC); in ipv4_loopback()
157 const int listensocket = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in ipv6_loopback()
169 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in ipv6_loopback()
193 int accepted = accept4(listensocket, (sockaddr*) &client, &clientlen, SOCK_CLOEXEC); in ipv6_loopback()
/system/core/liblog/tests/
Dlogd_writer_test.cpp42 server_socket.reset(TEMP_FAILURE_RETRY(socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0))); in TEST()
58 unique_fd{TEMP_FAILURE_RETRY(socket(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0))}; in TEST()
/system/netd/server/
DSockDiagTest.cpp76 int v4socket = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
78 int v6socket = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
80 int listensocket = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
97 listensocket, (sockaddr *) &client46, &clientlen, SOCK_CLOEXEC); in TEST_F()
99 listensocket, (sockaddr *) &client6, &clientlen, SOCK_CLOEXEC); in TEST_F()
463 int listensocket = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_P()
479 int s = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_P()
485 listensocket, (sockaddr *) &client, &clientlen, SOCK_CLOEXEC); in TEST_P()
DXfrmControllerTest.cpp144 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F()
166 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F()
182 unique_fd sockFd(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in TEST_F()
193 unique_fd sockFd(socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in TEST_F()
484 unique_fd sock(socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0)); in TEST_F()
516 unique_fd sock(socket(sockFamily, SOCK_STREAM | SOCK_CLOEXEC, 0)); in TEST_P()
553 unique_fd sock(socket(family, SOCK_STREAM | SOCK_CLOEXEC, 0)); in TEST_P()
DOffloadUtils.cpp42 base::unique_fd ufd(socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)); in hardwareAddressType()
87 base::unique_fd fd(socket(AF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE)); in sendAndProcessNetlinkResponse()
DNetlinkManager.cpp80 if ((*sock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, netlinkFamily)) < 0) { in setupSocket()
/system/core/adb/libs/adbconnection/
Dadbconnection_server.cpp46 unique_fd s(socket(AF_UNIX, SOCK_SEQPACKET | SOCK_NONBLOCK | SOCK_CLOEXEC, 0)); in adbconnection_listen()
83 TEMP_FAILURE_RETRY(accept4(s.get(), nullptr, nullptr, SOCK_NONBLOCK | SOCK_CLOEXEC))); in adbconnection_listen()
Dadbconnection_client.cpp95 ctx->control_socket_.reset(socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0)); in adbconnection_client_new()
/system/core/libsysutils/src/
DSocketListener_test.cpp49 unique_fd fd(socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in serverSocket()
63 unique_fd fd(socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0)); in clientSocket()
/system/vold/
DNetlinkManager.cpp57 if ((mSock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT)) < 0) { in start()
/system/core/libstats/push_compat/
Dstatsd_writer.c83 #ifdef SOCK_CLOEXEC in statsdOpen()
84 flags |= SOCK_CLOEXEC; in statsdOpen()
/system/core/libstats/socket/
Dstatsd_writer.c85 #ifdef SOCK_CLOEXEC in statsdOpen()
86 flags |= SOCK_CLOEXEC; in statsdOpen()
/system/core/init/
Dproperty_service_test.cpp36 int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST()
Dfirmware_handler.cpp76 if (!Socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, &child_stdout, &parent_stdout)) { in RunExternalHandler()
82 if (!Socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, &child_stderr, &parent_stderr)) { in RunExternalHandler()
/system/memory/lmkd/
Dliblmkd_utils.cpp31 SOCK_SEQPACKET | SOCK_CLOEXEC); in lmkd_connect()
/system/bpf/libbpf_android/
DBpfUtils.cpp68 int pfSocket = socket(AF_KEY, SOCK_RAW | SOCK_CLOEXEC, PF_KEY_V2); in synchronizeKernelRCU()
/system/memory/libmemunreachable/
DLeakPipe.h39 int ret = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv_); in LeakPipe()
/system/core/logd/
Dlibaudit.c187 return socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_AUDIT); in audit_open()

12