Searched defs:socket (Results 1 - 23 of 23) sorted by relevance

/system/netd/server/dns/
H A DDnsTlsSocketFactory.h38 auto socket = std::make_unique<DnsTlsSocket>(server, mark, observer, cache); variable
39 if (!socket->initialize()) {
42 return std::move(socket);
/system/core/libsysutils/src/
H A DFrameworkClient.cpp27 FrameworkClient::FrameworkClient(int socket) { argument
28 mSocket = socket;
H A DNetlinkListener.cpp21 #include <sys/socket.h>
25 #include <linux/netlink.h> /* out of order because must follow sys/socket.h */
36 NetlinkListener::NetlinkListener(int socket) : argument
37 SocketListener(socket, false) {
42 NetlinkListener::NetlinkListener(int socket, int format) : argument
43 SocketListener(socket, false), mFormat(format) {
48 int socket = cli->getSocket(); local
57 count = TEMP_FAILURE_RETRY(uevent_kernel_recv(socket,
H A DSocketClient.cpp26 #include <sys/socket.h>
33 SocketClient::SocketClient(int socket, bool owned) { argument
34 init(socket, owned, false);
37 SocketClient::SocketClient(int socket, bool owned, bool useCmdNum) { argument
38 init(socket, owned, useCmdNum);
41 void SocketClient::init(int socket, bool owned, bool useCmdNum) { argument
42 mSocket = socket;
57 int err = getsockopt(socket, SOL_SOCKET, SO_PEERCRED, &creds, &szCreds);
/system/core/adb/
H A Dtest_adb.py27 import socket namespace
146 # Use SO_LINGER to cause TCP RST segment to be sent on socket close.
153 sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
156 linger = sock.getsockopt(socket.SOL_SOCKET, socket.SO_LINGER, 16)
168 socket.socket(socket.AF_INET, socket
[all...]
H A Djdwp_service.cpp27 #include <sys/socket.h>
42 when adbd starts, it creates a unix server socket
75 - it attaches the first socket in the pair to a local socket
76 which is itself attached to the transport's remote socket:
79 - it sends the file descriptor of the second socket directly
90 then, the JDWP thread uses this new socket descriptor as its
114 due to the way adb works, this doesn't need a special socket
115 type or fancy handling of socket termination if either the debugger
124 ** for each JDWP process, we record its pid and its connected socket
134 JdwpProcess(int socket) argument
175 int socket = -1; member in struct:JdwpProcess
216 jdwp_process_event(int socket, unsigned events, void* _proc) argument
[all...]
H A Dtest_device.py29 import socket namespace
210 listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
214 listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
222 client = socket.socket(socket
[all...]
H A Dtransport.cpp199 D("%s: failed to read packet from transport socket on fd %d", t->serial, fd);
223 fatal_errno("cannot enqueue packet on transport socket");
395 asocket socket; member in struct:device_tracker
419 static void device_tracker_close(asocket* socket) { argument
420 device_tracker* tracker = (device_tracker*)socket;
421 asocket* peer = socket->peer;
432 static int device_tracker_enqueue(asocket* socket, std::string) { argument
434 device_tracker_close(socket);
439 asocket* peer = tracker->socket.peer;
450 static void device_tracker_ready(asocket* socket) { argument
[all...]
H A Dsysdeps_win32.cpp126 SOCKET socket; member in union:FHRec_::__anon1549
133 #define fh_socket u.socket
480 /***** socket-based file descriptors *****/
489 // lot of POSIX and socket error codes, some of the resulting error codes
528 // WSAPoll doesn't handle invalid/non-socket handles, so we need to handle them ourselves.
540 .fd = fh->u.socket,
581 /* gently tell any peer that we're closing the socket */
583 // If the socket is not connected, this returns an error. We want to
586 D("socket shutdown failed: %s",
609 // WSAEWOULDBLOCK is normal with a non-blocking socket, s
[all...]
/system/core/libcutils/
H A Duevent.cpp24 #include <sys/socket.h>
35 ssize_t uevent_kernel_multicast_recv(int socket, void* buffer, size_t length) { argument
37 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &uid);
43 * socket's peer.
49 ssize_t uevent_kernel_multicast_uid_recv(int socket, void* buffer, size_t length, uid_t* uid) { argument
50 return uevent_kernel_recv(socket, buffer, length, true, uid);
53 ssize_t uevent_kernel_recv(int socket, void* buffer, size_t length, bool require_group, uid_t* uid) { argument
63 ssize_t n = recvmsg(socket, &hdr, 0);
105 s = socket(PF_NETLINK, SOCK_DGRAM | SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT);
/system/core/logd/
H A DLogListener.cpp22 #include <sys/socket.h>
56 int socket = cli->getSocket(); local
62 ssize_t n = recvmsg(socket, &hdr, 0);
/system/bt/btif/src/
H A Dbtif_sock_sco.cc25 #include <sys/socket.h>
40 #include "osi/include/socket.h"
43 // This module provides a socket abstraction for SCO connections to a higher
58 // socket_read_ready_cb() - local host closed SCO socket
63 socket_t* socket; member in struct:__anon607
71 static void sco_socket_free_locked(sco_socket_t* socket);
77 static void socket_read_ready_cb(socket_t* socket, void* context);
137 socket_t* socket = NULL; local
141 LOG_ERROR(LOG_TAG, "%s unable to allocate socket pair: %s", __func__,
148 LOG_ERROR(LOG_TAG, "%s unable to allocate new SCO socket
313 socket_read_ready_cb(UNUSED_ATTR socket_t* socket, void* context) argument
[all...]
/system/bt/hci/src/
H A Dhci_inject.cc34 #include "osi/include/socket.h"
45 socket_t* socket; member in struct:__anon670
53 static void accept_ready(socket_t* socket, void* context);
54 static void read_ready(socket_t* socket, void* context);
127 static void accept_ready(socket_t* socket, UNUSED_ATTR void* context) { argument
128 CHECK(socket != NULL);
129 CHECK(socket == listen_socket);
131 socket = socket_accept(socket);
132 if (!socket) retur
147 read_ready(UNUSED_ATTR socket_t* socket, void* context) argument
[all...]
/system/bt/osi/src/
H A Dsocket.cc21 #include "osi/include/socket.h"
29 #include <sys/socket.h>
55 ret->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
57 LOG_ERROR(LOG_TAG, "%s unable to create socket: %s", __func__,
86 void socket_free(socket_t* socket) { argument
87 if (!socket) return;
89 socket_unregister(socket);
90 close(socket->fd);
91 osi_free(socket);
94 bool socket_listen(const socket_t* socket, port_ argument
116 socket_accept(const socket_t* socket) argument
133 socket_read(const socket_t* socket, void* buf, size_t count) argument
143 socket_write(const socket_t* socket, const void* buf, size_t count) argument
153 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
195 socket_register(socket_t* socket, reactor_t* reactor, void* context, socket_cb read_cb, socket_cb write_cb) argument
213 socket_unregister(socket_t* socket) argument
223 socket_t* socket = static_cast<socket_t*>(context); local
230 socket_t* socket = static_cast<socket_t*>(context); local
[all...]
/system/bt/vendor_libs/test_vendor_lib/scripts/
H A Dtest_channel.py42 import socket namespace
60 """Simple wrapper class for a socket object.
63 socket: The underlying socket created for the specified address and port.
67 self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
236 except socket.error, e:
237 print 'Error connecting to socket
[all...]
/system/core/fastboot/
H A Dtcp.cpp59 static std::unique_ptr<TcpTransport> NewTransport(std::unique_ptr<Socket> socket,
81 std::unique_ptr<TcpTransport> TcpTransport::NewTransport(std::unique_ptr<Socket> socket, argument
83 std::unique_ptr<TcpTransport> transport(new TcpTransport(std::move(socket)));
H A Dudp.cpp43 #include "socket.h"
105 static std::unique_ptr<UdpTransport> NewTransport(std::unique_ptr<Socket> socket,
114 explicit UdpTransport(std::unique_ptr<Socket> socket) : socket_(std::move(socket)) {} argument
141 std::unique_ptr<UdpTransport> UdpTransport::NewTransport(std::unique_ptr<Socket> socket, argument
143 std::unique_ptr<UdpTransport> transport(new UdpTransport(std::move(socket)));
209 *error = "socket is closed";
/system/nvram/hal/
H A Dfake_nvram.cpp22 #include <sys/socket.h>
47 // Name of the control socket served by this daemon.
53 // Connection backlog on control socket.
60 // command messages from and to the control socket.
111 // Reads a single command from |socket|, decodes the command, executes it on
112 // |nvram_manager|, encodes the response, and writes the reply back to |socket|.
114 // expected the close the |socket|).
115 bool ProcessCommand(int socket, nvram::NvramManager* nvram_manager) { argument
118 TEMP_FAILURE_RETRY(read(socket, command_buffer, sizeof(command_buffer)));
124 PLOG(ERROR) << "Failed to read command from client socket";
[all...]
/system/update_engine/scripts/
H A Dupdate_device.py25 import socket namespace
265 except (KeyboardInterrupt, socket.error):
270 self._httpd.socket.close()
/system/core/init/
H A Dsubcontext.cpp21 #include <sys/socket.h>
64 Result<std::string> ReadMessage(int socket) { argument
66 auto result = TEMP_FAILURE_RETRY(recv(socket, buffer, sizeof(buffer), 0));
74 Result<Success> SendMessage(int socket, const T& message) { argument
85 TEMP_FAILURE_RETRY(send(socket, message_string.c_str(), message_string.size(), 0));
175 PLOG(FATAL) << "poll() of subcontext socket failed, continuing";
229 LOG(FATAL) << "Could not create socket pair to communicate to subcontext";
H A Dproperty_service.cpp272 SocketConnection(int socket, const ucred& cred) : socket_(socket), cred_(cred) {} argument
316 int socket() { return socket_; } function in class:android::init::SocketConnection
497 SocketConnection socket(s, cr);
501 if (!socket.RecvUint32(&cmd, &timeout_ms)) {
502 PLOG(ERROR) << "sys_prop: error while reading command from the socket";
503 socket.SendUint32(PROP_ERROR_READ_CMD);
512 if (!socket.RecvChars(prop_name, PROP_NAME_MAX, &timeout_ms) ||
513 !socket.RecvChars(prop_value, PROP_VALUE_MAX, &timeout_ms)) {
514 PLOG(ERROR) << "sys_prop(PROP_MSG_SETPROP): error while reading name/value from the socket";
[all...]
/system/netd/server/
H A DNetdNativeService.cpp262 String8("Could not open SOCK_DIAG socket"));
469 binder::Status NetdNativeService::ipSecSetEncapSocketOwner(const android::base::unique_fd& socket, argument
475 return asBinderStatus(gCtls->xfrmCtrl.ipSecSetEncapSocketOwner(socket, newUid, callerUid));
543 const android::base::unique_fd& socket,
553 socket,
562 const android::base::unique_fd& socket) {
567 socket));
542 ipSecApplyTransportModeTransform( const android::base::unique_fd& socket, int32_t transformId, int32_t direction, const std::string& sourceAddress, const std::string& destinationAddress, int32_t spi) argument
561 ipSecRemoveTransportModeTransform( const android::base::unique_fd& socket) argument
H A DXfrmController.cpp36 #include <sys/socket.h>
224 ALOGW("Could not get a new socket, line=%d", __LINE__);
225 return netdutils::statusFromErrno(-mSock, "Could not open netlink socket");
285 ALOGE("netlink socket writev failed (%s)", toString(writeResult).c_str());
422 netdutils::Status XfrmController::ipSecSetEncapSocketOwner(const android::base::unique_fd& socket, argument
426 const int fd = socket.get();
429 return netdutils::statusFromErrno(errno, "Failed to stat socket file descriptor");
435 return netdutils::statusFromErrno(EINVAL, "File descriptor was not a socket");
441 getSyscallInstance().getsockopt(Fd(socket), IPPROTO_UDP, UDP_ENCAP, &optval, &optlen);
449 return netdutils::statusFromErrno(errno, "Failed to fchown socket fil
647 ipSecApplyTransportModeTransform( const android::base::unique_fd& socket, int32_t transformId, int32_t direction, const std::string& sourceAddress, const std::string& destinationAddress, int32_t spi) argument
712 ipSecRemoveTransportModeTransform(const android::base::unique_fd& socket) argument
[all...]

Completed in 475 milliseconds