mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-28 01:52:27 +01:00
Add isRpa method to NimBLEAddress.
This provides and easy way to check if the peer address is a Resolvable Private Address.
This commit is contained in:
@@ -138,6 +138,15 @@ uint8_t NimBLEAddress::getType() const {
|
||||
} // getType
|
||||
|
||||
|
||||
/**
|
||||
* @brief Determine if this address is a Resolvable Private Address.
|
||||
* @return True if the address is a RPA.
|
||||
*/
|
||||
bool NimBLEAddress::isRpa() const {
|
||||
return (m_addrType && ((m_address[5] & 0xc0) == 0x40));
|
||||
} // isRpa
|
||||
|
||||
|
||||
/**
|
||||
* @brief Convert a BLE address to a string.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user