Home
last modified time | relevance | path

Searched refs:sock_fd (Results 1 – 11 of 11) sorted by relevance

/system/bt/btif/src/
Dbtif_sock_util.cc50 int sock_send_all(int sock_fd, const uint8_t* buf, int len) { in sock_send_all() argument
55 OSI_NO_INTR(ret = send(sock_fd, buf, s, 0)); in sock_send_all()
57 BTIF_TRACE_ERROR("sock fd:%d send errno:%d, ret:%d", sock_fd, errno, ret); in sock_send_all()
65 int sock_recv_all(int sock_fd, uint8_t* buf, int len) { in sock_recv_all() argument
70 OSI_NO_INTR(ret = recv(sock_fd, buf, r, MSG_WAITALL)); in sock_recv_all()
72 BTIF_TRACE_ERROR("sock fd:%d recv errno:%d, ret:%d", sock_fd, errno, ret); in sock_recv_all()
81 int sock_send_fd(int sock_fd, const uint8_t* buf, int len, int send_fd) { in sock_send_fd() argument
89 if (sock_fd == -1 || send_fd == -1) return -1; in sock_send_fd()
113 OSI_NO_INTR(ret = sendmsg(sock_fd, &msg, MSG_NOSIGNAL)); in sock_send_fd()
116 sock_fd, send_fd, (int)ret, errno, strerror(errno)); in sock_send_fd()
Dbtif_sock.cc46 const Uuid* uuid, int channel, int* sock_fd,
49 const Uuid* uuid, int channel, int* sock_fd,
132 int* sock_fd, int flags, int app_uid) { in btsock_listen() argument
134 CHECK(sock_fd != NULL); in btsock_listen()
137 *sock_fd = INVALID_FD; in btsock_listen()
148 status = btsock_rfc_listen(service_name, service_uuid, channel, sock_fd, in btsock_listen()
153 btsock_l2cap_listen(service_name, channel, sock_fd, flags, app_uid); in btsock_listen()
170 btsock_l2cap_listen(service_name, channel, sock_fd, flags, app_uid); in btsock_listen()
173 status = btsock_sco_listen(sock_fd, flags); in btsock_listen()
192 const Uuid* uuid, int channel, int* sock_fd, in btsock_connect() argument
[all …]
Dbtif_sock_sco.cc64 int* sock_fd);
100 bt_status_t btsock_sco_listen(int* sock_fd, UNUSED_ATTR int flags) { in btsock_sco_listen() argument
101 CHECK(sock_fd != NULL); in btsock_sco_listen()
105 sco_socket_t* sco_socket = sco_socket_establish_locked(true, NULL, sock_fd); in btsock_sco_listen()
114 bt_status_t btsock_sco_connect(const RawAddress* bd_addr, int* sock_fd, in btsock_sco_connect() argument
117 CHECK(sock_fd != NULL); in btsock_sco_connect()
121 sco_socket_establish_locked(false, bd_addr, sock_fd); in btsock_sco_connect()
129 int* sock_fd) { in sco_socket_establish_locked() argument
163 *sock_fd = pair[0]; // Transfer ownership of one end to caller. in sco_socket_establish_locked()
Dbtif_sock_rfc.cc267 int* sock_fd, int flags, int app_uid) { in btsock_rfc_listen() argument
268 CHECK(sock_fd != NULL); in btsock_rfc_listen()
273 *sock_fd = INVALID_FD; in btsock_rfc_listen()
305 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. in btsock_rfc_listen()
324 int* sock_fd, int flags, int app_uid) { in btsock_rfc_connect() argument
325 CHECK(sock_fd != NULL); in btsock_rfc_connect()
328 *sock_fd = INVALID_FD; in btsock_rfc_connect()
371 *sock_fd = slot->app_fd; // Transfer ownership of fd to caller. in btsock_rfc_connect()
Dbtif_sock_l2cap.cc731 int channel, int* sock_fd, in btsock_l2cap_listen_or_connect() argument
736 if (!sock_fd) { in btsock_l2cap_listen_or_connect()
777 *sock_fd = sock->app_fd; in btsock_l2cap_listen_or_connect()
790 bt_status_t btsock_l2cap_listen(const char* name, int channel, int* sock_fd, in btsock_l2cap_listen() argument
792 return btsock_l2cap_listen_or_connect(name, NULL, channel, sock_fd, flags, 1, in btsock_l2cap_listen()
797 int* sock_fd, int flags, int app_uid) { in btsock_l2cap_connect() argument
798 return btsock_l2cap_listen_or_connect(NULL, bd_addr, channel, sock_fd, flags, in btsock_l2cap_connect()
/system/bt/btif/include/
Dbtif_sock_util.h32 int sock_send_fd(int sock_fd, const uint8_t* buffer, int len, int send_fd);
33 int sock_send_all(int sock_fd, const uint8_t* buf, int len);
34 int sock_recv_all(int sock_fd, uint8_t* buf, int len);
Dbtif_sock_sco.h27 bt_status_t btsock_sco_listen(int* sock_fd, int flags);
28 bt_status_t btsock_sco_connect(const RawAddress* bd_addr, int* sock_fd,
Dbtif_sock_l2cap.h14 bt_status_t btsock_l2cap_listen(const char* name, int channel, int* sock_fd,
17 int* sock_fd, int flags, int app_uid);
Dbtif_sock_rfc.h35 int channel, int* sock_fd, int flags,
39 int* sock_fd, int flags, int app_uid);
/system/bt/include/hardware/
Dbt_sock.h72 int* sock_fd, int flags, int callingUid);
82 const bluetooth::Uuid* uuid, int channel, int* sock_fd,
/system/bt/tools/bdtool/
Dbdtool.c224 int sock_fd = INVALID_FD; in main() local
225 error = sock->listen(BTSOCK_SCO, NULL, NULL, 5, &sock_fd, 0, app_uid); in main()
261 int sock_fd = INVALID_FD; in main() local
262 error = sock->connect(&bt_remote_bdaddr, BTSOCK_SCO, NULL, 5, &sock_fd, 0, in main()