Home
last modified time | relevance | path

Searched refs:SOCK_CLOEXEC (Results 1 – 25 of 46) 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.cpp90 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
108 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
Dnetlink_listener_test.cpp116 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/logging/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 doSIOCGIF()
97 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()
DNetlinkCommands.cpp35 int sock = socket(AF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, protocol); in openNetlinkSocket()
/system/vold/
DNetlinkManager.cpp57 if ((mSock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT)) < 0) { in start()
/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/bpf/libbpf_android/
DBpfUtils.cpp67 int pfSocket = socket(AF_KEY, SOCK_RAW | SOCK_CLOEXEC, PF_KEY_V2); in synchronizeKernelRCU()
/system/core/libstats/push_compat/
Dstatsd_writer.c83 #ifdef SOCK_CLOEXEC in statsdOpen()
84 flags |= SOCK_CLOEXEC; in statsdOpen()
/system/memory/lmkd/
Dliblmkd_utils.cpp31 SOCK_SEQPACKET | SOCK_CLOEXEC); in lmkd_connect()
/system/core/init/
Dproperty_service_test.cpp37 int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST()
Dfirmware_handler.cpp109 if (!Socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, &child_stdout, &parent_stdout)) { in RunExternalHandler()
115 if (!Socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, &child_stderr, &parent_stderr)) { in RunExternalHandler()
/system/logging/logd/
Dlibaudit.cpp159 return socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_AUDIT); in audit_open()
/system/memory/libmemunreachable/
DLeakPipe.h39 int ret = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, sv_); in LeakPipe()
/system/logging/liblog/
Dlogd_writer.cpp91 int flags = SOCK_DGRAM | SOCK_CLOEXEC; in GetSocket()
/system/core/libnetutils/
Difc_utils.c131 ifc_ctl_sock = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); in ifc_init()
146 ifc_ctl_sock6 = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0); in ifc_init6()
335 s = socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC, NETLINK_ROUTE); in ifc_act_on_address()

12