Home
last modified time | relevance | path

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

/system/core/debuggerd/tombstoned/
Dintercept_manager.cpp38 static void intercept_close_cb(evutil_socket_t sockfd, short event, void* arg) { in intercept_close_cb() argument
42 CHECK_EQ(sockfd, intercept->sockfd.get()); in intercept_close_cb()
84 static void intercept_request_cb(evutil_socket_t sockfd, short ev, void* arg) { in intercept_request_cb() argument
88 CHECK_EQ(sockfd, intercept->sockfd.get()); in intercept_request_cb()
102 ReceiveFileDescriptors(sockfd, &intercept_request, sizeof(intercept_request), &rcv_fd); in intercept_request_cb()
126 TEMP_FAILURE_RETRY(write(sockfd, &response, sizeof(response))); in intercept_request_cb()
140 TEMP_FAILURE_RETRY(write(sockfd, &response, sizeof(response))); in intercept_request_cb()
149 if (TEMP_FAILURE_RETRY(write(sockfd, &response, sizeof(response))) == -1) { in intercept_request_cb()
163 event_assign(intercept->intercept_event, intercept_manager->base, sockfd, EV_READ | EV_TIMEOUT, in intercept_request_cb()
176 static void intercept_accept_cb(evconnlistener* listener, evutil_socket_t sockfd, sockaddr*, int, in intercept_accept_cb() argument
[all …]
Dtombstoned_client.cpp37 unique_fd sockfd( in tombstoned_connect() local
41 if (sockfd == -1) { in tombstoned_connect()
51 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { in tombstoned_connect()
58 ssize_t rc = ReceiveFileDescriptors(sockfd, &packet, sizeof(packet), &tmp_output_fd); in tombstoned_connect()
80 *tombstoned_socket = std::move(sockfd); in tombstoned_connect()
Dtombstoned.cpp208 static void crash_accept_cb(evconnlistener* listener, evutil_socket_t sockfd, sockaddr*, int, void*…
209 static void crash_request_cb(evutil_socket_t sockfd, short ev, void* arg);
210 static void crash_completed_cb(evutil_socket_t sockfd, short ev, void* arg);
256 static void crash_accept_cb(evconnlistener* listener, evutil_socket_t sockfd, sockaddr*, int, in crash_accept_cb() argument
264 event* crash_event = event_new(base, sockfd, EV_TIMEOUT | EV_READ, crash_request_cb, crash); in crash_accept_cb()
265 crash->crash_socket_fd.reset(sockfd); in crash_accept_cb()
270 static void crash_request_cb(evutil_socket_t sockfd, short ev, void* arg) { in crash_request_cb() argument
284 rc = TEMP_FAILURE_RETRY(read(sockfd, &request, sizeof(request))); in crash_request_cb()
314 int ret = getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cr, &len); in crash_request_cb()
337 static void crash_completed_cb(evutil_socket_t sockfd, short ev, void* arg) { in crash_completed_cb() argument
[all …]
Dintercept_manager.h39 android::base::unique_fd sockfd; member
/system/core/libcutils/
Dqtaguid.cpp94 int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { in qtaguid_tagSocket() argument
100 int res = fcntl(sockfd, F_GETFD); in qtaguid_tagSocket()
103 ALOGV("Tagging socket %d with tag %u for uid %d", sockfd, tag, uid); in qtaguid_tagSocket()
104 return getHandler().netdTagSocket(sockfd, tag, uid); in qtaguid_tagSocket()
107 int qtaguid_untagSocket(int sockfd) { in qtaguid_untagSocket() argument
111 int res = fcntl(sockfd, F_GETFD); in qtaguid_untagSocket()
114 ALOGV("Untagging socket %d", sockfd); in qtaguid_untagSocket()
115 return getHandler().netdUntagSocket(sockfd); in qtaguid_untagSocket()
/system/extras/simpleperf/
DUnixSocket.cpp51 int sockfd = socket(AF_UNIX, SOCK_STREAM, 0); in Create() local
52 if (sockfd < 0) { in Create()
60 if (bind(sockfd, reinterpret_cast<sockaddr*>(&serv_addr), sizeof(serv_addr)) < in Create()
65 if (listen(sockfd, 1) < 0) { in Create()
70 new UnixSocketServer(sockfd, server_path)); in Create()
76 int sockfd = accept(server_fd_, nullptr, nullptr); in AcceptConnection() local
77 if (sockfd < 0) { in AcceptConnection()
82 new UnixSocketConnection(sockfd)); in AcceptConnection()
87 int sockfd = socket(AF_UNIX, SOCK_STREAM, 0); in Connect() local
88 if (sockfd < 0) { in Connect()
[all …]
/system/core/libqtaguid/
Dqtaguid.c80 int legacy_tagSocket(int sockfd, int tag, uid_t uid) { in legacy_tagSocket() argument
87 snprintf(lineBuf, sizeof(lineBuf), "t %d %" PRIu64 " %d", sockfd, kTag, uid); in legacy_tagSocket()
89 ALOGV("Tagging socket %d with tag %" PRIx64 "{%u,0} for uid %d", sockfd, kTag, tag, uid); in legacy_tagSocket()
93 ALOGI("Tagging socket %d with tag %" PRIx64 "(%d) for uid %d failed errno=%d", sockfd, kTag, in legacy_tagSocket()
100 int legacy_untagSocket(int sockfd) { in legacy_untagSocket() argument
104 ALOGV("Untagging socket %d", sockfd); in legacy_untagSocket()
106 snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd); in legacy_untagSocket()
109 ALOGI("Untagging socket %d failed errno=%d", sockfd, res); in legacy_untagSocket()
/system/core/debuggerd/client/
Ddebuggerd_client.cpp83 unique_fd sockfd; in debuggerd_trigger_dump() local
86 auto set_timeout = [timeout_ms, &time_left](int sockfd) { in debuggerd_trigger_dump() argument
88 return sockfd; in debuggerd_trigger_dump()
100 if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)) != 0) { in debuggerd_trigger_dump()
104 if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) != 0) { in debuggerd_trigger_dump()
109 return sockfd; in debuggerd_trigger_dump()
112 sockfd.reset(socket(AF_LOCAL, SOCK_SEQPACKET, 0)); in debuggerd_trigger_dump()
113 if (sockfd == -1) { in debuggerd_trigger_dump()
118 if (socket_local_client_connect(set_timeout(sockfd.get()), kTombstonedInterceptSocketName, in debuggerd_trigger_dump()
125 if (!set_timeout(sockfd)) { in debuggerd_trigger_dump()
[all …]
/system/core/libqtaguid/include/qtaguid/
Dqtaguid.h33 extern int legacy_tagSocket(int sockfd, int tag, uid_t uid);
38 extern int legacy_untagSocket(int sockfd);
/system/core/libcutils/include/cutils/
Dqtaguid.h29 extern int qtaguid_tagSocket(int sockfd, int tag, uid_t uid);
34 extern int qtaguid_untagSocket(int sockfd);
/system/core/libcutils/include_vndk/cutils/
Dqtaguid.h29 extern int qtaguid_tagSocket(int sockfd, int tag, uid_t uid);
34 extern int qtaguid_untagSocket(int sockfd);
/system/connectivity/wifilogd/
Draw_os.cpp46 ssize_t RawOs::Recv(int sockfd, void* buf, size_t buflen, int flags) { in Recv() argument
47 return recv(sockfd, buf, buflen, flags); in Recv()
Draw_os.h49 virtual ssize_t Recv(int sockfd, void* buf, size_t buflen, int flags);
/system/core/base/
Dcmsg.cpp32 ssize_t SendFileDescriptorVector(int sockfd, const void* data, size_t len, in SendFileDescriptorVector() argument
70 return TEMP_FAILURE_RETRY(sendmsg(sockfd, &msg, flags)); in SendFileDescriptorVector()
73 ssize_t ReceiveFileDescriptorVector(int sockfd, void* data, size_t len, size_t max_fds, in ReceiveFileDescriptorVector() argument
101 ssize_t rc = TEMP_FAILURE_RETRY(recvmsg(sockfd, &msg, flags)); in ReceiveFileDescriptorVector()
/system/core/base/include/android-base/
Dunique_fd.h211 int sockfd[2]; in Socketpair() local
212 if (socketpair(domain, type, protocol, sockfd) != 0) { in Socketpair()
215 left->reset(sockfd[0]); in Socketpair()
216 right->reset(sockfd[1]); in Socketpair()
/system/netd/client/
DNetdClient.cpp96 int netdClientAccept4(int sockfd, sockaddr* addr, socklen_t* addrlen, int flags) { in netdClientAccept4() argument
97 int acceptedSocket = libcAccept4(sockfd, addr, addrlen, flags); in netdClientAccept4()
119 int netdClientConnect(int sockfd, const sockaddr* addr, socklen_t addrlen) { in netdClientConnect() argument
120 const bool shouldSetFwmark = shouldMarkSocket(sockfd, addr); in netdClientConnect()
123 if (int error = FwmarkClient().send(&command, sockfd, nullptr)) { in netdClientConnect()
130 const int ret = libcConnect(sockfd, addr, addrlen); in netdClientConnect()
141 FwmarkClient().send(&command, sockfd, &connectInfo); in netdClientConnect()
/system/connectivity/wifilogd/tests/
Dmock_raw_os.h38 MOCK_METHOD4(Recv, ssize_t(int sockfd, void* buf, size_t buflen, int flags));
/system/bt/service/ipc/
Dlinux_ipc_host.h40 LinuxIPCHost(int sockfd, bluetooth::Adapter* adapter);
Dlinux_ipc_host.cc75 LinuxIPCHost::LinuxIPCHost(int sockfd, Adapter* adapter) in LinuxIPCHost() argument
76 : adapter_(adapter), pfds_(1, {sockfd, POLLIN, 0}) {} in LinuxIPCHost()
/system/core/debuggerd/
Ddebuggerd_test.cpp946 unique_fd sockfd(socket_local_client(kTombstonedCrashSocketName, in TEST() local
948 if (sockfd == -1) { in TEST()
954 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { in TEST()