Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 25 of 64) sorted by relevance

123

/system/bt/osi/src/
Dsocket.c58 ret->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in socket_new()
92 void socket_free(socket_t *socket) { in socket_free() argument
93 if (!socket) in socket_free()
96 socket_unregister(socket); in socket_free()
97 close(socket->fd); in socket_free()
98 osi_free(socket); in socket_free()
101 bool socket_listen(const socket_t *socket, port_t port) { in socket_listen() argument
102 assert(socket != NULL); in socket_listen()
108 if (bind(socket->fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) { in socket_listen()
113 if (listen(socket->fd, 10) == -1) { in socket_listen()
[all …]
/system/bt/btcore/src/
Dcounter.c39 typedef int (*handler_t)(socket_t * socket);
56 socket_t *socket; member
77 static void accept_ready(socket_t *socket, void *context);
78 static void read_ready(socket_t *socket, void *context);
81 static void output(socket_t *socket, const char* format, ...);
84 static int help(socket_t *socket);
85 static int show(socket_t *socket);
86 static int set(socket_t *socket);
87 static int quit(socket_t *socket);
317 socket_t *socket = (socket_t *)context; in monitor_counter_iter_cb() local
[all …]
/system/bt/osi/include/
Dsocket.h30 typedef void (*socket_cb)(socket_t *socket, void *context);
45 void socket_free(socket_t *socket);
50 bool socket_listen(const socket_t *socket, port_t port);
55 socket_t *socket_accept(const socket_t *socket);
65 ssize_t socket_read(const socket_t *socket, void *buf, size_t count);
75 ssize_t socket_write(const socket_t *socket, const void *buf, size_t count);
81 ssize_t socket_write_and_transfer_fd(const socket_t *socket, const void *buf, size_t count, int fd);
90 ssize_t socket_bytes_available(const socket_t *socket);
96 void socket_register(socket_t *socket, reactor_t *reactor, void *context, socket_cb read_cb, socket…
100 void socket_unregister(socket_t *socket);
/system/bt/hci/src/
Dhci_inject.c44 socket_t *socket; member
59 static void accept_ready(socket_t *socket, void *context);
60 static void read_ready(socket_t *socket, void *context);
126 static void accept_ready(socket_t *socket, UNUSED_ATTR void *context) { in accept_ready() argument
127 assert(socket != NULL); in accept_ready()
128 assert(socket == listen_socket); in accept_ready()
130 socket = socket_accept(socket); in accept_ready()
131 if (!socket) in accept_ready()
137 socket_free(socket); in accept_ready()
141 client->socket = socket; in accept_ready()
[all …]
/system/core/adb/
Djdwp_service.cpp128 int socket; member
186 if (proc->socket >= 0) { in jdwp_process_free()
187 adb_shutdown(proc->socket); in jdwp_process_free()
188 adb_close(proc->socket); in jdwp_process_free()
189 proc->socket = -1; in jdwp_process_free()
214 jdwp_process_alloc( int socket ) in jdwp_process_alloc() argument
224 proc->socket = socket; in jdwp_process_alloc()
229 proc->fde = fdevent_create( socket, jdwp_process_event, proc ); in jdwp_process_alloc()
255 jdwp_process_event( int socket, unsigned events, void* _proc ) in jdwp_process_event() argument
266 int len = recv( socket, p, size, 0 ); in jdwp_process_event()
[all …]
Dtransport.cpp366 asocket socket; member
393 device_tracker_close( asocket* socket ) in device_tracker_close() argument
395 device_tracker* tracker = (device_tracker*) socket; in device_tracker_close()
396 asocket* peer = socket->peer; in device_tracker_close()
408 device_tracker_enqueue( asocket* socket, apacket* p ) in device_tracker_enqueue() argument
412 device_tracker_close(socket); in device_tracker_enqueue()
418 asocket* peer = tracker->socket.peer; in device_tracker_send()
426 static void device_tracker_ready(asocket* socket) { in device_tracker_ready() argument
427 device_tracker* tracker = reinterpret_cast<device_tracker*>(socket); in device_tracker_ready()
447 tracker->socket.enqueue = device_tracker_enqueue; in create_device_tracker()
[all …]
/system/core/libsysutils/src/
DNetlinkListener.cpp34 NetlinkListener::NetlinkListener(int socket) : in NetlinkListener() argument
35 SocketListener(socket, false) { in NetlinkListener()
40 NetlinkListener::NetlinkListener(int socket, int format) : in NetlinkListener() argument
41 SocketListener(socket, false), mFormat(format) { in NetlinkListener()
46 int socket = cli->getSocket(); in onDataAvailable() local
55 count = TEMP_FAILURE_RETRY(uevent_kernel_recv(socket, in onDataAvailable()
DSocketClient.cpp16 SocketClient::SocketClient(int socket, bool owned) { in SocketClient() argument
17 init(socket, owned, false); in SocketClient()
20 SocketClient::SocketClient(int socket, bool owned, bool useCmdNum) { in SocketClient() argument
21 init(socket, owned, useCmdNum); in SocketClient()
24 void SocketClient::init(int socket, bool owned, bool useCmdNum) { in init() argument
25 mSocket = socket; in init()
40 int err = getsockopt(socket, SOL_SOCKET, SO_PEERCRED, &creds, &szCreds); in init()
DFrameworkClient.cpp11 FrameworkClient::FrameworkClient(int socket) { in FrameworkClient() argument
12 mSocket = socket; in FrameworkClient()
/system/core/libcutils/
Duevent.c32 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length) in uevent_kernel_multicast_recv() argument
35 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &uid); in uevent_kernel_multicast_recv()
47 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid) in uevent_kernel_multicast_uid_recv() argument
49 return uevent_kernel_recv(socket, buffer, length, true, uid); in uevent_kernel_multicast_uid_recv()
52 ssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid) in uevent_kernel_recv() argument
68 ssize_t n = recvmsg(socket, &hdr, 0); in uevent_kernel_recv()
115 s = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT); in uevent_open_socket()
Dsocket_loopback_client.c46 s = socket(AF_INET, type, 0); in socket_loopback_client()
Dsocket_loopback_server.c45 s = socket(AF_INET, type, 0); in socket_loopback_server()
Dsocket_inaddr_any_server.c45 s = socket(AF_INET, type, 0); in socket_inaddr_any_server()
/system/bt/btif/src/
Dbtif_sock_sco.c57 socket_t *socket; member
75 static void sco_socket_free_locked(sco_socket_t *socket);
80 static void socket_read_ready_cb(socket_t *socket, void *context);
160 socket_t *socket = socket_new_from_fd(pair[1]); in sco_socket_establish_locked() local
161 if (!socket) { in sco_socket_establish_locked()
167 sco_socket->socket = socket; // Hang on to the other end. in sco_socket_establish_locked()
170 socket_register(socket, thread_get_reactor(thread), sco_socket, socket_read_ready_cb, NULL); in sco_socket_establish_locked()
198 socket_free(sco_socket->socket); in sco_socket_free_locked()
252 …if (socket_write_and_transfer_fd(sco_socket->socket, &connect_signal, sizeof(connect_signal), clie… in connection_request_cb()
282 if (!sco_socket->socket) { in connect_completed_cb()
[all …]
/system/extras/tests/net_test/
Dcsocket.py20 import socket
50 raise socket.error(errno, os.strerror(errno))
55 family = socket.AF_INET6
60 addr = socket.inet_pton(family, addr)
61 return SockaddrIn6((family, socket.ntohs(port), socket.ntohl(flowinfo),
64 family = socket.AF_INET
66 addr = socket.inet_pton(family, addr)
67 return SockaddrIn((family, socket.ntohs(port), addr))
Diproute.py23 import socket
227 return self._NlAttr(nla_type, socket.inet_pton(family, address))
305 data = socket.inet_ntop(family, nla_data)
363 self.sock = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW,
364 socket.NETLINK_ROUTE)
399 return {4: socket.AF_INET, 6: socket.AF_INET6}[version]
/system/core/rootdir/
Dinit.zygote64_32.rc1 … /system/bin/app_process64 -Xzygote /system/bin --zygote --start-system-server --socket-name=zygote
3 socket zygote stream 660 root system
10 service zygote_secondary /system/bin/app_process32 -Xzygote /system/bin --zygote --socket-name=zygo…
12 socket zygote_secondary stream 660 root system
Dinit.zygote32_64.rc1 … /system/bin/app_process32 -Xzygote /system/bin --zygote --start-system-server --socket-name=zygote
3 socket zygote stream 660 root system
10 service zygote_secondary /system/bin/app_process64 -Xzygote /system/bin --zygote --socket-name=zygo…
12 socket zygote_secondary stream 660 root system
Dinit.rc179 # net_bw_acct grants impersonation of socket owners.
180 # net_bw_stats grants access to other apps' detailed tagged-socket stats.
185 # This is needed by any process that uses socket tagging.
562 socket logd stream 0666 logd logd
563 socket logdr seqpacket 0666 logd logd
564 socket logdw dgram 0222 logd logd
593 socket adbd stream 660 system system
604 socket lmkd seqpacket 0660 system system
622 socket vold stream 0660 root mount
623 socket cryptd stream 0660 root mount
[all …]
Dinit.zygote32.rc3 socket zygote stream 660 root system
Dinit.zygote64.rc3 socket zygote stream 660 root system
/system/core/include/cutils/
Duevent.h28 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length);
29 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid);
30 ssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid);
/system/core/include/sysutils/
DNetlinkListener.h37 NetlinkListener(int socket);
38 NetlinkListener(int socket, int format);
40 NetlinkListener(int socket, int format = NETLINK_FORMAT_ASCII);
/system/core/logd/
DLogListener.cpp60 int socket = cli->getSocket(); in onDataAvailable() local
62 ssize_t n = recvmsg(socket, &hdr, 0); in onDataAvailable()
/system/bt/doc/
Dbtsnoop_net.md3 btsnoop_net exposes Bluetooth snoop logs over a local TCP socket which enables

123