Searched defs:sock_fd (Results 1 - 11 of 11) sorted by relevance

/system/bt/btif/src/
H A Dbtif_sock.c37 static bt_status_t btsock_listen(btsock_type_t type, const char *service_name, const uint8_t *uuid, int channel, int *sock_fd, int flags, int app_uid);
38 static bt_status_t btsock_connect(const bt_bdaddr_t *bd_addr, btsock_type_t type, const uint8_t *uuid, int channel, int *sock_fd, int flags, int app_uid);
120 static bt_status_t btsock_listen(btsock_type_t type, const char *service_name, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int app_uid) { argument
123 assert(sock_fd != NULL);
126 *sock_fd = INVALID_FD;
131 status = btsock_rfc_listen(service_name, service_uuid, channel, sock_fd, flags, app_uid);
134 status = btsock_l2cap_listen(service_name, channel, sock_fd, flags, app_uid);
138 status = btsock_sco_listen(sock_fd, flags);
149 static bt_status_t btsock_connect(const bt_bdaddr_t *bd_addr, btsock_type_t type, const uint8_t *uuid, int channel, int *sock_fd, int flags, int app_uid) { argument
152 assert(sock_fd !
[all...]
H A Dbtif_sock_sco.c76 static sco_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) { argument
115 assert(sock_fd != NULL);
119 sco_socket_t *sco_socket = sco_socket_establish_locked(true, NULL, sock_fd);
130 bt_status_t btsock_sco_connect(const bt_bdaddr_t *bd_addr, int *sock_fd, UNUSED_ATTR int flags) { argument
132 assert(sock_fd != NULL);
135 sco_socket_t *sco_socket = sco_socket_establish_locked(false, bd_addr, sock_fd);
142 static sco_socket_t *sco_socket_establish_locked(bool is_listening, const bt_bdaddr_t *bd_addr, int *sock_fd) { argument
169 *sock_fd = pair[0]; // Transfer ownership of one end to caller.
H A Dbtif_sock_util.c58 int sock_send_all(int sock_fd, const uint8_t* buf, int len) argument
65 OSI_NO_INTR(ret = send(sock_fd, buf, s, 0));
68 BTIF_TRACE_ERROR("sock fd:%d send errno:%d, ret:%d", sock_fd, errno, ret);
76 int sock_recv_all(int sock_fd, uint8_t* buf, int len) argument
83 OSI_NO_INTR(ret = recv(sock_fd, buf, r, MSG_WAITALL));
86 BTIF_TRACE_ERROR("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret);
95 int sock_send_fd(int sock_fd, const uint8_t* buf, int len, int send_fd) argument
104 if(sock_fd == -1 || send_fd == -1)
129 OSI_NO_INTR(ret = sendmsg(sock_fd, &msg, MSG_NOSIGNAL));
132 sock_fd, send_f
[all...]
H A Dbtif_sock_rfc.c263 bt_status_t btsock_rfc_listen(const char *service_name, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int app_uid) { argument
264 assert(sock_fd != NULL);
269 *sock_fd = INVALID_FD;
300 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller.
319 bt_status_t btsock_rfc_connect(const bt_bdaddr_t *bd_addr, const uint8_t *service_uuid, int channel, int *sock_fd, int flags, int app_uid) { argument
320 assert(sock_fd != NULL);
323 *sock_fd = INVALID_FD;
367 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller.
H A Dbtif_sock_l2cap.c892 int channel, int* sock_fd, int flags, char listen, int app_uid)
900 if (!sock_fd)
966 *sock_fd = sock->app_fd;
982 bt_status_t btsock_l2cap_listen(const char* name, int channel, int* sock_fd, int flags, int app_uid) argument
984 return btsock_l2cap_listen_or_connect(name, NULL, channel, sock_fd, flags, 1, app_uid);
987 bt_status_t btsock_l2cap_connect(const bt_bdaddr_t *bd_addr, int channel, int* sock_fd, int flags, int app_uid) argument
989 return btsock_l2cap_listen_or_connect(NULL, bd_addr, channel, sock_fd, flags, 0, app_uid);
891 btsock_l2cap_listen_or_connect(const char *name, const bt_bdaddr_t *addr, int channel, int* sock_fd, int flags, char listen, int app_uid) argument
/system/core/libcutils/
H A Ddebugger.c32 static int send_request(int sock_fd, void* msg_ptr, size_t msg_len) { argument
34 if (TEMP_FAILURE_RETRY(write(sock_fd, msg_ptr, msg_len)) != (ssize_t) msg_len) {
38 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) != 1) {
51 int sock_fd = socket_local_client(DEBUGGER_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, local
53 if (sock_fd < 0) {
61 if (setsockopt(sock_fd, SOL_SOCKET, SO_RCVTIMEO, &tm, sizeof(tm)) == -1) {
65 if (setsockopt(sock_fd, SOL_SOCKET, SO_SNDTIMEO, &tm, sizeof(tm)) == -1) {
70 if (send_request(sock_fd, &msg, sizeof(msg)) < 0) {
71 close(sock_fd);
75 return sock_fd;
83 int sock_fd = make_dump_request(DEBUGGER_ACTION_DUMP_BACKTRACE, tid, timeout_secs); local
107 int sock_fd = make_dump_request(DEBUGGER_ACTION_DUMP_TOMBSTONE, tid, timeout_secs); local
[all...]
/system/bt/tools/bdtool/
H A Dbdtool.c210 int sock_fd = INVALID_FD; local
211 error = sock->listen(BTSOCK_SCO, NULL, NULL, 5, &sock_fd, 0, app_uid);
242 int sock_fd = INVALID_FD; local
243 error = sock->connect(&bt_remote_bdaddr, BTSOCK_SCO, NULL, 5, &sock_fd, 0, app_uid);
/system/connectivity/shill/
H A Dconnection_health_checker.cc295 void ConnectionHealthChecker::OnConnectionComplete(bool success, int sock_fd) { argument
306 SetSocketDescriptor(sock_fd);
385 bool ConnectionHealthChecker::GetSocketInfo(int sock_fd, argument
390 if (socket_->GetSockName(sock_fd,
460 void ConnectionHealthChecker::SetSocketDescriptor(int sock_fd) { argument
465 sock_fd_ = sock_fd;
H A Dconnection_health_checker.h113 void set_sock_fd(int sock_fd) { sock_fd_ = 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);
H A Dconnection_health_checker_unittest.cc115 void InvokeOnConnectionComplete(bool success, int sock_fd) { argument
116 health_checker_->OnConnectionComplete(success, sock_fd);
/system/core/debuggerd/
H A Ddebuggerd.cpp376 int sock_fd = socket_local_client(DEBUGGER32_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, local
378 if (sock_fd < 0) {
383 if (TEMP_FAILURE_RETRY(write(sock_fd, &msg, sizeof(msg))) != (ssize_t) sizeof(msg)) {
385 close(sock_fd);
390 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) == -1) {
392 close(sock_fd);
398 while ((bytes_read = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) {
419 close(sock_fd);

Completed in 478 milliseconds