Searched refs:socket (Results 1 - 25 of 101) sorted by relevance

12345

/system/bt/osi/include/
H A Dsocket.h30 typedef void (*socket_cb)(socket_t *socket, void *context);
32 // Returns a new socket object. The socket is in an idle, disconnected state when
37 // Returns a new socket object backed by |fd|. The socket object is in whichever
43 // Frees a socket object created by |socket_new| or |socket_accept|. |socket| may
44 // be NULL. If the socket was connected, it will be disconnected.
45 void socket_free(socket_t *socket);
47 // Puts |socket| i
[all...]
/system/bt/osi/src/
H A Dsocket.c27 #include <sys/socket.h>
35 #include "osi/include/socket.h"
54 LOG_ERROR("%s unable to allocate memory for socket.", __func__);
58 ret->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
60 LOG_ERROR("%s unable to create socket: %s", __func__, strerror(errno));
84 LOG_ERROR("%s unable to allocate memory for socket.", __func__);
92 void socket_free(socket_t *socket) { argument
93 if (!socket)
96 socket_unregister(socket);
97 close(socket
101 socket_listen(const socket_t *socket, port_t port) argument
121 socket_accept(const socket_t *socket) argument
141 socket_read(const socket_t *socket, void *buf, size_t count) argument
148 socket_write(const socket_t *socket, const void *buf, size_t count) argument
155 socket_write_and_transfer_fd(const socket_t *socket, const void *buf, size_t count, int fd) argument
187 socket_bytes_available(const socket_t *socket) argument
196 socket_register(socket_t *socket, reactor_t *reactor, void *context, socket_cb read_cb, socket_cb write_cb) argument
212 socket_unregister(socket_t *socket) argument
223 socket_t *socket = (void *)context; local
230 socket_t *socket = (void *)context; local
[all...]
/system/core/include/cutils/
H A Duevent.h21 #include <sys/socket.h>
28 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/
H A DNetlinkListener.h37 NetlinkListener(int socket);
38 NetlinkListener(int socket, int format);
40 NetlinkListener(int socket, int format = NETLINK_FORMAT_ASCII);
/system/bt/btcore/src/
H A Dcounter.c36 #include "osi/include/socket.h"
39 typedef int (*handler_t)(socket_t * socket);
56 socket_t *socket; member in struct:__anon576
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);
309 socket_t *socket = (socket_t *)context; local
323 accept_ready(socket_t *socket, UNUSED_ATTR void *context) argument
353 read_ready(socket_t *socket, void *context) argument
387 output(socket_t *socket, const char* format, ...) argument
396 help(UNUSED_ATTR socket_t *socket) argument
401 quit(UNUSED_ATTR socket_t *socket) argument
405 set(UNUSED_ATTR socket_t *socket) argument
410 show(socket_t *socket) argument
[all...]
/system/core/libsysutils/src/
H A DNetlinkListener.cpp19 #include <sys/socket.h>
34 NetlinkListener::NetlinkListener(int socket) : argument
35 SocketListener(socket, false) {
40 NetlinkListener::NetlinkListener(int socket, int format) : argument
41 SocketListener(socket, false), mFormat(format) {
46 int socket = cli->getSocket(); local
55 count = TEMP_FAILURE_RETRY(uevent_kernel_recv(socket,
H A DFrameworkClient.cpp11 FrameworkClient::FrameworkClient(int socket) { argument
12 mSocket = socket;
H A DSocketClient.cpp8 #include <sys/socket.h>
16 SocketClient::SocketClient(int socket, bool owned) { argument
17 init(socket, owned, false);
20 SocketClient::SocketClient(int socket, bool owned, bool useCmdNum) { argument
21 init(socket, owned, useCmdNum);
24 void SocketClient::init(int socket, bool owned, bool useCmdNum) { argument
25 mSocket = socket;
40 int err = getsockopt(socket, SOL_SOCKET, SO_PEERCRED, &creds, &szCreds);
/system/bt/hci/src/
H A Dhci_inject.c33 #include "osi/include/socket.h"
44 socket_t *socket; member in struct:__anon750
59 static void accept_ready(socket_t *socket, void *context);
60 static void read_ready(socket_t *socket, void *context);
118 static void accept_ready(socket_t *socket, UNUSED_ATTR void *context) { argument
119 assert(socket != NULL);
120 assert(socket == listen_socket);
122 socket = socket_accept(socket);
123 if (!socket)
144 read_ready(UNUSED_ATTR socket_t *socket, void *context) argument
[all...]
H A Dbtsnoop_net.c28 #include <sys/socket.h>
79 listen_socket_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
81 LOG_ERROR("%s socket creation failed: %s", __func__, strerror(errno));
96 LOG_ERROR("%s unable to bind listen socket: %s", __func__, strerror(errno));
111 LOG_WARN("%s error accepting socket: %s", __func__, strerror(errno));
/system/netd/client/
H A DFwmarkClient.h20 #include <sys/socket.h>
26 // Returns true if a socket of the given |family| should be sent to the fwmark server to have
H A DFwmarkClient.cpp24 #include <sys/socket.h>
30 const sockaddr_un FWMARK_SERVER_PATH = {AF_UNIX, "/dev/socket/fwmarkd"};
48 mChannel = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
/system/core/libcutils/
H A Duevent.c23 #include <sys/socket.h>
32 ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length) argument
35 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &uid);
41 * socket's peer.
47 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid) argument
49 return uevent_kernel_recv(socket, buffer, length, true, uid);
52 ssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid) argument
68 ssize_t n = recvmsg(socket, &hdr, 0);
115 s = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT);
H A Dsocket_inaddr_any_server.c24 #include <sys/socket.h>
45 s = socket(AF_INET, type, 0);
H A Dsocket_loopback_client.c24 #include <sys/socket.h>
46 s = socket(AF_INET, type, 0);
H A Dsocket_loopback_server.c26 #include <sys/socket.h>
45 s = socket(AF_INET, type, 0);
H A Dsocket_local_server.c36 #include <sys/socket.h>
46 /* Only the bottom bits are really the socket type; there are flags too. */
50 * Binds a pre-created socket(AF_LOCAL) 's' to 'name'
91 /** Open a server-side UNIX domain datagram socket in the Linux non-filesystem
102 s = socket(AF_LOCAL, type, 0);
H A Dsocket_local_client.c35 #include <sys/socket.h>
157 s = socket(AF_LOCAL, type, 0);
/system/core/adb/
H A Djdwp_service.cpp32 when adbd starts, it creates a unix server socket
65 - it attaches the first socket in the pair to a local socket
66 which is itself attached to the transport's remote socket:
69 - it sends the file descriptor of the second socket directly
80 then, the JDWP thread uses this new socket descriptor as its
104 due to the way adb works, this doesn't need a special socket
105 type or fancy handling of socket termination if either the debugger
114 ** for each JDWP process, we record its pid and its connected socket
121 #include <sys/socket
128 int socket; member in struct:JdwpProcess
255 jdwp_process_event( int socket, unsigned events, void* _proc ) argument
572 asocket socket; member in struct:JdwpSocket
644 asocket socket; member in struct:JdwpTracker
[all...]
H A Dtest_track_devices.cpp5 #include <sys/socket.h>
36 int s = socket( PF_INET, SOCK_STREAM, 0 );
/system/bt/btif/src/
H A Dbtif_sock_sco.c26 #include <sys/socket.h>
34 #include "osi/include/socket.h"
37 // This module provides a socket abstraction for SCO connections to a higher
52 // socket_read_ready_cb() - local host closed SCO socket
57 socket_t *socket; member in struct:__anon690
75 static void sco_socket_free_locked(sco_socket_t *socket);
80 static void socket_read_ready_cb(socket_t *socket, void *context);
144 LOG_ERROR("%s unable to allocate socket pair: %s", __func__, strerror(errno));
150 LOG_ERROR("%s unable to allocate new SCO socket.", __func__);
156 LOG_ERROR("%s unable to create SCO socket
160 socket_t *socket = socket_new_from_fd(pair[1]); local
309 socket_read_ready_cb(UNUSED_ATTR socket_t *socket, void *context) argument
[all...]
/system/extras/tests/net_test/
H A Dcsocket.py15 """Python wrapper for C socket calls and data structures."""
20 import socket namespace
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
[all...]
/system/core/logd/
H A DLogListener.cpp19 #include <sys/socket.h>
60 int socket = cli->getSocket(); local
62 ssize_t n = recvmsg(socket, &hdr, 0);
H A Dlibaudit.h25 #include <sys/socket.h>
53 * Opens a connection to the Audit netlink socket
56 * Returns the same errors as man 2 socket.
77 * the queue when we do a read on the netlink socket.
/system/vold/
H A DNetlinkManager.cpp21 #include <sys/socket.h>
61 if ((mSock = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC,
63 SLOGE("Unable to create uevent socket: %s", strerror(errno));
68 SLOGE("Unable to set uevent socket SO_RCVBUFFORCE option: %s", strerror(errno));
73 SLOGE("Unable to set uevent socket SO_PASSCRED option: %s", strerror(errno));
78 SLOGE("Unable to bind uevent socket: %s", strerror(errno));

Completed in 407 milliseconds

12345