/system/bt/main/shim/ |
D | helpers.h | 24 inline RawAddress ToRawAddress(const hci::Address& address) { in ToRawAddress() argument 26 ret.address[0] = address.address[5]; in ToRawAddress() 27 ret.address[1] = address.address[4]; in ToRawAddress() 28 ret.address[2] = address.address[3]; in ToRawAddress() 29 ret.address[3] = address.address[2]; in ToRawAddress() 30 ret.address[4] = address.address[1]; in ToRawAddress() 31 ret.address[5] = address.address[0]; in ToRawAddress() 35 inline hci::Address ToGdAddress(const RawAddress& address) { in ToGdAddress() argument 37 ret.address[0] = address.address[5]; in ToGdAddress() 38 ret.address[1] = address.address[4]; in ToGdAddress() [all …]
|
D | btif_dm.cc | 38 void DisplayPairingPrompt(const bluetooth::hci::AddressWithType& address, in DisplayPairingPrompt() argument 43 callback_(ToRawAddress(address.GetAddress()), legacy_name, in DisplayPairingPrompt() 47 void Cancel(const bluetooth::hci::AddressWithType& address) { in Cancel() argument 51 void DisplayConfirmValue(const bluetooth::hci::AddressWithType& address, in DisplayConfirmValue() argument 56 callback_(ToRawAddress(address.GetAddress()), legacy_name, in DisplayConfirmValue() 61 void DisplayYesNoDialog(const bluetooth::hci::AddressWithType& address, in DisplayYesNoDialog() argument 66 callback_(ToRawAddress(address.GetAddress()), legacy_name, in DisplayYesNoDialog() 70 void DisplayEnterPasskeyDialog(const bluetooth::hci::AddressWithType& address, std::string name) { in DisplayEnterPasskeyDialog() argument 74 callback_(ToRawAddress(address.GetAddress()), legacy_name, in DisplayEnterPasskeyDialog() 79 …void DisplayPasskey(const bluetooth::hci::AddressWithType& address, std::string name, uint32_t pas… in DisplayPasskey() argument [all …]
|
/system/libbase/ |
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.cpp | 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/btif/src/ |
D | btif_hearing_aid.cc | 69 const RawAddress& address) override { in OnConnectionState() argument 70 DVLOG(2) << __func__ << " address: " << address; in OnConnectionState() 72 Unretained(callbacks), state, address)); in OnConnectionState() 76 const RawAddress& address) override { in OnDeviceAvailable() argument 77 DVLOG(2) << __func__ << " address: " << address in OnDeviceAvailable() 82 hiSyncId, address)); in OnDeviceAvailable() 85 void Connect(const RawAddress& address) override { in Connect() argument 86 DVLOG(2) << __func__ << " address: " << address; in Connect() 88 Unretained(HearingAid::Get()), address)); in Connect() 91 void Disconnect(const RawAddress& address) override { in Disconnect() argument [all …]
|
/system/bt/gd/hci/ |
D | le_address_manager.cc | 47 auto address = addr.address; in SetPrivacyPolicyForInitiatorAddress() local 49 …ASSERT_LOG((address[5] & BLE_ADDR_MASK) == BLE_ADDR_MASK, "The two most significant bits shall be … in SetPrivacyPolicyForInitiatorAddress() 51 …if ((address[0] == 0x00 && address[1] == 0x00 && address[2] == 0x00 && address[3] == 0x00 && addre… in SetPrivacyPolicyForInitiatorAddress() 52 address[5] == BLE_ADDR_MASK) || in SetPrivacyPolicyForInitiatorAddress() 53 …(address[0] == 0xFF && address[1] == 0xFF && address[2] == 0xFF && address[3] == 0xFF && address[4… in SetPrivacyPolicyForInitiatorAddress() 54 address[5] == 0xFF)) { in SetPrivacyPolicyForInitiatorAddress() 90 auto address = addr.address; in SetPrivacyPolicyForInitiatorAddressForTest() local 92 …ASSERT_LOG((address[5] & BLE_ADDR_MASK) == BLE_ADDR_MASK, "The two most significant bits shall be … in SetPrivacyPolicyForInitiatorAddressForTest() 94 …if ((address[0] == 0x00 && address[1] == 0x00 && address[2] == 0x00 && address[3] == 0x00 && addre… in SetPrivacyPolicyForInitiatorAddressForTest() 95 address[5] == BLE_ADDR_MASK) || in SetPrivacyPolicyForInitiatorAddressForTest() [all …]
|
D | address_unittest.cc | 34 ASSERT_EQ(0x12, bdaddr.address[0]); in TEST() 35 ASSERT_EQ(0x34, bdaddr.address[1]); in TEST() 36 ASSERT_EQ(0x56, bdaddr.address[2]); in TEST() 37 ASSERT_EQ(0x78, bdaddr.address[3]); in TEST() 38 ASSERT_EQ(0x9A, bdaddr.address[4]); in TEST() 39 ASSERT_EQ(0xBC, bdaddr.address[5]); in TEST() 60 ASSERT_EQ(0x12, bdaddr.address[0]); in TEST() 61 ASSERT_EQ(0x34, bdaddr.address[1]); in TEST() 62 ASSERT_EQ(0x56, bdaddr.address[2]); in TEST() 63 ASSERT_EQ(0x78, bdaddr.address[3]); in TEST() [all …]
|
/system/bt/gd/neighbor/ |
D | name_db.cc | 41 …void ReadRemoteNameRequest(hci::Address address, ReadRemoteNameDbCallback callback, os::Handler* h… 43 bool IsNameCached(hci::Address address) const; 44 RemoteName ReadCachedRemoteName(hci::Address address) const; 55 void OnRemoteNameResponse(hci::ErrorCode status, hci::Address address, RemoteName name); 68 hci::Address address, ReadRemoteNameDbCallback callback, os::Handler* handler) { in ReadRemoteNameRequest() argument 69 if (address_to_pending_read_map_.find(address) != address_to_pending_read_map_.end()) { in ReadRemoteNameRequest() 74 address_to_pending_read_map_[address] = {std::move(callback), std::move(handler)}; in ReadRemoteNameRequest() 81 address, in ReadRemoteNameRequest() 89 void neighbor::NameDbModule::impl::OnRemoteNameResponse(hci::ErrorCode status, hci::Address address… in OnRemoteNameResponse() argument 90 ASSERT(address_to_pending_read_map_.find(address) != address_to_pending_read_map_.end()); in OnRemoteNameResponse() [all …]
|
D | name.cc | 48 hci::Address address, 54 …void CancelRemoteNameRequest(hci::Address address, CancelRemoteNameCallback, os::Handler* handler); 96 hci::Address address = packet.GetBdAddr(); in OnCommandComplete() local 97 ASSERT(cancel_callback_handler_map_.find(address) != cancel_callback_handler_map_.end()); in OnCommandComplete() 98 cancel_callback_handler_map_.erase(address); in OnCommandComplete() 126 hci::Address address = packet.GetBdAddr(); in OnEvent() local 127 ASSERT(read_callback_handler_map_.find(address) != read_callback_handler_map_.end()); in OnEvent() 128 auto read_callback_handler = std::move(read_callback_handler_map_[address]); in OnEvent() 130 … std::move(read_callback_handler->callback), packet.GetStatus(), address, packet.GetRemoteName())); in OnEvent() 131 read_callback_handler_map_.erase(address); in OnEvent() [all …]
|
/system/bt/stack/gatt/ |
D | connection_manager.cc | 85 std::set<tAPP_ID> get_apps_connecting_to(const RawAddress& address) { in get_apps_connecting_to() argument 86 auto it = bgconn_dev.find(address); in get_apps_connecting_to() 93 bool background_connect_add(uint8_t app_id, const RawAddress& address) { in background_connect_add() argument 95 return L2CA_ConnectFixedChnl(L2CAP_ATT_CID, address); in background_connect_add() 98 auto it = bgconn_dev.find(address); in background_connect_add() 104 << "already doing background connection to " << address; in background_connect_add() 116 if (!BTM_WhiteListAdd(address)) return false; in background_connect_add() 120 bgconn_dev[address].doing_bg_conn.insert(app_id); in background_connect_add() 126 bool remove_unconditional(const RawAddress& address) { in remove_unconditional() argument 127 auto it = bgconn_dev.find(address); in remove_unconditional() [all …]
|
D | connection_manager.h | 40 extern bool background_connect_add(tAPP_ID app_id, const RawAddress& address); 42 const RawAddress& address); 43 extern bool remove_unconditional(const RawAddress& address); 48 extern void on_connection_complete(const RawAddress& address); 52 extern bool direct_connect_add(tAPP_ID app_id, const RawAddress& address); 53 extern bool direct_connect_remove(tAPP_ID app_id, const RawAddress& address); 59 extern void on_connection_timed_out(uint8_t app_id, const RawAddress& address);
|
/system/bt/binder/android/bluetooth/ |
D | IBluetoothGattCallback.aidl | 28 in boolean connected, in String address); in onClientConnectionState() argument 29 void onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status); in onPhyUpdate() argument 30 void onPhyRead(in String address, in int txPhy, in int rxPhy, in int status); in onPhyRead() argument 31 void onSearchComplete(in String address, in List<BluetoothGattService> services, in int status); in onSearchComplete() argument 32 void onCharacteristicRead(in String address, in int status, in int handle, in byte[] value); in onCharacteristicRead() argument 33 void onCharacteristicWrite(in String address, in int status, in int handle); in onCharacteristicWrite() argument 34 void onExecuteWrite(in String address, in int status); in onExecuteWrite() argument 35 void onDescriptorRead(in String address, in int status, in int handle, in byte[] value); in onDescriptorRead() argument 36 void onDescriptorWrite(in String address, in int status, in int handle); in onDescriptorWrite() argument 37 void onNotify(in String address, in int handle, in byte[] value); in onNotify() argument [all …]
|
D | IBluetoothGattServerCallback.aidl | 27 in boolean connected, in String address); in onServerConnectionState() argument 29 void onCharacteristicReadRequest(in String address, in int transId, in int offset, in onCharacteristicReadRequest() argument 31 void onDescriptorReadRequest(in String address, in int transId, in onDescriptorReadRequest() argument 34 void onCharacteristicWriteRequest(in String address, in int transId, in int offset, in onCharacteristicWriteRequest() argument 37 void onDescriptorWriteRequest(in String address, in int transId, in int offset, in onDescriptorWriteRequest() argument 40 void onExecuteWrite(in String address, in int transId, in boolean execWrite); in onExecuteWrite() argument 41 void onNotificationSent(in String address, in int status); in onNotificationSent() argument 42 void onMtuChanged(in String address, in int mtu); in onMtuChanged() argument 43 void onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status); in onPhyUpdate() argument 44 void onPhyRead(in String address, in int txPhy, in int rxPhy, in int status); in onPhyRead() argument [all …]
|
D | IBluetoothGatt.aidl | 79 …void clientConnect(in int clientIf, in String address, in boolean isDirect, in int transport, in b… in clientConnect() argument 80 void clientDisconnect(in int clientIf, in String address); in clientDisconnect() argument 81 …void clientSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int … in clientSetPreferredPhy() argument 82 void clientReadPhy(in int clientIf, in String address); in clientReadPhy() argument 83 void refreshDevice(in int clientIf, in String address); in refreshDevice() argument 84 void discoverServices(in int clientIf, in String address); in discoverServices() argument 85 void discoverServiceByUuid(in int clientIf, in String address, in ParcelUuid uuid); in discoverServiceByUuid() argument 86 void readCharacteristic(in int clientIf, in String address, in int handle, in int authReq); in readCharacteristic() argument 87 void readUsingCharacteristicUuid(in int clientIf, in String address, in ParcelUuid uuid, in readUsingCharacteristicUuid() argument 89 void writeCharacteristic(in int clientIf, in String address, in int handle, in writeCharacteristic() argument [all …]
|
/system/bt/types/ |
D | raw_address.cc | 33 std::copy(addr, addr + kLength, address); in RawAddress() 37 return base::StringPrintf("%02x:%02x:%02x:%02x:%02x:%02x", address[0], in ToString() 38 address[1], address[2], address[3], address[4], in ToString() 39 address[5]); in ToString() 57 new_addr.address[i] = strtol(token.c_str(), &temp, 16); in FromString() 66 std::copy(from, from + kLength, address); in FromOctets() 70 bool RawAddress::IsValidAddress(const std::string& address) { in IsValidAddress() argument 72 return RawAddress::FromString(address, tmp); in IsValidAddress()
|
D | raw_address.h | 30 uint8_t address[kLength]; variable 36 return (std::memcmp(address, rhs.address, sizeof(address)) < 0); 39 return (std::memcmp(address, rhs.address, sizeof(address)) == 0); 59 static bool IsValidAddress(const std::string& address); 75 memcpy(reinterpret_cast<uint8_t*>(&int_addr), val.address,
|
/system/bt/gd/security/channel/ |
D | security_manager_channel.cc | 42 void SecurityManagerChannel::Connect(hci::Address address) { in Connect() argument 44 auto entry = link_map_.find(address); in Connect() 46 LOG_WARN("Already connected to '%s'", address.ToString().c_str()); in Connect() 51 l2cap_security_interface_->InitiateConnectionForSecurity(address); in Connect() 54 void SecurityManagerChannel::Release(hci::Address address) { in Release() argument 55 auto entry = link_map_.find(address); in Release() 57 LOG_WARN("Unknown address '%s'", address.ToString().c_str()); in Release() 63 void SecurityManagerChannel::Disconnect(hci::Address address) { in Disconnect() argument 64 auto entry = link_map_.find(address); in Disconnect() 66 LOG_WARN("Unknown address '%s'", address.ToString().c_str()); in Disconnect() [all …]
|
/system/bt/gd/cert/ |
D | py_security.py | 71 def create_bond(self, address, type): argument 75 … logging.debug("DUT: Creating bond to '%s' from '%s'" % (str(address), str(self._device.address))) 77 … common.BluetoothAddressWithType(address=common.BluetoothAddress(address=address), type=type)) 79 def remove_bond(self, address, type): argument 84 … common.BluetoothAddressWithType(address=common.BluetoothAddress(address=address), type=type)) 109 def send_ui_callback(self, address, callback_type, b, uid): argument 119 address=common.BluetoothAddressWithType( 120 address=common.BluetoothAddress(address=address), 161 return self._device.address 183 def enforce_security_policy(self, address, type, policy): argument [all …]
|
/system/bt/gd/security/ |
D | ui.h | 32 …virtual void DisplayPairingPrompt(const bluetooth::hci::AddressWithType& address, std::string name… 36 virtual void Cancel(const bluetooth::hci::AddressWithType& address) = 0; 39 virtual void DisplayConfirmValue(const bluetooth::hci::AddressWithType& address, std::string name, 43 …virtual void DisplayYesNoDialog(const bluetooth::hci::AddressWithType& address, std::string name) … 46 …virtual void DisplayEnterPasskeyDialog(const bluetooth::hci::AddressWithType& address, std::string… 49 …virtual void DisplayPasskey(const bluetooth::hci::AddressWithType& address, std::string name, uint… 58 …virtual void OnPairingPromptAccepted(const bluetooth::hci::AddressWithType& address, bool confirme… 61 virtual void OnConfirmYesNo(const bluetooth::hci::AddressWithType& address, bool confirmed) = 0; 64 virtual void OnPasskeyEntry(const bluetooth::hci::AddressWithType& address, uint32_t passkey) = 0;
|
/system/bt/service/ipc/binder/ |
D | bluetooth_low_energy_binder_server.cc | 66 const String16& address, in Connect() argument 69 VLOG(2) << __func__ << " client_id: " << client_id << " address: " << address in Connect() 81 client->Connect(std::string(String8(address).string()), is_direct); in Connect() 86 const String16& address, in Disconnect() argument 88 VLOG(2) << __func__ << " client_id: " << client_id << " address: " << address; in Disconnect() 98 *_aidl_return = client->Disconnect(std::string(String8(address).string())); in Disconnect() 103 const String16& address, int mtu, in SetMtu() argument 105 VLOG(2) << __func__ << " client_id: " << client_id << " address: " << address in SetMtu() 116 *_aidl_return = client->SetMtu(std::string(String8(address).string()), mtu); in SetMtu() 121 bluetooth::LowEnergyClient* client, int status, const char* address, in OnConnectionState() argument [all …]
|
/system/bt/gd/security/record/ |
D | security_record_database.h | 32 std::shared_ptr<SecurityRecord> FindOrCreate(hci::AddressWithType address) { in FindOrCreate() argument 33 auto it = Find(address); in FindOrCreate() 38 auto record_ptr = std::make_shared<SecurityRecord>(address); in FindOrCreate() 43 void Remove(const hci::AddressWithType& address) { in Remove() argument 44 auto it = Find(address); in Remove() 52 iterator Find(hci::AddressWithType address) { in Find() argument 55 …if (record->identity_address_.has_value() && record->identity_address_.value() == address) return … in Find() 56 if (record->GetPseudoAddress() == address) return it; in Find() 57 if (record->irk.has_value() && address.IsRpaThatMatchesIrk(record->irk.value())) return it; in Find()
|
/system/bt/common/ |
D | metrics.cc | 573 void LogLinkLayerConnectionEvent(const RawAddress* address, in LogLinkLayerConnectionEvent() argument 581 if (address != nullptr) { in LogLinkLayerConnectionEvent() 582 obfuscated_id = AddressObfuscator::GetInstance()->Obfuscate(*address); in LogLinkLayerConnectionEvent() 583 metric_id = MetricIdAllocator::GetInstance().AllocateId(*address); in LogLinkLayerConnectionEvent() 587 address != nullptr ? obfuscated_id.c_str() : nullptr, in LogLinkLayerConnectionEvent() 588 address != nullptr ? obfuscated_id.size() : 0); in LogLinkLayerConnectionEvent() 598 << address << ", handle " << connection_handle << ", type " in LogLinkLayerConnectionEvent() 626 void LogA2dpAudioUnderrunEvent(const RawAddress& address, in LogA2dpAudioUnderrunEvent() argument 631 if (!address.IsEmpty()) { in LogA2dpAudioUnderrunEvent() 632 obfuscated_id = AddressObfuscator::GetInstance()->Obfuscate(address); in LogA2dpAudioUnderrunEvent() [all …]
|
/system/bt/bta/hearing_aid/ |
D | hearing_aid.cc | 49 const RawAddress& address, uint8_t* capabilities, uint64_t* hi_sync_id, 117 if (FindByAddress(device.address) != nullptr) return; in Add() 122 void Remove(const RawAddress& address) { in Remove() argument 124 if (it->address != address) { in Remove() 134 HearingDevice* FindByAddress(const RawAddress& address) { in FindByAddress() argument 136 [&address](const HearingDevice& device) { in FindByAddress() 137 return device.address == address; in FindByAddress() 173 VLOG(1) << __func__ << ": device=" << d.address << ", read_rssi_count=" << d.read_rssi_count; in StartRssiLog() 280 uint16_t UpdateBleConnParams(const RawAddress& address) { in UpdateBleConnParams() argument 307 L2CA_UpdateBleConnParams(address, connection_interval, connection_interval, in UpdateBleConnParams() [all …]
|
/system/bt/stack/btm/ |
D | btm_ble_addr.cc | 45 RawAddress address; in generate_rpa_from_irk_and_rand() local 46 address.address[2] = random[0]; in generate_rpa_from_irk_and_rand() 47 address.address[1] = random[1]; in generate_rpa_from_irk_and_rand() 48 address.address[0] = random[2]; in generate_rpa_from_irk_and_rand() 54 address.address[5] = p[0]; in generate_rpa_from_irk_and_rand() 55 address.address[4] = p[1]; in generate_rpa_from_irk_and_rand() 56 address.address[3] = p[2]; in generate_rpa_from_irk_and_rand() 57 return address; in generate_rpa_from_irk_and_rand() 62 void btm_gen_resolve_paddr_low(const RawAddress& address) { in btm_gen_resolve_paddr_low() argument 67 p_cb->private_addr = address; in btm_gen_resolve_paddr_low() [all …]
|
/system/bt/types/test/ |
D | raw_address_unittest.cc | 29 ASSERT_EQ(0x12, bdaddr.address[0]); in TEST() 30 ASSERT_EQ(0x34, bdaddr.address[1]); in TEST() 31 ASSERT_EQ(0x56, bdaddr.address[2]); in TEST() 32 ASSERT_EQ(0x78, bdaddr.address[3]); in TEST() 33 ASSERT_EQ(0x9A, bdaddr.address[4]); in TEST() 34 ASSERT_EQ(0xBC, bdaddr.address[5]); in TEST() 55 ASSERT_EQ(0x12, bdaddr.address[0]); in TEST() 56 ASSERT_EQ(0x34, bdaddr.address[1]); in TEST() 57 ASSERT_EQ(0x56, bdaddr.address[2]); in TEST() 58 ASSERT_EQ(0x78, bdaddr.address[3]); in TEST() [all …]
|