/system/core/fastboot/ |
D | socket_test.cpp | 35 bool MakeConnectedSockets(Socket::Protocol protocol, std::unique_ptr<Socket>* server, in MakeConnectedSockets() 36 std::unique_ptr<Socket>* client, in MakeConnectedSockets() 38 *server = Socket::NewServer(protocol, 0); in MakeConnectedSockets() 44 *client = Socket::NewClient(protocol, hostname, (*server)->GetLocalPort(), nullptr); in MakeConnectedSockets() 51 if (protocol == Socket::Protocol::kTcp) { in MakeConnectedSockets() 64 static bool SendString(Socket* sock, const std::string& message) { in SendString() 70 static bool ReceiveString(Socket* sock, const std::string& message) { in ReceiveString() 78 std::unique_ptr<Socket> server, client; in TEST() 80 for (Socket::Protocol protocol : {Socket::Protocol::kUdp, Socket::Protocol::kTcp}) { in TEST() 92 std::unique_ptr<Socket> server, client; in TEST() [all …]
|
D | socket.cpp | 34 Socket::Socket(cutils_socket_t sock) : sock_(sock) {} in Socket() function in Socket 36 Socket::~Socket() { in ~Socket() 40 int Socket::Close() { in Close() 51 ssize_t Socket::ReceiveAll(void* data, size_t length, int timeout_ms) { in ReceiveAll() 69 int Socket::GetLocalPort() { in GetLocalPort() 77 bool Socket::WaitForRecv(int timeout_ms) { in WaitForRecv() 108 class UdpSocket : public Socket { 125 UdpSocket::UdpSocket(Type type, cutils_socket_t sock) : Socket(sock) { in UdpSocket() 168 class TcpSocket : public Socket { 170 TcpSocket(cutils_socket_t sock) : Socket(sock) {} in TcpSocket() [all …]
|
D | socket.h | 47 class Socket { 58 static std::unique_ptr<Socket> NewClient(Protocol protocol, const std::string& hostname, 65 static std::unique_ptr<Socket> NewServer(Protocol protocol, int port); 68 virtual ~Socket(); 100 virtual std::unique_ptr<Socket> Accept() { return nullptr; } in Accept() 107 Socket(cutils_socket_t sock); 126 DISALLOW_COPY_AND_ASSIGN(Socket);
|
D | tcp.cpp | 59 static std::unique_ptr<TcpTransport> NewTransport(std::unique_ptr<Socket> socket, 69 TcpTransport(std::unique_ptr<Socket> sock) : socket_(std::move(sock)) {} in TcpTransport() 75 std::unique_ptr<Socket> socket_; 81 std::unique_ptr<TcpTransport> TcpTransport::NewTransport(std::unique_ptr<Socket> socket, in NewTransport() 98 Socket::GetErrorMessage().c_str()); in InitializeProtocol() 107 Socket::GetErrorMessage().c_str()); in InitializeProtocol() 182 return internal::Connect(Socket::NewClient(Socket::Protocol::kTcp, hostname, port, error), in Connect() 188 std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std::string* error) { in Connect()
|
D | socket_mock.h | 54 class SocketMock : public Socket { 63 virtual std::unique_ptr<Socket> Accept(); 81 void AddAccept(std::unique_ptr<Socket> sock); 88 std::unique_ptr<Socket> _sock); 93 std::unique_ptr<Socket> sock;
|
D | socket_mock.cpp | 33 SocketMock::SocketMock() : Socket(INVALID_SOCKET) {} in SocketMock() 109 std::unique_ptr<Socket> SocketMock::Accept() { in Accept() 120 std::unique_ptr<Socket> sock = std::move(events_.front().sock); in Accept() 145 void SocketMock::AddAccept(std::unique_ptr<Socket> sock) { in AddAccept() 150 std::unique_ptr<Socket> _sock) in Event()
|
D | udp.cpp | 105 static std::unique_ptr<UdpTransport> NewTransport(std::unique_ptr<Socket> socket, 114 UdpTransport(std::unique_ptr<Socket> socket) : socket_(std::move(socket)) {} in UdpTransport() 133 std::unique_ptr<Socket> socket_; 141 std::unique_ptr<UdpTransport> UdpTransport::NewTransport(std::unique_ptr<Socket> socket, in NewTransport() 261 *error = Socket::GetErrorMessage(); in SendSinglePacketHelper() 273 *error = Socket::GetErrorMessage(); in SendSinglePacketHelper() 374 return internal::Connect(Socket::NewClient(Socket::Protocol::kUdp, hostname, port, error), in Connect() 380 std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std::string* error) { in Connect()
|
D | tcp.h | 53 std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std::string* error);
|
D | udp.h | 75 std::unique_ptr<Transport> Connect(std::unique_ptr<Socket> sock, std::string* error);
|
/system/connectivity/dhcp_client/ |
D | device_info_unittest.cc | 82 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_DGRAM, 0)) in TEST_F() 110 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_DGRAM, 0)).WillOnce(Return(-1)); in TEST_F() 119 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_DGRAM, 0)) in TEST_F() 130 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_DGRAM, 0)) in TEST_F()
|
D | device_info.cc | 64 int fd = sockets_->Socket(AF_INET, SOCK_DGRAM, 0); in GetDeviceInfo()
|
/system/connectivity/shill/ |
D | async_connection_unittest.cc | 101 EXPECT_CALL(sockets_, Socket(_, _, _)) in StartConnection() 146 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 156 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 170 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 186 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 224 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 244 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 288 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 304 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F()
|
D | eap_listener_unittest.cc | 123 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE))) in StartListenerWithFD() 146 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE))) in TEST_F() 157 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(kSocketFD)); in TEST_F() 168 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(kSocketFD)); in TEST_F()
|
D | arp_client_unittest.cc | 139 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP))) in StartClientWithFD() 161 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP))) in TEST_F() 172 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(kSocketFD)); in TEST_F() 183 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(kSocketFD)); in TEST_F() 195 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(kSocketFD)); in TEST_F()
|
D | icmp_unittest.cc | 79 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) in StartIcmpWithFD() 114 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) in TEST_F() 126 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(kSocketFD)); in TEST_F()
|
D | http_proxy_unittest.cc | 218 EXPECT_CALL(sockets(), Socket(_, _, _)) in ExpectStart() 479 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 486 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 497 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 510 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F() 525 EXPECT_CALL(sockets(), Socket(_, _, _)) in TEST_F()
|
D | eap_listener.cc | 69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE)); in CreateSocket()
|
D | icmp.cc | 36 int socket = sockets_->Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); in Start()
|
/system/connectivity/shill/net/ |
D | netlink_socket_unittest.cc | 55 EXPECT_CALL(*mock_sockets_, Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_GENERIC)) in InitializeSocket() 101 EXPECT_CALL(*mock_sockets_, Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_GENERIC)) in TEST_F() 111 EXPECT_CALL(*mock_sockets_, Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_GENERIC)) in TEST_F() 126 EXPECT_CALL(*mock_sockets_, Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_GENERIC)) in TEST_F()
|
D | mock_sockets.h | 73 MOCK_CONST_METHOD3(Socket, int(int domain, int type, int protocol));
|
D | netlink_socket.cc | 58 file_descriptor_ = sockets_->Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_GENERIC); in Init()
|
/system/extras/tests/net_test/ |
D | net_test.py | 114 def Socket(family, sock_type, protocol): function 122 return Socket(family, SOCK_DGRAM, proto) 134 s = Socket(family, SOCK_STREAM, IPPROTO_TCP) 148 return Socket(family, SOCK_DGRAM, IPPROTO_UDP) 152 s = Socket(family, SOCK_RAW, IPPROTO_GRE)
|
/system/connectivity/shill/vpn/ |
D | vpn_service_unittest.cc | 255 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(-1)); in TEST_F() 265 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(-1)); in TEST_F() 364 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(-1)); in TEST_F() 386 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(-1)); in TEST_F() 410 EXPECT_CALL(*sockets_, Socket(_, _, _)).WillOnce(Return(-1)); in TEST_F()
|
/system/sepolicy/ |
D | bluetooth.te | 12 # Socket creation under /data/misc/bluedroid. 49 # Bluetooth Sim Access Profile Socket to the RIL
|
D | gpsd.te | 9 # Socket is created by the daemon, not by init, and under /data/gps,
|