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

12

/system/connectivity/shill/
H A Dicmp.h44 // Create a socket for transmission of ICMP frames.
47 // Destroy the transmit socket.
50 // Returns whether an ICMP socket is open.
59 int socket() { return socket_; } function in class:shill::Icmp
H A Darp_client.h39 // Create a socket for reception of ARP replies, and packet trasmission.
43 // Create a socket for reception of ARP requests, and packet trasmission.
47 // Destroy the client socket.
60 virtual int socket() const { return socket_; } function in class:shill::ArpClient
H A Deap_listener.cc47 LOG(ERROR) << "Could not open EAP listener socket.";
69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE)); local
70 if (socket == -1) {
71 PLOG(ERROR) << "Could not create EAP listener socket";
74 socket_ = socket;
78 PLOG(ERROR) << "Could not set socket to be non-blocking";
91 PLOG(ERROR) << "Could not bind socket to interface";
H A Darp_client.cc56 LOG(ERROR) << "Could not open ARP socket.";
69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP)); local
70 if (socket == -1) {
71 PLOG(ERROR) << "Could not create ARP socket";
74 socket_ = socket;
97 PLOG(ERROR) << "Could not set socket to be non-blocking";
110 PLOG(ERROR) << "Could not bind socket to interface";
140 // The socket address returned may only be big enough to contain
H A Dicmp.cc36 int socket = sockets_->Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); local
37 if (socket == -1) {
38 PLOG(ERROR) << "Could not create ICMP socket";
42 socket_ = socket;
46 PLOG(ERROR) << "Could not set socket to be non-blocking";
H A Dconnection_health_checker_unittest.cc161 const Sockets* socket() { function in class:shill::ConnectionHealthCheckerTest
200 // + (Proxy/Other) : TCP connection for proxy socket / some other
201 // socket.
257 // If no matching sock_info is provided (Does not belong to proxy socket),
507 // LoadTcpSocketInfo returns a list without our socket.
519 // LoadTcpSocketInfo returns a list with only our socket.
/system/core/libsysutils/src/
H A DFrameworkClient.cpp11 FrameworkClient::FrameworkClient(int socket) { argument
12 mSocket = socket;
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 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/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.cpp34 when adbd starts, it creates a unix server socket
67 - it attaches the first socket in the pair to a local socket
68 which is itself attached to the transport's remote socket:
71 - it sends the file descriptor of the second socket directly
82 then, the JDWP thread uses this new socket descriptor as its
106 due to the way adb works, this doesn't need a special socket
107 type or fancy handling of socket termination if either the debugger
116 ** for each JDWP process, we record its pid and its connected socket
123 #include <sys/socket
130 int socket; member in struct:JdwpProcess
257 jdwp_process_event( int socket, unsigned events, void* _proc ) argument
564 asocket socket; member in struct:JdwpSocket
636 asocket socket; member in struct:JdwpTracker
[all...]
/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);
/system/core/logd/
H A DLogListener.cpp20 #include <sys/socket.h>
62 int socket = cli->getSocket(); local
67 ssize_t n = recvmsg(socket, &hdr, 0);
/system/connectivity/shill/test-scripts/
H A Drouting.py32 import socket namespace
36 return socket.inet_ntoa(struct.pack('@I', addr))
42 return struct.unpack('I', socket.inet_aton(i))[0]
/system/extras/tests/net_test/
H A Dcsocket.py15 """Python wrapper for C socket calls and data structures."""
20 import socket namespace
51 raise socket.error(errno, os.strerror(errno))
56 family = socket.AF_INET6
61 addr = socket.inet_pton(family, addr)
62 return SockaddrIn6((family, socket.ntohs(port), socket.ntohl(flowinfo),
65 family = socket.AF_INET
67 addr = socket.inet_pton(family, addr)
68 return SockaddrIn((family, socket
[all...]
H A Dnetlink.py23 import socket namespace
58 """A basic netlink socket object."""
138 self.sock = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, self.FAMILY)
/system/weaved/buffet/
H A Dsocket_stream.cc19 #include <sys/socket.h>
77 socket_fd = socket(info->ai_family, info->ai_socktype, info->ai_protocol);
160 void SocketStream::TlsConnect(std::unique_ptr<Stream> socket, argument
163 SocketStream* stream = static_cast<SocketStream*>(socket.get());
/system/bt/btif/src/
H A Dbtif_sock_sco.c25 #include <sys/socket.h>
37 #include "osi/include/socket.h"
40 // This module provides a socket abstraction for SCO connections to a higher
55 // socket_read_ready_cb() - local host closed SCO socket
60 socket_t *socket; member in struct:__anon690
78 static void sco_socket_free_locked(sco_socket_t *socket);
83 static void socket_read_ready_cb(socket_t *socket, void *context);
147 LOG_ERROR(LOG_TAG, "%s unable to allocate socket pair: %s", __func__, strerror(errno));
153 LOG_ERROR(LOG_TAG, "%s unable to allocate new SCO socket.", __func__);
159 LOG_ERROR(LOG_TAG, "%s unable to create SCO socket
163 socket_t *socket = socket_new_from_fd(pair[1]); local
311 socket_read_ready_cb(UNUSED_ATTR socket_t *socket, void *context) argument
[all...]
/system/bt/hci/src/
H A Dhci_inject.c34 #include "osi/include/socket.h"
45 socket_t *socket; member in struct:__anon746
60 static void accept_ready(socket_t *socket, void *context);
61 static void read_ready(socket_t *socket, void *context);
127 static void accept_ready(socket_t *socket, UNUSED_ATTR void *context) { argument
128 assert(socket != NULL);
129 assert(socket == listen_socket);
131 socket = socket_accept(socket);
132 if (!socket)
148 read_ready(UNUSED_ATTR socket_t *socket, void *context) argument
[all...]
/system/bt/osi/src/
H A Dsocket.c21 #include "osi/include/socket.h"
29 #include <sys/socket.h>
54 ret->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
56 LOG_ERROR(LOG_TAG, "%s unable to create socket: %s", __func__, strerror(errno));
84 void socket_free(socket_t *socket) { argument
85 if (!socket)
88 socket_unregister(socket);
89 close(socket->fd);
90 osi_free(socket);
93 bool socket_listen(const socket_t *socket, port_ argument
113 socket_accept(const socket_t *socket) argument
129 socket_read(const socket_t *socket, void *buf, size_t count) argument
139 socket_write(const socket_t *socket, const void *buf, size_t count) argument
149 socket_write_and_transfer_fd(const socket_t *socket, const void *buf, size_t count, int fd) argument
183 socket_bytes_available(const socket_t *socket) argument
192 socket_register(socket_t *socket, reactor_t *reactor, void *context, socket_cb read_cb, socket_cb write_cb) argument
208 socket_unregister(socket_t *socket) argument
219 socket_t *socket = (void *)context; local
226 socket_t *socket = (void *)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)
237 except socket.error, e:
238 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 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/connectivity/shill/net/
H A Drtnl_handler.cc29 #include <sys/socket.h>
91 LOG(ERROR) << "Failed to open rtnl socket";
108 LOG(ERROR) << "RTNL socket bind failed";
123 // Close the socket if it is currently open.
428 int socket = sockets_->Socket(PF_INET, SOCK_DGRAM, 0); local
429 if (socket < 0) {
430 PLOG(ERROR) << "Unable to open INET socket";
433 ScopedSocketCloser socket_closer(sockets_.get(), socket);
436 if (sockets_->Ioctl(socket, SIOCGIFINDEX, &ifr) < 0) {
/system/connectivity/shill/vpn/
H A Dopenvpn_management_server.cc85 int socket = sockets->Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); local
86 if (socket < 0) {
87 PLOG(ERROR) << "Unable to create management server socket.";
97 socket, reinterpret_cast<struct sockaddr*>(&addr), addrlen) < 0 ||
98 sockets->Listen(socket, 1) < 0 ||
100 socket, reinterpret_cast<struct sockaddr*>(&addr), &addrlen) < 0) {
102 sockets->Close(socket);
106 SLOG(this, 2) << "Listening socket: " << socket;
108 socket_ = socket;
[all...]

Completed in 677 milliseconds

12