Home
last modified time | relevance | path

Searched refs:sockfd (Results 1 – 21 of 21) 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/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.cpp129 unique_fd sockfd; in debuggerd_trigger_dump() local
132 auto set_timeout = [timeout_ms, &time_left](int sockfd) { in debuggerd_trigger_dump() argument
134 return sockfd; in debuggerd_trigger_dump()
146 if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)) != 0) { in debuggerd_trigger_dump()
150 if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) != 0) { in debuggerd_trigger_dump()
155 return sockfd; in debuggerd_trigger_dump()
158 sockfd.reset(socket(AF_LOCAL, SOCK_SEQPACKET, 0)); in debuggerd_trigger_dump()
159 if (sockfd == -1) { in debuggerd_trigger_dump()
164 if (socket_local_client_connect(set_timeout(sockfd.get()), kTombstonedInterceptSocketName, in debuggerd_trigger_dump()
174 if (!set_timeout(sockfd)) { in debuggerd_trigger_dump()
[all …]
/system/netd/client/
DNetdClient.cpp126 int netdClientAccept4(int sockfd, sockaddr* addr, socklen_t* addrlen, int flags) { in netdClientAccept4() argument
127 int acceptedSocket = libcAccept4(sockfd, addr, addrlen, flags); in netdClientAccept4()
149 int netdClientConnect(int sockfd, const sockaddr* addr, socklen_t addrlen) { in netdClientConnect() argument
150 const bool shouldSetFwmark = shouldMarkSocket(sockfd, addr); in netdClientConnect()
156 error = FwmarkClient().send(&command, sockfd, &connectInfo); in netdClientConnect()
158 error = FwmarkClient().send(&command, sockfd, nullptr); in netdClientConnect()
168 const int ret = libcConnect(sockfd, addr, addrlen); in netdClientConnect()
179 FwmarkClient().send(&command, sockfd, &connectInfo); in netdClientConnect()
204 int netdClientSendmmsg(int sockfd, const mmsghdr* msgs, unsigned int msgcount, int flags) { in netdClientSendmmsg() argument
205 if (propertyValueIsTrue(PROPERTY_REDIRECT_SOCKET_CALLS_HOOKED) && !checkSocket(sockfd)) { in netdClientSendmmsg()
[all …]
/system/libbase/
Dabi_compatibility.cpp33 ssize_t SendFileDescriptorVector(int sockfd, const void* data, size_t len, in SendFileDescriptorVector() argument
35 return SendFileDescriptorVector(borrowed_fd(sockfd), data, len, fds); in SendFileDescriptorVector()
38 ssize_t ReceiveFileDescriptorVector(int sockfd, void* data, size_t len, size_t max_fds, in ReceiveFileDescriptorVector() argument
40 return ReceiveFileDescriptorVector(borrowed_fd(sockfd), data, len, max_fds, fds); in ReceiveFileDescriptorVector()
Dcmsg.cpp32 ssize_t SendFileDescriptorVector(borrowed_fd sockfd, const void* data, size_t len, in SendFileDescriptorVector() argument
71 return TEMP_FAILURE_RETRY(sendmsg(sockfd.get(), &msg, flags)); in SendFileDescriptorVector()
74 ssize_t ReceiveFileDescriptorVector(borrowed_fd sockfd, void* data, size_t len, size_t max_fds, in ReceiveFileDescriptorVector() argument
103 ssize_t rc = TEMP_FAILURE_RETRY(recvmsg(sockfd.get(), &msg, flags)); in ReceiveFileDescriptorVector()
/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/bt/gd/shim/
Ddumpsys_test.cc86 int GetSocketBufferSize(int sockfd) { in GetSocketBufferSize() argument
89 getsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, (void*)&socket_buffer_size, &optlen); in GetSocketBufferSize()
93 void SetSocketBufferSize(int sockfd, int socket_buffer_size) { in SetSocketBufferSize() argument
95 … ASSERT_EQ(0, setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF, (const void*)&socket_buffer_size, optlen)); in SetSocketBufferSize()
/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/libbase/include/android-base/
Dunique_fd.h224 int sockfd[2]; in Socketpair() local
225 if (socketpair(domain, type, protocol, sockfd) != 0) { in Socketpair()
228 left->reset(sockfd[0]); in Socketpair()
229 right->reset(sockfd[1]); in Socketpair()
/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.cpp1253 unique_fd sockfd(socket_local_client(kTombstonedCrashSocketName, in TEST() local
1255 if (sockfd == -1) { in TEST()
1261 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { in TEST()