#[repr(C)]pub struct ble_gap_privacy_params_t {
pub privacy_mode: u8,
pub private_addr_type: u8,
pub private_addr_cycle_s: u16,
pub p_device_irk: *mut ble_gap_irk_t,
}
Expand description
@brief Privacy.
The privacy feature provides a way for the device to avoid being tracked over a period of time.
The privacy feature, when enabled, hides the local device identity and replaces it with a private address
that is automatically refreshed at a specified interval.
If a device still wants to be recognized by other peers, it needs to share it's Identity Resolving Key (IRK).
With this key, a device can generate a random private address that can only be recognized by peers in possession of that key,
and devices can establish connections without revealing their real identities.
Both network privacy (@ref BLE_GAP_PRIVACY_MODE_NETWORK_PRIVACY) and device privacy (@ref BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY)
are supported.
@note If the device IRK is updated, the new IRK becomes the one to be distributed in all bonding procedures performed after @ref sd_ble_gap_privacy_set returns. The IRK distributed during bonding procedure is the device IRK that is active when @ref sd_ble_gap_sec_params_reply is called.
Fields§
§privacy_mode: u8
< Privacy mode, see @ref BLE_GAP_PRIVACY_MODES. Default is @ref BLE_GAP_PRIVACY_MODE_OFF.
private_addr_type: u8
< The private address type must be either @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE or @ref BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE.
private_addr_cycle_s: u16
< Private address cycle interval in seconds. Providing an address cycle value of 0 will use the default value defined by @ref BLE_GAP_DEFAULT_PRIVATE_ADDR_CYCLE_INTERVAL_S.
p_device_irk: *mut ble_gap_irk_t
< When used as input, pointer to IRK structure that will be used as the default IRK. If NULL, the device default IRK will be used. When used as output, pointer to IRK structure where the current default IRK will be written to. If NULL, this argument is ignored. By default, the default IRK is used to generate random private resolvable addresses for the local device unless instructed otherwise.
Trait Implementations§
source§impl Clone for ble_gap_privacy_params_t
impl Clone for ble_gap_privacy_params_t
source§fn clone(&self) -> ble_gap_privacy_params_t
fn clone(&self) -> ble_gap_privacy_params_t
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more