nrf-softdevice-s132

Crates

git

Versions

default

Flavors

#[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

source§

fn clone(&self) -> ble_gap_privacy_params_t

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ble_gap_privacy_params_t

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for ble_gap_privacy_params_t

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.