Home
last modified time | relevance | path

Searched refs:mac_address (Results 1 – 20 of 20) sorted by relevance

/system/bt/common/
Dmetric_id_allocator.cc114 int MetricIdAllocator::AllocateId(const RawAddress& mac_address) { in AllocateId() argument
118 if (paired_device_cache_.Get(mac_address, &id)) { in AllocateId()
121 if (temporary_device_cache_.Get(mac_address, &id)) { in AllocateId()
135 auto evicted = temporary_device_cache_.Put(mac_address, id); in AllocateId()
147 bool MetricIdAllocator::SaveDevice(const RawAddress& mac_address) { in SaveDevice() argument
150 if (paired_device_cache_.Get(mac_address, &id)) { in SaveDevice()
153 if (!temporary_device_cache_.Get(mac_address, &id)) { in SaveDevice()
159 if (!temporary_device_cache_.Remove(mac_address)) { in SaveDevice()
164 auto evicted = paired_device_cache_.Put(mac_address, id); in SaveDevice()
168 if (!save_id_callback_(mac_address, id)) { in SaveDevice()
[all …]
Dmetric_id_allocator.h87 int AllocateId(const RawAddress& mac_address);
95 bool SaveDevice(const RawAddress& mac_address);
102 void ForgetDevice(const RawAddress& mac_address);
131 void ForgetDevicePostprocess(const RawAddress& mac_address, const int id);
/system/bt/gd/common/
Dmetric_id_manager.cc120 int MetricIdManager::AllocateId(const Address& mac_address) { in AllocateId() argument
122 auto it = paired_device_cache_.find(mac_address); in AllocateId()
127 it = temporary_device_cache_.find(mac_address); in AllocateId()
142 auto evicted = temporary_device_cache_.insert_or_assign(mac_address, id); in AllocateId()
154 bool MetricIdManager::SaveDevice(const Address& mac_address) { in SaveDevice() argument
156 if (paired_device_cache_.contains(mac_address)) { in SaveDevice()
159 if (!temporary_device_cache_.contains(mac_address)) { in SaveDevice()
164 auto opt = temporary_device_cache_.extract(mac_address); in SaveDevice()
170 auto evicted = paired_device_cache_.insert_or_assign(mac_address, id); in SaveDevice()
174 if (!save_id_callback_(mac_address, id)) { in SaveDevice()
[all …]
Dmetric_id_manager.h88 int AllocateId(const hci::Address& mac_address);
96 bool SaveDevice(const hci::Address& mac_address);
103 void ForgetDevice(const hci::Address& mac_address);
131 void ForgetDevicePostprocess(const hci::Address& mac_address,
/system/bt/test/mock/
Dmock_common_metric_id_allocator.cc87 bool MetricIdAllocator::SaveDevice(const RawAddress& mac_address) { in SaveDevice() argument
91 int MetricIdAllocator::AllocateId(const RawAddress& mac_address) { in AllocateId() argument
95 void MetricIdAllocator::ForgetDevice(const RawAddress& mac_address) { in ForgetDevice() argument
98 void MetricIdAllocator::ForgetDevicePostprocess(const RawAddress& mac_address, in ForgetDevicePostprocess() argument
/system/connectivity/wificond/
Dlogging_utils.cpp31 string LoggingUtils::GetMacString(const array<uint8_t, ETH_ALEN>& mac_address) { in GetMacString() argument
33 for (const uint8_t& b : mac_address) { in GetMacString()
35 if (&b != &mac_address.back()) { in GetMacString()
Dap_interface_impl.cpp84 const array<uint8_t, ETH_ALEN>& mac_address) { in OnStationEvent() argument
85 vector<uint8_t> mac_return_address = vector<uint8_t>(mac_address.begin(), mac_address.end()); in OnStationEvent()
92 << LoggingUtils::GetMacString(mac_address) in OnStationEvent()
100 << LoggingUtils::GetMacString(mac_address) in OnStationEvent()
Dlogging_utils.h35 static std::string GetMacString(const std::array<uint8_t, ETH_ALEN>& mac_address);
Dap_interface_impl.h68 const std::array<uint8_t, ETH_ALEN>& mac_address);
Dserver.cpp199 interface.mac_address, in createClientInterface()
294 << LoggingUtils::GetMacString(iface.mac_address) << endl; in dump()
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dscripted_beacon.cc215 std::string mac_address = in get_next_advertisement() local
216 ble_ad_list_.advertisements(packet_num_).mac_address(); in get_next_advertisement()
220 if (Address::IsValidAddress(mac_address)) { in get_next_advertisement()
222 Address::FromString(mac_address, next_ad_.address); in get_next_advertisement()
223 } else if (mac_address.size() == Address::kLength) { in get_next_advertisement()
225 std::vector<uint8_t> mac_vector(mac_address.cbegin(), mac_address.cend()); in get_next_advertisement()
Dscripted_beacon_ble_payload.proto9 optional bytes mac_address = 2; field
/system/connectivity/wificond/tests/integration/
Dclient_interface_test.cpp86 vector<uint8_t> mac_address; in TEST() local
87 EXPECT_TRUE(client_interface->getMacAddress(&mac_address).isOk()); in TEST()
88 EXPECT_TRUE(mac_address.size() == 6); in TEST()
/system/connectivity/wificond/net/
Dnetlink_utils.h41 const std::array<uint8_t, ETH_ALEN>& mac_address) in InterfaceInfo()
45 mac_address(mac_address) {} in InterfaceInfo()
53 std::array<uint8_t, ETH_ALEN> mac_address; member
227 const std::array<uint8_t, ETH_ALEN>& mac_address,
Dnetlink_manager.cpp539 array<uint8_t, ETH_ALEN> mac_address; in BroadcastHandler() local
540 if (!packet->GetAttributeValue(NL80211_ATTR_MAC, &mac_address)) { in BroadcastHandler()
545 handler->second(NEW_STATION, mac_address); in BroadcastHandler()
547 handler->second(DEL_STATION, mac_address); in BroadcastHandler()
Dnetlink_manager.h119 const std::array<uint8_t, ETH_ALEN>& mac_address)> OnStationEventHandler;
Dnetlink_utils.cpp683 const array<uint8_t, ETH_ALEN>& mac_address, in GetStationInfo() argument
693 NL80211_ATTR_MAC, mac_address)); in GetStationInfo()
/system/connectivity/wificond/tests/
Dnl80211_attribute_unittest.cpp142 std::vector<uint8_t> mac_address( in TEST() local
145 NL80211Attr<std::vector<uint8_t>> byte_vector_attr(1, mac_address); in TEST()
146 EXPECT_EQ(byte_vector_attr.GetValue(), mac_address); in TEST()
Dnetlink_utils_unittest.cpp463 EXPECT_EQ(if_mac_addr, interfaces[0].mac_address); in TEST_F()
503 EXPECT_EQ(if_mac_addr, interfaces[0].mac_address); in TEST_F()
554 EXPECT_EQ(if_mac_addr_p2p, interfaces[0].mac_address); in TEST_F()
559 EXPECT_EQ(if_mac_addr, interfaces[1].mac_address); in TEST_F()
/system/bt/btif/src/
Dbtif_config.cc202 for (const auto& mac_address : btif_config_get_paired_devices()) { in init_metric_id_allocator() local
203 auto addr_str = mac_address.ToString(); in init_metric_id_allocator()
211 paired_device_map[mac_address] = id; in init_metric_id_allocator()
216 addresses_without_id.push_back(mac_address); in init_metric_id_allocator()