/system/core/libcutils/ |
D | debugger.c | 32 static int send_request(int sock_fd, void* msg_ptr, size_t msg_len) { in send_request() argument 34 if (TEMP_FAILURE_RETRY(write(sock_fd, msg_ptr, msg_len)) != (ssize_t) msg_len) { in send_request() 38 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) != 1) { in send_request() 51 int sock_fd = socket_local_client(DEBUGGER_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, in make_dump_request() local 53 if (sock_fd < 0) { in make_dump_request() 61 if (setsockopt(sock_fd, SOL_SOCKET, SO_RCVTIMEO, &tm, sizeof(tm)) == -1) { in make_dump_request() 65 if (setsockopt(sock_fd, SOL_SOCKET, SO_SNDTIMEO, &tm, sizeof(tm)) == -1) { in make_dump_request() 70 if (send_request(sock_fd, &msg, sizeof(msg)) < 0) { in make_dump_request() 71 close(sock_fd); in make_dump_request() 75 return sock_fd; in make_dump_request() [all …]
|
/system/bt/btif/src/ |
D | btif_sock.c | 37 …t type, const char *service_name, const uint8_t *uuid, int channel, int *sock_fd, int flags, int a… 38 …r_t *bd_addr, btsock_type_t type, const uint8_t *uuid, int channel, int *sock_fd, int flags, int a… 120 …const char *service_name, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int a… in btsock_listen() argument 123 assert(sock_fd != NULL); in btsock_listen() 126 *sock_fd = INVALID_FD; in btsock_listen() 131 status = btsock_rfc_listen(service_name, service_uuid, channel, sock_fd, flags, app_uid); in btsock_listen() 134 status = btsock_l2cap_listen(service_name, channel, sock_fd, flags, app_uid); in btsock_listen() 138 status = btsock_sco_listen(sock_fd, flags); in btsock_listen() 149 …r_t *bd_addr, btsock_type_t type, const uint8_t *uuid, int channel, int *sock_fd, int flags, int a… in btsock_connect() argument 152 assert(sock_fd != NULL); in btsock_connect() [all …]
|
D | btif_sock_util.c | 58 int sock_send_all(int sock_fd, const uint8_t* buf, int len) in sock_send_all() argument 65 OSI_NO_INTR(ret = send(sock_fd, buf, s, 0)); in sock_send_all() 68 BTIF_TRACE_ERROR("sock fd:%d send errno:%d, ret:%d", sock_fd, errno, ret); in sock_send_all() 76 int sock_recv_all(int sock_fd, uint8_t* buf, int len) in sock_recv_all() argument 83 OSI_NO_INTR(ret = recv(sock_fd, buf, r, MSG_WAITALL)); in sock_recv_all() 86 BTIF_TRACE_ERROR("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret); in sock_recv_all() 95 int sock_send_fd(int sock_fd, const uint8_t* buf, int len, int send_fd) in sock_send_fd() argument 104 if(sock_fd == -1 || send_fd == -1) in sock_send_fd() 129 OSI_NO_INTR(ret = sendmsg(sock_fd, &msg, MSG_NOSIGNAL)); in sock_send_fd() 132 sock_fd, send_fd, (int)ret, errno, strerror(errno)); in sock_send_fd()
|
D | btif_sock_sco.c | 76 …socket_t *sco_socket_establish_locked(bool is_listening, const bt_bdaddr_t *bd_addr, int *sock_fd); 114 bt_status_t btsock_sco_listen(int *sock_fd, UNUSED_ATTR int flags) { in btsock_sco_listen() argument 115 assert(sock_fd != NULL); in btsock_sco_listen() 119 sco_socket_t *sco_socket = sco_socket_establish_locked(true, NULL, sock_fd); in btsock_sco_listen() 130 bt_status_t btsock_sco_connect(const bt_bdaddr_t *bd_addr, int *sock_fd, UNUSED_ATTR int flags) { in btsock_sco_connect() argument 132 assert(sock_fd != NULL); in btsock_sco_connect() 135 sco_socket_t *sco_socket = sco_socket_establish_locked(false, bd_addr, sock_fd); in btsock_sco_connect() 142 …ocket_t *sco_socket_establish_locked(bool is_listening, const bt_bdaddr_t *bd_addr, int *sock_fd) { in sco_socket_establish_locked() argument 169 *sock_fd = pair[0]; // Transfer ownership of one end to caller. in sco_socket_establish_locked()
|
D | btif_sock_rfc.c | 263 …const char *service_name, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int a… in btsock_rfc_listen() argument 264 assert(sock_fd != NULL); in btsock_rfc_listen() 269 *sock_fd = INVALID_FD; in btsock_rfc_listen() 300 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. in btsock_rfc_listen() 319 …nst bt_bdaddr_t *bd_addr, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int a… in btsock_rfc_connect() argument 320 assert(sock_fd != NULL); in btsock_rfc_connect() 323 *sock_fd = INVALID_FD; in btsock_rfc_connect() 367 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. in btsock_rfc_connect()
|
D | btif_sock_l2cap.c | 892 int channel, int* sock_fd, int flags, char listen, int app_uid) in btsock_l2cap_listen_or_connect() argument 900 if (!sock_fd) in btsock_l2cap_listen_or_connect() 966 *sock_fd = sock->app_fd; in btsock_l2cap_listen_or_connect() 982 bt_status_t btsock_l2cap_listen(const char* name, int channel, int* sock_fd, int flags, int app_uid) in btsock_l2cap_listen() argument 984 return btsock_l2cap_listen_or_connect(name, NULL, channel, sock_fd, flags, 1, app_uid); in btsock_l2cap_listen() 987 bt_status_t btsock_l2cap_connect(const bt_bdaddr_t *bd_addr, int channel, int* sock_fd, int flags, … in btsock_l2cap_connect() argument 989 return btsock_l2cap_listen_or_connect(NULL, bd_addr, channel, sock_fd, flags, 0, app_uid); in btsock_l2cap_connect()
|
/system/bt/btif/include/ |
D | btif_sock_util.h | 34 int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd); 35 int sock_send_all(int sock_fd, const uint8_t* buf, int len); 36 int sock_recv_all(int sock_fd, uint8_t* buf, int len);
|
D | btif_sock_sco.h | 27 bt_status_t btsock_sco_listen(int *sock_fd, int flags); 28 bt_status_t btsock_sco_connect(const bt_bdaddr_t *bd_addr, int *sock_fd, int flags);
|
D | btif_sock_rfc.h | 35 int* sock_fd, int flags, int app_uid); 37 int channel, int* sock_fd, int flags, int app_uid);
|
D | btif_sock_l2cap.h | 18 int* sock_fd, int flags, int app_uid); 20 int channel, int* sock_fd, int flags, int app_uid);
|
/system/connectivity/shill/ |
D | connection_health_checker.h | 113 void set_sock_fd(int sock_fd) { sock_fd_ = sock_fd; } in set_sock_fd() argument 184 void OnConnectionComplete(bool success, int sock_fd); 187 bool GetSocketInfo(int sock_fd, SocketInfo* sock_info); 189 void SetSocketDescriptor(int sock_fd);
|
D | connection_health_checker.cc | 295 void ConnectionHealthChecker::OnConnectionComplete(bool success, int sock_fd) { in OnConnectionComplete() argument 306 SetSocketDescriptor(sock_fd); in OnConnectionComplete() 385 bool ConnectionHealthChecker::GetSocketInfo(int sock_fd, in GetSocketInfo() argument 390 if (socket_->GetSockName(sock_fd, in GetSocketInfo() 460 void ConnectionHealthChecker::SetSocketDescriptor(int sock_fd) { in SetSocketDescriptor() argument 465 sock_fd_ = sock_fd; in SetSocketDescriptor()
|
D | connection_health_checker_unittest.cc | 115 void InvokeOnConnectionComplete(bool success, int sock_fd) { in InvokeOnConnectionComplete() argument 116 health_checker_->OnConnectionComplete(success, sock_fd); in InvokeOnConnectionComplete()
|
/system/bt/tools/bdtool/ |
D | bdtool.c | 210 int sock_fd = INVALID_FD; in main() local 211 error = sock->listen(BTSOCK_SCO, NULL, NULL, 5, &sock_fd, 0, app_uid); in main() 242 int sock_fd = INVALID_FD; in main() local 243 error = sock->connect(&bt_remote_bdaddr, BTSOCK_SCO, NULL, 5, &sock_fd, 0, app_uid); in main()
|
/system/core/debuggerd/ |
D | debuggerd.cpp | 376 int sock_fd = socket_local_client(DEBUGGER32_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, in redirect_to_32() local 378 if (sock_fd < 0) { in redirect_to_32() 383 if (TEMP_FAILURE_RETRY(write(sock_fd, &msg, sizeof(msg))) != (ssize_t) sizeof(msg)) { in redirect_to_32() 385 close(sock_fd); in redirect_to_32() 390 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) == -1) { in redirect_to_32() 392 close(sock_fd); in redirect_to_32() 398 while ((bytes_read = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) { in redirect_to_32() 419 close(sock_fd); in redirect_to_32()
|