mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-20 07:57:22 +00:00
nimble/ll: Add helper to check if addr is identity
This commit is contained in:
@@ -438,6 +438,9 @@ uint16_t ble_ll_pdu_max_tx_octets_get(uint32_t usecs, int phy_mode);
|
||||
/* Is this address a resolvable private address? */
|
||||
int ble_ll_is_rpa(uint8_t *addr, uint8_t addr_type);
|
||||
|
||||
/* Is this address an identity address? */
|
||||
int ble_ll_addr_is_id(uint8_t *addr, uint8_t addr_type);
|
||||
|
||||
/* Is 'addr' our device address? 'addr_type' is public (0) or random (!=0) */
|
||||
int ble_ll_is_our_devaddr(uint8_t *addr, int addr_type);
|
||||
|
||||
|
||||
@@ -426,6 +426,12 @@ ble_ll_is_rpa(uint8_t *addr, uint8_t addr_type)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
ble_ll_addr_is_id(uint8_t *addr, uint8_t addr_type)
|
||||
{
|
||||
return !addr_type || ((addr[5] & 0xc0) == 0xc0);
|
||||
}
|
||||
|
||||
/* Checks to see that the device is a valid random address */
|
||||
int
|
||||
ble_ll_is_valid_random_addr(uint8_t *addr)
|
||||
|
||||
Reference in New Issue
Block a user