nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ pm_allow_list_get()

uint32_t pm_allow_list_get ( ble_gap_addr_t * addrs,
uint32_t * addr_cnt,
ble_gap_irk_t * irks,
uint32_t * irk_cnt )

#include <peer_manager.h>

Retrieve the previously set allow list.

The function retrieves the allow list of GAP addresses and IRKs that was previously set by pm_allow_list_set.

To retrieve only GAP addresses or only IRKs, provide only one of the buffers. If a buffer is provided, its size must be specified.

Parameters
[out]addrsThe buffer where to store GAP addresses. Pass NULL to retrieve only IRKs (in that case, irks must not be NULL).
[in,out]addr_cntIn: The size of the addrs buffer. May be NULL if and only if addrs is NULL. Out: The number of GAP addresses copied into the buffer. If addrs is NULL, this parameter remains unchanged.
[out]irksThe buffer where to store IRKs. Pass NULL to retrieve only GAP addresses (in that case, addrs must not NULL).
[in,out]irk_cntIn: The size of the irks buffer. May be NULL if and only if irks is NULL. Out: The number of IRKs copied into the buffer. If irks is NULL, this parameter remains unchanged.
Return values
NRF_SUCCESSIf the allow list was successfully retrieved.
BLE_ERROR_GAP_INVALID_BLE_ADDRIf a peer has an address that cannot be used for allow listing.
NRF_ERROR_NULLIf a required parameter is NULL.
NRF_ERROR_NO_MEMIf the provided buffers are too small.
NRF_ERROR_NOT_FOUNDIf the data for any of the cached allow listed peers cannot be found. It might have been deleted.
NRF_ERROR_INVALID_STATEIf the Peer Manager is not initialized.