/system/connectivity/shill/net/ |
D | netlink_socket.cc | 41 if (sockets_ && (file_descriptor_ >= 0)) { in ~NetlinkSocket() 42 sockets_->Close(file_descriptor_); in ~NetlinkSocket() 48 if (sockets_) { in Init() 51 sockets_.reset(new Sockets); in Init() 58 file_descriptor_ = sockets_->Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_GENERIC); in Init() 64 if (sockets_->SetReceiveBuffer(file_descriptor_, kReceiveBufferSize)) { in Init() 72 if (sockets_->Bind(file_descriptor_, in Init() 75 sockets_->Close(file_descriptor_); in Init() 95 result = sockets_->RecvFrom( in RecvMessage() 109 result = sockets_->RecvFrom( in RecvMessage() [all …]
|
D | rtnl_handler_unittest.cc | 70 : sockets_(new StrictMock<MockSockets>()), in RTNLHandlerTest() 83 RTNLHandler::GetInstance()->sockets_.reset(sockets_); in SetUp() 128 MockSockets* sockets_; member in shill::RTNLHandlerTest 139 EXPECT_CALL(*sockets_, Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE)) in StartRTNLHandler() 141 EXPECT_CALL(*sockets_, Bind(kTestSocket, _, sizeof(sockaddr_nl))) in StartRTNLHandler() 143 EXPECT_CALL(*sockets_, SetReceiveBuffer(kTestSocket, _)).WillOnce(Return(0)); in StartRTNLHandler() 149 EXPECT_CALL(*sockets_, Close(kTestSocket)).WillOnce(Return(0)); in StopRTNLHandler() 225 EXPECT_CALL(*sockets_, Socket(PF_INET, SOCK_DGRAM, 0)) in TEST_F() 229 EXPECT_CALL(*sockets_, Ioctl(kTestSocket, SIOCGIFINDEX, _)) in TEST_F() 232 EXPECT_CALL(*sockets_, Close(kTestSocket)) in TEST_F() [all …]
|
D | rtnl_handler.cc | 60 : sockets_(new Sockets()), in RTNLHandler() 89 rtnl_socket_ = sockets_->Socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); in Start() 95 if (sockets_->SetReceiveBuffer(rtnl_socket_, kReceiveBufferSize)) { in Start() 103 if (sockets_->Bind(rtnl_socket_, in Start() 106 sockets_->Close(rtnl_socket_); in Start() 125 sockets_->Close(rtnl_socket_); in Stop() 428 int socket = sockets_->Socket(PF_INET, SOCK_DGRAM, 0); in GetInterfaceIndex() 433 ScopedSocketCloser socket_closer(sockets_.get(), socket); in GetInterfaceIndex() 436 if (sockets_->Ioctl(socket, SIOCGIFINDEX, &ifr) < 0) { in GetInterfaceIndex() 464 if (sockets_->Send(rtnl_socket_, in SendMessageWithErrorMask()
|
D | netlink_socket.h | 87 virtual const Sockets* sockets() const { return sockets_.get(); } in sockets() 97 std::unique_ptr<Sockets> sockets_; variable
|
/system/connectivity/shill/ |
D | eap_listener_unittest.cc | 49 sockets_ = new StrictMock<MockSockets>(); in SetUp() 51 listener_.sockets_.reset(sockets_); in SetUp() 58 EXPECT_CALL(*sockets_, Close(kSocketFD)); in TearDown() 85 MockSockets* sockets_; member in shill::EapListenerTest 123 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE))) in StartListenerWithFD() 125 EXPECT_CALL(*sockets_, SetNonBlocking(fd)).WillOnce(Return(0)); in StartListenerWithFD() 126 EXPECT_CALL(*sockets_, 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() 158 EXPECT_CALL(*sockets_, SetNonBlocking(kSocketFD)).WillOnce(Return(-1)); in TEST_F() [all …]
|
D | async_connection.cc | 42 sockets_(sockets), in AsyncConnection() 59 fd_ = sockets_->Socket(family, SOCK_STREAM, 0); in Start() 61 sockets_->SetNonBlocking(fd_) < 0) { in Start() 62 error_ = sockets_->ErrorString(); in Start() 69 sockets_->BindToDevice(fd_, interface_name_) < 0) { in Start() 70 error_ = sockets_->ErrorString(); in Start() 83 if (sockets_->Error() != EINPROGRESS) { in Start() 84 error_ = sockets_->ErrorString(); in Start() 102 sockets_->Close(fd_); in Stop() 112 if (sockets_->GetSocketError(fd_) != 0) { in OnConnectCompletion() [all …]
|
D | arp_client_unittest.cc | 49 sockets_ = new StrictMock<MockSockets>(); in SetUp() 51 client_.sockets_.reset(sockets_); in SetUp() 57 EXPECT_CALL(*sockets_, Close(kSocketFD)); in TearDown() 83 MockSockets* sockets_; member in shill::ArpClientTest 139 EXPECT_CALL(*sockets_, Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP))) in StartClientWithFD() 141 EXPECT_CALL(*sockets_, AttachFilter(fd, _)).WillOnce(Return(0)); in StartClientWithFD() 142 EXPECT_CALL(*sockets_, SetNonBlocking(fd)).WillOnce(Return(0)); in StartClientWithFD() 143 EXPECT_CALL(*sockets_, Bind(fd, 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() [all …]
|
D | icmp_unittest.cc | 59 sockets_ = new StrictMock<MockSockets>(); in SetUp() 61 icmp_.sockets_.reset(sockets_); in SetUp() 66 EXPECT_CALL(*sockets_, Close(kSocketFD)); in TearDown() 79 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) in StartIcmpWithFD() 81 EXPECT_CALL(*sockets_, SetNonBlocking(fd)).WillOnce(Return(0)); in StartIcmpWithFD() 93 MockSockets* sockets_; member in shill::IcmpTest 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() 127 EXPECT_CALL(*sockets_, SetNonBlocking(kSocketFD)).WillOnce(Return(-1)); in TEST_F() 128 EXPECT_CALL(*sockets_, Close(kSocketFD)); in TEST_F() [all …]
|
D | eap_listener.cc | 40 sockets_(new Sockets()), in EapListener() 69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_PAE)); in CreateSocket() 75 socket_closer_.reset(new ScopedSocketCloser(sockets_.get(), socket_)); in CreateSocket() 77 if (sockets_->SetNonBlocking(socket_) != 0) { in CreateSocket() 88 if (sockets_->Bind(socket_, in CreateSocket() 106 int result = sockets_->RecvFrom( in ReceiveRequest()
|
D | arp_client.cc | 41 sockets_(new Sockets()), in ArpClient() 69 int socket = sockets_->Socket(PF_PACKET, SOCK_DGRAM, htons(ETHERTYPE_ARP)); in CreateSocket() 75 socket_closer_.reset(new ScopedSocketCloser(sockets_.get(), socket_)); in CreateSocket() 91 if (sockets_->AttachFilter(socket_, &pf) != 0) { in CreateSocket() 96 if (sockets_->SetNonBlocking(socket_) != 0) { in CreateSocket() 107 if (sockets_->Bind(socket_, in CreateSocket() 122 int result = sockets_->RecvFrom( in ReceivePacket() 175 int result = sockets_->SendTo( in TransmitRequest()
|
D | icmp.cc | 30 : sockets_(new Sockets()), in Icmp() 36 int socket = sockets_->Socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); in Start() 43 socket_closer_.reset(new ScopedSocketCloser(sockets_.get(), socket_)); in Start() 45 if (sockets_->SetNonBlocking(socket_) != 0) { in Start() 95 int result = sockets_->SendTo( in TransmitEchoRequest()
|
D | http_proxy.cc | 94 sockets_(nullptr), in HTTPProxy() 108 if (sockets_) { in Start() 152 sockets_ = sockets; in Start() 160 if (!sockets_) { in Stop() 171 sockets_->Close(proxy_socket_); in Stop() 173 sockets_ = nullptr; in Stop() 183 int client_fd = sockets_->Accept(fd, nullptr, nullptr); in AcceptClient() 193 sockets_->SetNonBlocking(client_socket_); in AcceptClient() 656 sockets_->Close(client_socket_); in StopClient() 666 sockets_->Close(server_socket_); in StopClient() [all …]
|
D | async_connection_unittest.cc | 56 new AsyncConnection(kInterfaceName, &dispatcher_, &sockets_, in AsyncConnectionTest() 92 EXPECT_EQ(&sockets_, async_connection_->sockets_); in ExpectReset() 101 EXPECT_CALL(sockets_, Socket(_, _, _)) in StartConnection() 103 EXPECT_CALL(sockets_, SetNonBlocking(kSocketFD)) in StartConnection() 105 EXPECT_CALL(sockets_, BindToDevice(kSocketFD, StrEq(kInterfaceName))) in StartConnection() 109 EXPECT_CALL(sockets_, Error()) in StartConnection() 121 StrictMock<MockSockets>& sockets() { return sockets_; } in sockets() 133 StrictMock<MockSockets> sockets_; member in shill::AsyncConnectionTest
|
D | http_request.cc | 61 sockets_(sockets), in HTTPRequest() 162 sockets_->Close(server_socket_); in Stop() 276 int ret = sockets_->Send(fd, request_data_.GetConstData(), in WriteToServer()
|
D | icmp.h | 68 std::unique_ptr<Sockets> sockets_; variable
|
/system/connectivity/dhcp_client/ |
D | device_info_unittest.cc | 55 sockets_ = new MockSockets(); in SetUp() 56 device_info_->sockets_.reset(sockets_); in SetUp() 63 MockSockets* sockets_; // Owned by device_info_. member in dhcp_client::DeviceInfoTest 82 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_DGRAM, 0)) in TEST_F() 84 EXPECT_CALL(*sockets_, Ioctl(kFakeFd, 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() 121 EXPECT_CALL(*sockets_, Ioctl(kFakeFd, SIOCGIFHWADDR, _)).WillOnce(Return(-1)); in TEST_F() 130 EXPECT_CALL(*sockets_, Socket(AF_INET, SOCK_DGRAM, 0)) in TEST_F() 132 EXPECT_CALL(*sockets_, Ioctl(kFakeFd, SIOCGIFHWADDR, _)).WillOnce(Return(0)); in TEST_F()
|
D | device_info.cc | 43 : sockets_(new Sockets()), in DeviceInfo() 64 int fd = sockets_->Socket(AF_INET, SOCK_DGRAM, 0); in GetDeviceInfo() 70 shill::ScopedSocketCloser socket_closer(sockets_.get(), fd); in GetDeviceInfo() 72 if (sockets_->Ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { in GetDeviceInfo()
|
D | dhcpv4.cc | 91 sockets_(new shill::Sockets()), in DHCPV4() 161 sockets_->Close(socket_); in Stop() 166 int fd = sockets_->Socket(PF_PACKET, in CreateRawSocket() 173 shill::ScopedSocketCloser socket_closer(sockets_.get(), fd); in CreateRawSocket() 181 if (sockets_->AttachFilter(fd, &pf) != 0) { in CreateRawSocket() 186 if (sockets_->ReuseAddress(fd) == -1) { in CreateRawSocket() 191 if (sockets_->BindToDevice(fd, interface_name_) < 0) { in CreateRawSocket() 202 if (sockets_->Bind(fd, in CreateRawSocket() 299 size_t result = sockets_->SendTo(socket_, in SendRawPacket()
|
D | device_info.h | 45 std::unique_ptr<shill::Sockets> sockets_; variable
|
/system/connectivity/shill/vpn/ |
D | openvpn_management_server_unittest.cc | 61 void SetSockets() { server_.sockets_ = &sockets_; } in SetSockets() 71 EXPECT_CALL(sockets_, in ExpectSend() 168 MockSockets sockets_; member in shill::OpenVPNManagementServerTest 182 EXPECT_CALL(sockets_, Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) in TEST_F() 184 EXPECT_FALSE(server_.Start(nullptr, &sockets_, nullptr)); in TEST_F() 190 EXPECT_CALL(sockets_, Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) in TEST_F() 192 EXPECT_CALL(sockets_, Bind(kSocket, _, _)).WillOnce(Return(0)); in TEST_F() 193 EXPECT_CALL(sockets_, Listen(kSocket, 1)).WillOnce(Return(0)); in TEST_F() 194 EXPECT_CALL(sockets_, GetSockName(kSocket, _, _)).WillOnce(Return(-1)); in TEST_F() 195 EXPECT_CALL(sockets_, Close(kSocket)).WillOnce(Return(0)); in TEST_F() [all …]
|
D | vpn_service_unittest.cc | 61 sockets_(new MockSockets()), in VPNServiceTest() 64 service_->sockets_.reset(sockets_); // Passes ownership. in VPNServiceTest() 127 MockSockets* sockets_; // Owned by |service_|. member in shill::VPNServiceTest 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()
|
D | openvpn_management_server.cc | 66 sockets_(nullptr), in OpenVPNManagementServer() 107 sockets_ = sockets; in Start() 140 sockets_->Close(connected_socket_); in Stop() 146 sockets_->Close(socket_); in Stop() 149 sockets_ = nullptr; in Stop() 179 connected_socket_ = sockets_->Accept(fd, nullptr, nullptr); in OnReady() 437 ssize_t len = sockets_->Send(connected_socket_, data.data(), data.size(), 0); in Send()
|
D | openvpn_management_server.h | 149 bool IsStarted() const { return sockets_; } in IsStarted() 153 Sockets* sockets_; variable
|
/system/connectivity/apmanager/ |
D | hostapd_monitor.cc | 58 : sockets_(new shill::Sockets()), in HostapdMonitor() 75 sockets_->Close(hostapd_socket_); in ~HostapdMonitor() 133 hostapd_socket_ = sockets_->Socket(PF_UNIX, SOCK_DGRAM, 0); in AttachToHostapd() 138 if (sockets_->Bind(hostapd_socket_, in AttachToHostapd() 144 if (sockets_->Connect(hostapd_socket_, in AttachToHostapd() 177 if (sockets_->Send(hostapd_socket_, message, length, 0) < 0) { in SendMessage()
|
/system/connectivity/shill/ethernet/ |
D | ethernet.cc | 94 sockets_(new Sockets()), in Ethernet() 447 sock = sockets_->Socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); in SetupWakeOnLan() 450 << sockets_->ErrorString() << "."; in SetupWakeOnLan() 453 ScopedSocketCloser socket_closer(sockets_.get(), sock); in SetupWakeOnLan() 465 int res = sockets_->Ioctl(sock, SIOCETHTOOL, &interface_command); in SetupWakeOnLan() 468 << sockets_->ErrorString() << "."; in SetupWakeOnLan()
|