/system/core/base/ |
D | parsenetaddress.cpp | 27 bool ParseNetAddress(const std::string& address, std::string* host, int* port, in ParseNetAddress() argument 33 size_t colons = std::count(address.begin(), address.end(), ':'); in ParseNetAddress() 34 size_t dots = std::count(address.begin(), address.end(), '.'); in ParseNetAddress() 36 if (address[0] == '[') { in ParseNetAddress() 38 if (address.rfind("]:") == std::string::npos) { in ParseNetAddress() 39 *error = StringPrintf("bad IPv6 address '%s'", address.c_str()); in ParseNetAddress() 42 *host = address.substr(1, (address.find("]:") - 1)); in ParseNetAddress() 43 port_str = address.substr(address.rfind("]:") + 2); in ParseNetAddress() 47 *host = address; in ParseNetAddress() 51 std::vector<std::string> pieces = Split(address, ":"); in ParseNetAddress() [all …]
|
/system/core/libcutils/ |
D | socket_network_client_windows.c | 43 struct addrinfo* address = NULL; in socket_network_client() local 46 if (getaddrinfo(host, port_str, &hints, &address) != 0 || address == NULL) { in socket_network_client() 47 if (address != NULL) { in socket_network_client() 48 freeaddrinfo(address); in socket_network_client() 54 SOCKET sock = socket(address->ai_family, address->ai_socktype, in socket_network_client() 55 address->ai_protocol); in socket_network_client() 57 freeaddrinfo(address); in socket_network_client() 61 if (connect(sock, address->ai_addr, address->ai_addrlen) == SOCKET_ERROR) { in socket_network_client() 63 freeaddrinfo(address); in socket_network_client() 67 freeaddrinfo(address); in socket_network_client()
|
/system/bt/device/src/classic/ |
D | peer.c | 35 bt_bdaddr_t address; member 85 classic_peer_t *classic_peer_by_address(bt_bdaddr_t *address) { in classic_peer_by_address() argument 87 assert(address != NULL); in classic_peer_by_address() 89 classic_peer_t *peer = hash_map_get(peers_by_address, address); in classic_peer_by_address() 95 peer = hash_map_get(peers_by_address, address); in classic_peer_by_address() 101 peer->address = *address; in classic_peer_by_address() 102 hash_map_set(peers_by_address, &peer->address, peer); in classic_peer_by_address() 113 return &peer->address; in classic_peer_get_address()
|
/system/connectivity/shill/ |
D | arp_packet.h | 46 void set_local_ip_address(const IPAddress& address) { in set_local_ip_address() argument 47 local_ip_address_ = address; in set_local_ip_address() 51 void set_remote_ip_address(const IPAddress& address) { in set_remote_ip_address() argument 52 remote_ip_address_ = address; in set_remote_ip_address() 56 void set_local_mac_address(const ByteString& address) { in set_local_mac_address() argument 57 local_mac_address_ = address; in set_local_mac_address() 61 void set_remote_mac_address(const ByteString& address) { in set_remote_mac_address() argument 62 remote_mac_address_ = address; in set_remote_mac_address()
|
D | async_connection.cc | 52 bool AsyncConnection::Start(const IPAddress& address, int port) { in Start() argument 56 if (address.family() == IPAddress::kFamilyIPv6) { in Start() 76 int ret = ConnectTo(address, port); in Start() 126 int AsyncConnection::ConnectTo(const IPAddress& address, int port) { in ConnectTo() argument 131 if (address.family() == IPAddress::kFamilyIPv4) { in ConnectTo() 132 CHECK_EQ(sizeof(iaddr.sin_addr.s_addr), address.GetLength()); in ConnectTo() 136 memcpy(&iaddr.sin_addr.s_addr, address.address().GetConstData(), in ConnectTo() 142 } else if (address.family() == IPAddress::kFamilyIPv6) { in ConnectTo() 143 CHECK_EQ(sizeof(iaddr6.sin6_addr.s6_addr), address.GetLength()); in ConnectTo() 147 memcpy(&iaddr6.sin6_addr.s6_addr, address.address().GetConstData(), in ConnectTo()
|
D | connection_diagnostics.cc | 435 void ConnectionDiagnostics::FindRouteToHost(const IPAddress& address) { in FindRouteToHost() argument 442 address, connection_->interface_index(), -1, in FindRouteToHost() 446 << address.ToString(); in FindRouteToHost() 449 address.ToString().c_str())); in FindRouteToHost() 463 StringPrintf("Requesting route to %s", address.ToString().c_str())); in FindRouteToHost() 466 void ConnectionDiagnostics::FindArpTableEntry(const IPAddress& address) { in FindArpTableEntry() argument 469 if (address.family() != IPAddress::kFamilyIPv4) { in FindArpTableEntry() 471 LOG(ERROR) << __func__ << ": " << address.ToString() in FindArpTableEntry() 475 StringPrintf("%s is not an IPv4 address", address.ToString().c_str())); in FindArpTableEntry() 482 address.ToString().c_str())); in FindArpTableEntry() [all …]
|
D | device_info.cc | 451 const string& address, in CreateDevice() argument 480 manager_, link_name, address, interface_index); in CreateDevice() 485 manager_, link_name, address, in CreateDevice() 567 manager_, link_name, address, interface_index, in CreateDevice() 662 string address; in AddLinkMsgHandler() local 665 address = in AddLinkMsgHandler() 677 device = CreateDevice(link_name, address, dev_index, technology); in AddLinkMsgHandler() 709 bool DeviceInfo::GetMACAddress(int interface_index, ByteString* address) const { in GetMACAddress() 717 *address = info->mac_address; in GetMACAddress() 722 *address = GetMACAddressFromKernel(interface_index); in GetMACAddress() [all …]
|
/system/connectivity/shill/net/ |
D | ip_address_unittest.cc | 62 EXPECT_TRUE(good_addr.address().Equals(good_bytes)); in TestAddress() 143 EXPECT_TRUE(addr4.address().IsZero()); in TEST_F() 144 EXPECT_TRUE(addr4.address().Equals(ByteString(4))); in TEST_F() 153 EXPECT_TRUE(addr6.address().IsZero()); in TEST_F() 154 EXPECT_TRUE(addr6.address().Equals(ByteString(16))); in TEST_F() 173 IPAddress address(IPAddress::kFamilyIPv4); in TEST_F() local 176 EXPECT_FALSE(address.SetAddressAndPrefixFromString("")); in TEST_F() 177 EXPECT_FALSE(address.SetAddressAndPrefixFromString(kString1)); in TEST_F() 178 EXPECT_FALSE(address.SetAddressAndPrefixFromString(kString1 + "/")); in TEST_F() 179 EXPECT_FALSE(address.SetAddressAndPrefixFromString(kString1 + "/10x")); in TEST_F() [all …]
|
D | ip_address.cc | 54 IPAddress::IPAddress(Family family, const ByteString& address) in IPAddress() argument 56 address_(address), in IPAddress() 60 const ByteString& address, in IPAddress() argument 63 address_(address), in IPAddress() 205 ByteString address(address_length); in SetAddressFromString() local 206 if (inet_pton(family_, address_string.c_str(), address.GetData()) <= 0) { in SetAddressFromString() 209 address_ = address; in SetAddressFromString() 286 ByteString address_bytes(address()); in MaskWith() 287 address_bytes.BitwiseAnd(b.address()); in MaskWith() 297 ByteString address_bytes(address()); in MergeWith() [all …]
|
/system/bt/service/common/bluetooth/util/ |
D | address_helper.cpp | 26 bool IsAddressValid(const std::string& address) { in IsAddressValid() argument 28 return BdAddrFromString(address, &addr); in IsAddressValid() 31 bool BdAddrFromString(const std::string& address, bt_bdaddr_t* out_addr) { in BdAddrFromString() argument 34 if (address.length() != 17) in BdAddrFromString() 38 address, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); in BdAddrFromString() 50 out_addr->address[i] = strtol(token.c_str(), &temp, 16); in BdAddrFromString()
|
/system/extras/tests/net_test/ |
D | srcaddr_selection_test.py | 80 def assertAddressNotPresent(self, address): argument 81 self.assertRaises(IOError, self.iproute.GetAddress, address) 84 self, address, expected_ifindex, expected_flags): argument 85 ifa_msg = self.iproute.GetAddress(address)[0] 86 self.assertEquals(AF_INET6 if ":" in address else AF_INET, ifa_msg.family) 92 def AddressIsTentative(self, address): argument 93 ifa_msg = self.iproute.GetAddress(address)[0] 96 def BindToAddress(self, address): argument 98 s.bind((address, 0, 0, 0)) 100 def SendWithSourceAddress(self, address, netid, dest=net_test.IPV6_ADDR): argument [all …]
|
D | net_test.py | 218 address = inet_ntop(AF_INET6, inet_pton(AF_INET6, formatted)) 219 return address 222 def FormatSockStatAddress(address): argument 223 if ":" in address: 227 binary = inet_pton(family, address) 236 for address in addresses: 237 address = [s for s in address.strip().split(" ") if s] 238 if address[5] == ifname: 239 if (linklocal and address[0].startswith("fe80") 240 or not linklocal and not address[0].startswith("fe80")): [all …]
|
/system/bt/service/ipc/binder/ |
D | bluetooth_low_energy_binder_server.cpp | 58 const char* address, in Connect() argument 61 << " address: " << address in Connect() 71 return client->Connect(std::string(address), is_direct); in Connect() 75 const char* address) { in Disconnect() argument 77 << " address: " << address; in Disconnect() 86 return client->Disconnect(std::string(address)); in Disconnect() 90 const char* address, in SetMtu() argument 93 << " address: " << address in SetMtu() 103 return client->SetMtu(address, mtu); in SetMtu() 222 const char* address, bool connected) { in OnConnectionState() argument [all …]
|
D | bluetooth_low_energy_binder_server.h | 50 bool Connect(int client_id, const char* address, bool is_direct) override; 51 bool Disconnect(int client_id, const char* address) override; 52 bool SetMtu(int client_id, const char* address, int mtu) override; 67 const char* address, bool connected) override; 69 const char* address, int mtu) override;
|
/system/bt/btif/src/ |
D | btif_hh.c | 443 … bda.address[0], bda.address[1], bda.address[2], bda.address[3], bda.address[4], bda.address[5]); in btif_hh_add_added_dev() 448 if (btif_hh_cb.added_devices[i].bd_addr.address[0] == 0 && in btif_hh_add_added_dev() 449 btif_hh_cb.added_devices[i].bd_addr.address[1] == 0 && in btif_hh_add_added_dev() 450 btif_hh_cb.added_devices[i].bd_addr.address[2] == 0 && in btif_hh_add_added_dev() 451 btif_hh_cb.added_devices[i].bd_addr.address[3] == 0 && in btif_hh_add_added_dev() 452 btif_hh_cb.added_devices[i].bd_addr.address[4] == 0 && in btif_hh_add_added_dev() 453 btif_hh_cb.added_devices[i].bd_addr.address[5] == 0) in btif_hh_add_added_dev() 456 … bda.address[0], bda.address[1], bda.address[2], bda.address[3], bda.address[4], bda.address[5]); in btif_hh_add_added_dev() 483 …bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4]… in btif_hh_remove_device() 499 …bd_addr.address[0], bd_addr.address[1], bd_addr.address[2], bd_addr.address[3], bd_addr.address[4]… in btif_hh_remove_device() [all …]
|
D | btif_dm.c | 418 bdcpy(remote_bdaddr.address, p_search_data->inq_res.bd_addr); in check_cached_remote_name() 556 bdcpy(pairing_cb.bd_addr, bd_addr->address); in bond_state_changed() 609 bdcpy(bdaddr.address, bd_addr); in btif_update_remote_properties() 680 bdcpy(remote_bd.address, pairing_cb.bd_addr); in btif_dm_cb_hid_remote_name() 726 BTA_DmAddBleDevice(bd_addr->address, addr_type, device_type); in btif_dm_cb_create_bond() 743 BTA_DmBondByTransport((UINT8 *)bd_addr->address, transport); in btif_dm_cb_create_bond() 770 BTA_DmRemoveDevice((UINT8 *)bd_addr->address); in btif_dm_cb_remove_bond() 787 uint8_t *bda = (uint8_t*)bd_addr->address; in btif_dm_get_connection_state() 910 bdcpy(bd_addr.address, p_pin_req->bd_addr); in btif_dm_pin_req_evt() 944 BTA_DmPinReply( (UINT8*)bd_addr.address, TRUE, 4, pin_code.pin); in btif_dm_pin_req_evt() [all …]
|
/system/core/base/include/android-base/ |
D | memory.h | 27 static inline T get_unaligned(const T* address) { in get_unaligned() argument 31 const unaligned* p = reinterpret_cast<const unaligned*>(address); in get_unaligned() 36 static inline void put_unaligned(T* address, T v) { in put_unaligned() argument 40 unaligned* p = reinterpret_cast<unaligned*>(address); in put_unaligned()
|
/system/core/libpixelflinger/tests/arch-mips64/disassembler/ |
D | mips64_disassembler_test.cpp | 174 char temp[256], address[16]; in main() local 176 sprintf(address, "0x%lx", loc); in main() 177 strcat(temp, address); in main() 195 char temp[256], address[16]; in main() local 197 sprintf(address, "0x%08lx", loc); in main() 198 strcat(temp, address); in main()
|
/system/bt/service/ipc/ |
D | ipc_handler_linux.cpp | 87 struct sockaddr_un address; in Run() local 88 memset(&address, 0, sizeof(address)); in Run() 89 address.sun_family = AF_UNIX; in Run() 90 strncpy(address.sun_path, path.value().c_str(), in Run() 91 sizeof(address.sun_path) - 1); in Run() 92 if (bind(server_socket.get(), (struct sockaddr*)&address, sizeof(address)) < in Run()
|
/system/bt/service/ |
D | logging_helpers.cpp | 146 addr->address[0], addr->address[1], addr->address[2], in BtAddrString() 147 addr->address[3], addr->address[4], addr->address[5]); in BtAddrString()
|
/system/bt/service/common/bluetooth/binder/ |
D | IBluetoothLowEnergyCallback.cpp | 61 const char* address = data.readCString(); in onTransact() local 64 OnConnectionState(status, client_id, address, connected); in onTransact() 69 const char *address = data.readCString(); in onTransact() local 72 OnMtuChanged(status, address, mtu); in onTransact() 118 int status, int client_id, const char* address, bool connected) { in OnConnectionState() argument 126 data.writeCString(address); in OnConnectionState() 136 int status, const char* address, int mtu) { in OnMtuChanged() argument 142 data.writeCString(address); in OnMtuChanged()
|
D | IBluetoothLowEnergy.cpp | 70 const char* address = data.readCString(); in onTransact() local 73 bool result = Connect(client_id, address, is_direct); in onTransact() 80 const char* address = data.readCString(); in onTransact() local 82 bool result = Disconnect(client_id, address); in onTransact() 89 const char* address = data.readCString(); in onTransact() local 92 bool result = SetMtu(client_id, address, mtu); in onTransact() 194 bool BpBluetoothLowEnergy::Connect(int client_id, const char* address, in Connect() argument 200 data.writeCString(address); in Connect() 209 bool BpBluetoothLowEnergy::Disconnect(int client_id, const char* address) { in Disconnect() argument 214 data.writeCString(address); in Disconnect() [all …]
|
D | IBluetoothLowEnergy.h | 76 virtual bool Connect(int client_id, const char* address, bool is_direct) = 0; 77 virtual bool Disconnect(int client_id, const char* address) = 0; 79 virtual bool SetMtu(int client_id, const char* address, int mtu) = 0; 129 bool Connect(int client_id, const char* address, bool is_direct) override; 130 bool Disconnect(int client_id, const char* address) override; 132 bool SetMtu(int client_id, const char* address, int mtu) override;
|
/system/bt/service/test/ |
D | ipc_linux_unittest.cpp | 91 struct sockaddr_un address; in ConnectToTestSocket() local 92 memset(&address, 0, sizeof(address)); in ConnectToTestSocket() 93 address.sun_family = AF_UNIX; in ConnectToTestSocket() 94 strncpy(address.sun_path, kTestSocketPath, sizeof(address.sun_path) - 1); in ConnectToTestSocket() 96 int status = connect(client_fd_.get(), (struct sockaddr *)&address, in ConnectToTestSocket() 97 sizeof(address)); in ConnectToTestSocket()
|
/system/connectivity/shill/shims/ |
D | netfilter_queue_processor.cc | 322 << AddressAndPortToString(last_listener->address, in ExpireListeners() 331 uint32_t address) { in FindListener() argument 336 (*it)->address == address) { in FindListener() 375 uint32_t address = packet.destination_ip(); in IsIncomingPacketAllowed() local 379 if (IN_MULTICAST(address)) { in IsIncomingPacketAllowed() 381 entry_ptr = FindDestination(port, device_index, address); in IsIncomingPacketAllowed() 383 entry_ptr = FindListener(port, device_index, address); in IsIncomingPacketAllowed() 392 if ((packet.source_ip() & netmask) != ((*entry_ptr)->address & netmask)) { in IsIncomingPacketAllowed() 418 uint32_t address = packet.source_ip(); in LogOutgoingPacket() local 426 FindListener(port, device_index, address); in LogOutgoingPacket() [all …]
|