PebbleOS
Loading...
Searching...
No Matches
Functions
Pairing information helpers

Compare and inspect struct pbl_bt_sm_pairing_info. More...

Functions

bool sm_is_pairing_info_equal_identity (const struct pbl_bt_sm_pairing_info *a, const struct pbl_bt_sm_pairing_info *b)
 Check whether two pairings have the same remote identity.
 
bool sm_is_pairing_info_empty (const struct pbl_bt_sm_pairing_info *p)
 Check whether a pairing holds no keys.
 
bool sm_is_pairing_info_irk_not_used (const struct pbl_bt_sm_key *irk_key)
 Check whether an IRK is unused.
 

Detailed Description

Compare and inspect struct pbl_bt_sm_pairing_info.

Function Documentation

◆ sm_is_pairing_info_empty()

bool sm_is_pairing_info_empty ( const struct pbl_bt_sm_pairing_info *  p)

Check whether a pairing holds no keys.

Parameters
pThe pairing.
Returns
true if none of the encryption, identity or signing information is valid.

◆ sm_is_pairing_info_equal_identity()

bool sm_is_pairing_info_equal_identity ( const struct pbl_bt_sm_pairing_info *  a,
const struct pbl_bt_sm_pairing_info *  b 
)

Check whether two pairings have the same remote identity.

Parameters
aFirst pairing.
bSecond pairing.
Returns
true if both have valid identity information with equal identity address and IRK.

◆ sm_is_pairing_info_irk_not_used()

bool sm_is_pairing_info_irk_not_used ( const struct pbl_bt_sm_key *  irk_key)

Check whether an IRK is unused.

Per the Bluetooth Core Specification v4.2, Vol 3, Part C, 10.7, an IRK that does not apply is all zeros.

Parameters
irk_keyThe IRK.
Returns
true if irk_key is all zeros.